help > MRIcron overlay different slice numbers when exported from MIPAV
Showing 1-2 of 2 posts
Display:
Results per page:
Apr 10, 2019  07:04 PM | sjack
MRIcron overlay different slice numbers when exported from MIPAV
Hello-

I am having an issue with masks that are converted to niftii (from .xml) using MIPAV. When opening the mask by itself, it looks normal. However, when opening the mask as an overlay on top of another image, the slice number is one slice off. My thinking is that MIPAV starts from slice 0. So in MIPAV, a mask might have 0-39 slices, whereas in MRIcron it would be 1-40 slices. It looks like it is then overlaying slice 1 (instead of slice 0) on top of slice 1 of the other image. 

Any ideas on how to fix this? Not sure if this is somehow encoded in the image header, or if it is some setting I can change in MRIcron?

Thanks!
Apr 10, 2019  07:04 PM | Chris Rorden
RE: MRIcron overlay different slice numbers when exported from MIPAV
Have you checked the image and the mask with fslhd? For example, I would try 'fslhd img.nii' and 'fslhd mask.nii'. You will want to check the sform (or if that is not set, the qform). If both images are in identical space, the sform should be identical. I wonder if something got lost in translation. The coding of space is explicitly described in the NIfTI standard, you should get a spatial transformation matrix that looks like the following:

sform_code 1
sto_xyz:1 -3.250000 0.000000 -0.000000 104.000000
sto_xyz:2 0.000000 3.230991 -0.388798 -58.684311
sto_xyz:3 0.000000 0.350998 3.578943 -84.798035
sto_xyz:4 0.000000 0.000000 0.000000 1.000000