Why does ITK Snap automatically transpose my scans?

178 views
Skip to first unread message

JM

unread,
Oct 24, 2018, 4:56:09 AM10/24/18
to itksnap-users
I was provided with some brain scans that once I display them on ITK-SNAP they automatically get transposed.

When I run from the terminal (Ubuntu) "itksnap scan.nii" I get some information in the terminal that says "Transpose of 1179648 by 2 matrix computed in 0.178418 sec.".

I was thinking that maybe the nifti files have some parameters that make ITK to transpose them. However, I opened a file in python using nibabel library to read and write a new nifti file without any additional information except for the intensity values but ITK still transposes them.

scan = nib.load("scan.nii").get_data()
nib.save(nib.Nifti1Image(scan,np.eye(4)), "output.nii")

Both scan.nii and output.nii get transposed when I display them on ITK-SNAP.

Why is this and how can I stop it to do that?

Paul Yushkevich

unread,
Oct 25, 2018, 11:24:45 AM10/25/18
to itksna...@googlegroups.com
JM

If the images are transposed in ITK-SNAP, then the NIFTI header is incorrect. You can modify the orientation using Tools->Reorient Image. You can also do it using c3d with the -orient command.

Best,
Paul

--
You received this message because you are subscribed to the Google Groups "itksnap-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to itksnap-user...@googlegroups.com.
To post to this group, send email to itksna...@googlegroups.com.
Visit this group at https://groups.google.com/group/itksnap-users.
For more options, visit https://groups.google.com/d/optout.


--
Paul A. Yushkevich, Ph.D.
Associate Professor
Penn Image Computing and Science Laboratory
Department of Radiology
University of Pennsylvania
Reply all
Reply to author
Forward
0 new messages