wtclarke/spec2nii

Inconsistent voxel position in converted rda and twix files of a same acquisition

Closed this issue · 3 comments

Hello @wtclarke,

I encountered an unusual issue. I'm trying to read voxel positions to generate a mask for custom shimming. Previously, I achieved this by converting twix data to NIfTI format and extracting the qoffset values, which matched those visible on the scanner. I've written code to accomplish this, but encountered a problem: I couldn't use a twix file as a test file on Github to verify functionality (due to its large size). Consequently, I opted to use an RDA file instead.

However, I found out that the qoffset values from the same acquisition, after being read from the converted NIfTI files, differ between twix and RDA files. Below, you can see the header info for both files.

Twix-converted NIfTI header:
qoffset_x : -0.293681652341
qoffset_y : 62.7648077675
qoffset_z : 15.6147164181
srow_x : [20. -0. -0. -0.29368165]
srow_y : [ -0. -19.99910558 -0.18914551 62.76480777]
srow_z : [ 0. 0.18914551 -19.99910558 15.61471642]

RDA-converted NIfTI header:
qoffset_x : -10.293679
qoffset_y : 72.764361
qoffset_z : 15.520146
srow_x : [ 20. -0. -0. -10.293679]
srow_y : [ -0. -19.99910563 -0.18914005 72.764361 ]
srow_z : [ 0. 0.18914005 -19.99910563 15.520146 ]

Hi @behrouzvia,

As it happens I was working on this today for other users and have just merged in #128 . It should be fixed in the next version (and is currently fixed if you download straight from github).

Hi @wtclarke,
Thank you for your response! happy to hear the issue is fixed now. Fantastic work 👏

This is fixed and tested for in #128 and will be part of the next release (out today or tomorrow). Do reopen if it continues to be a problem.