Converting Neurological to Radiological

Hi,

The orientation of DWI is Radiological ( RL PA IS ), but the T1w is Neurological ( LR PA IS ). Since I want to register DWI to T1w, before 5ttgen, I wonder is there any commands could help me reorientate the T1w to the Radiological?

Thank you in advance!

1 Like

Hello @hyting,

Using mrtransform’s -flip option, you can flip the X axis (index 0) of your anatomical image.

mrtransform anat.nii.gz -flip 0 anat_flipped.nii.gz

Cheers,
Nick

It depends on exactly what you mean by ‘neurological’ & ‘radiological’, but I assume you’re talking about the way the image has been stored – what we in MRtrix-land refer to as strides – rather than the actual display of the images?

If the latter, and your image is indeed showing up with an unexpected left-right flip, I would immediately urge externe caution and review your entire processing pipeline to identify the root cause, fix it, and make sure there are no other ways this can happen. Yes, you can flip the image manually as suggested by @NicDC, but that shouldn’t be required if everything works as it should. This is one of those issues that I might lose sleep over, given that these images often end up used in surgery…

However, if it’s the former, what you’re looking for is probably just a simple changing of the strides, which has no impact on the orientation of the anatomy as such, only on the ordering of the voxels on file. You can do that with e.g.:

mrconvert -stride -1,2,3 T1.mif T1_out.mif

Also worth asking what you’re planning to use for the registration? Some packages are less sensitive to these issues than others…

1 Like

Thank you for your reply.

Sorry, I don’t know much about this. I just performed this command :
fslhd T1w.nii.gz fslhd DTI.nii.gz
And then I found the qform orientation of T1 was LR PA IS, but the DTI’s was RL PA IS. I assume it was what you said ‘strides’, because I didn’t find they are opposite on the X-axis when displayed them by fslview or mrview.

Here are the lines I am going to use for the registration
flirt.fsl -dof 6 -cost normmi -ref T1w.nii.gz -in b0.nii -omat T_fsl.txt transformconvert T_fsl.txt b0.nii T1w.nii.gz flirt_import T_DWItoT1.txt mrtransform -linear T_DWItoT1.txt DWI.mif aligned.mif

Ok, then yes, you’re taking about strides, and that mrconvert call I suggested should do what you’re after. :+1:

Hello @NicDC
Very thank you for your reply.
After the discussion with @jdtournier blow, I realized I didn’t have to flip T1w though.

1 Like

Thank you.
But I have one more question, does this mrconvert line necessary when I use the commands above for the registration?

I’m not sure, to be honest – different versions of these packages might handle these things differently. I would try it with and without reorientation and see what happens…

1 Like