Mrview -norealign

Hi All,

I am trying to understand the handling of transforms and strides in mrtrix and stumbled upon the following situation.

I have an image that has the following raw header information (mrinfo -norealign) :

Dimensions: 82 x 82 x 46
Voxel size: 2.70732 x 2.70732 x 2.7
Data strides: [ 1 2 3 ]
Format: NIfTI-1.1 (GZip compressed)
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: -0.9938 0.1115 0 100.8
0.1115 0.9938 0 -96.89
0 0 1 -29.52
comments: FSL5.0

Which MRtrix prefers to massage into (mrinfo):
Dimensions: 82 x 82 x 46
Voxel size: 2.70732 x 2.70732 x 2.7
Data strides: [ -1 2 3 ]
Format: NIfTI-1.1 (GZip compressed)
Data type: 32 bit float (little endian)
Intensity scaling: offset = 0, multiplier = 1
Transform: 0.9938 0.1115 0 -117.1
-0.1115 0.9938 0 -72.44
-0 0 1 -29.52
comments: FSL5.0

Now, when I use mrview to visualize this image using both commands mrview image.nii and mrview image.nii -norealign. I get the exact same visualization. Intuitively, I would have expected one to show up in RAS and the other in LAS. As well as, voxel [0, 0,0] to be at -117,-72,-29 in one case and at 100,-96,-29 in the other case.

It’s likely I am still confused about how the images are being displayed.
Any suggestions?

Thanks!
Emilie

Wow, I didn’t even know we had this option in mrview…

OK, it took me a while, but I think I finally figured out where that option went AWOL… You’re right, there is a bug in the processing of that option, in that it’s not processed at all. It’s a trivial fix, which you can implement yourself if you want (diff here), or just wait a few hours until it’s tested, reviewed and merged to master.

If you decide to wait for the fix (which might take a while longer, since it looks like GitHub is having issues at the moment), then you’ll just need to issue a git pull once this pull request is merged. Otherwise, just edit the file mentioned in the diff above. At that point, just invoke ./build to re-compile, and you should be set.

Thanks for looking into it so quickly and providing me with a fix!

Just a quick progress update: the pull request has now been merged to master. You can get it with a simple:

git pull
./build
1 Like

Works like a charm. Thanks!