I have encountered a problem in changing the strides of a diffusion weighted MRI file.
Currently, the strides are 1,2,3,4, and I wish to change them to -1,2,3,4 (as it seems to be the appropriate form of input for a TractSeg analysis). I do so using the following command:
mrtransform -strides -1,2,3,4 fileOrig.nii.gz fileStrides.nii.gz -force
The unexpected problem I found is that the xform has changed not only in terms of the x axis, but also in terms of the y and z axes. For example, the original file had the following output for mrinfo (-norealign):
Dimensions: 81 x 106 x 76 x 104 Voxel size: 2 x 2 x 2 x 8.125 Data strides: [ 1 2 3 4 ] Format: NIfTI-1.1 (GZip compressed) Data type: signed 16 bit integer (little endian) Intensity scaling: offset = 0, multiplier = 1 Transform: 1 0 0 -80 0 1 0 -120 0 0 1 -60 comments: Raw Eddy Corrected
While the new file has:
Dimensions: 81 x 106 x 76 x 104 Voxel size: 2 x 2 x 2 x 8.125 Data strides: [ 1 2 3 4 ] Format: NIfTI-1.1 (GZip compressed) Data type: 32 bit float (little endian) Intensity scaling: offset = 0, multiplier = 1 Transform: -1 0 0 80 -0 1 0 -105 -0 0 1 -75 comments: Raw Eddy Corrected mrtrix_version: unknown
As you can see, not only did the x axis flip (as expected), but also the y and z origin values changes. Ir order to keep the rest of the analysis output consistent with other aligned scans from the same subject, I had to manually change the xform of the output file (replacing rows 2-4 with those of the original file).
Does this change in the xform following mrtransform make sense to you? Does the workaround I suggested sound reasonable?
Enjoy your weekend,