Is there an equivalent mrtrix3 command for fslreorient2std?
Thx,
Stefan
Is there an equivalent mrtrix3 command for fslreorient2std?
Thx,
Stefan
Hi Stefan,
Not entirely sure, but you could try
mrtransform input.mif output.mif -identity
cheers,
Thibo
If you’re after resetting the orientation of the image axes to RAS+ (the NIfTI standard frame), while preserving the image anatomical orientation, then in MRtrix-speak you’ll want to reset the strides – which you can do with a simple mrconvert
call:
mrconvert input.mif -strides 1,2,3 output.mif
(the example is for .mif
images, but this works for all supported image formats, including NIfTI).
I should also add that if you’re applying this on NIfTI DWI data with associated bvecs/bvals, it is essential that you also apply the corresponding modifications to the bvecs. To do this is a bit cumbersome – one of the reasons we advocate the use of the .mif
format:
mrconvert input.nii -fslgrad bvecs bvals -strides 1,2,3 output.mif -export_grad_fsl bvecs_out bvals_out
Hi Donald,
Is it also necessary to run dwigradcheck after this step? Or the gradients will automatically be transformed to match the new strides? In case the input is a .mif file.
Also, please correct me if I’m wrong. I manually converted a .mif into .nii, applied the fslreorient2std. The strides were -1,2,3. I also checked the strides using mrinfo for the MNI152 T1 template in the FSL’s directory, and it was -1,2,3. So, should the flag of the mrconvert be -1,2,3 rather than 1,2,3, if we want to keep it equivalent to fslreorient2std?
Best,
Amir
That should all be taken care of in the process. In fact, when using the MRtrix image format (.mif
), the gradients are stored relative to scanner/world coordinates, and are therefore independent of the image strides – this is not the case when dealing with FSL bvecs/bvals, hence the advice about using the -import/export_grad_fsl
options in that case.
OK, this stems from FSL’s legacy, as it was originally based on the Analyze format, which was indeed stored using those strides (-1,2,3
) – often referred to elsewhere as LAS (axes point towards left / anterior / superior directions). But the NIfTI standard frame is definitely RAS (strides 1,2,3
in MRtrix parlance). Nonetheless, most tools (and sometimes FSL itself, it seems) have stuck to that convention as their ‘standard’ frame, especially when the conversion is destined for use with FSL. So if you need to match that ‘standard’, then you can indeed use -strides -1,2,3
instead. It shouldn’t make any difference as far as MRtrix is concerned – as long as everything remains internally consistent!
Cheers,
Donald.