wtclarke / pymapvbvd

Python port of mapVBVD
MIT License
40 stars 25 forks source link

NEco value in "image" does not agree with the number of echoes in header and in actual acquisition. K-space data matrix does not have the "Echo" dimension #47

Open wenshangwang opened 2 months ago

wenshangwang commented 2 months ago

Dear pymapvbvd team

I encountered this issue when loading up a multi-echo SE-EPI twix data. After loading the data: image

twixObj.hdr.Config correctly record the "NEchoMeas" as 3. However, the actual data matrix in twixObj.image shown the NEco as only 1. image

This sequence is scanned with siemens' XA30. When I loaded a previous scan using the exact same sequence on VE11. Everything is loaded and mapped correctly. image

As you can see from the above two snippet of loading results, the number of acquisition are the same so there are definitely 3 echoes of data being acquired. All the other dimension are the same except for NEco. It wouldn't be surprised to me that only the last echo's data is stored as each echo probably just over-write the previous echo's data at the same position.

I would like to ask suggestion on what could be done to obtain all echoes of mine. Also, I would like to ask base on your knowledge on this siemens' upgrade, did they change any of the loop structure to multi-echo EPI's echo when writing the twix file?

Thanks in advance!

wtclarke commented 2 months ago

Hi @wenshangwang,

I don't know the ins and outs of the upgrade, if you have access to the magnetom.net forums, you could ask there.

Can you load the data in mdb, either on the scanner or in an idea installation, and tell me the values in the echo index? Are there three? What values do they take?

wenshangwang commented 2 months ago

HI @wtclarke

It seems like the source code function SBBEPIreadout is no longer shared with us by Siemens starting from XA. Without SBBEPIreadout, the Mdh for the echo counter is set to zero everytime now in XA. I just found out his after consulting the scientists who write my sequence. So as we can see from my two datasets that they have the same number, the VE's echo indices are properly labelled with 1, 2, and 3 but the XA's echo indices are all labelled as 1s.

Is there anything you would suggest us to do to recover the correct Kspace dimension? Because the way the echo's indices labelled are quite obvious for this sequence, For each slice, all three echoes were acquired, then the next slice.

Thank you

wtclarke commented 2 months ago

So, you could:

1) Hack the pymapvbvd code to manually set the right indices. 2) Try This tool https://github.com/pehses/twixtools, written by the original developer of mapvbvd, which might be more flexible. 3) Modify the twix file directly. There's no hash or similar so if you can figure out the right bye offsets you can edit a twix file. There are some tools out there that enable this.