Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password   Forgot your Password?
 All Forums
 Support Forums
 Analysis Software Support
 Flipping orientation labels
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ch186
New Member

20 Posts

Posted - Sep 04 2013 :  1:34:55 PM  Show Profile  Reply with Quote
What is the easiest way to flip the orientation labels on a functional image? After reconstruction, our data from the 32-channel head coil has the S/I Labels backwards. Is there a simple way for me to fix this now that I have the .nii file? I tried just loading it into MATLAB and using flipdim but couldn't get that to work with the 4D data (which I might have been doing it wrong).

Thanks!

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Sep 04 2013 :  1:41:57 PM  Show Profile  Reply with Quote
Do you mean the S/I labels are not correct with respect to the brain, or that the labels are correct and superior and inferior are just displaying upside-down compared to how other images are displayed?

If the former, it needs to be fixed.

If the latter, there are some solutions.

Could you send me a pointer to the data privately and I'll take a look...
Go to Top of Page

ch186
New Member

20 Posts

Posted - Sep 04 2013 :  1:58:11 PM  Show Profile  Reply with Quote
I just emailed you a link to the data. The S/I labels are actually incorrect (not just viewing upside down).
Go to Top of Page

syam.gadde
BIAC Staff

USA
421 Posts

Posted - Sep 04 2013 :  2:23:27 PM  Show Profile  Reply with Quote
In that case, you could use:

fslorient -getsform IMAGE.nii.gz

This gives you a list of 16 numbers which correspond to the matrix:

X Y Z trans
R 1 2 3 4
A 5 6 7 8
S 9 10 11 12
[0] [0] [0] [1]

Negate the numbers occuring in whichever column corresponds to the S/I axis (i.e. if it's the slice axis, negate the third (Z) column.

Then put those numbers back:

fslorient -setsform [16 new numbers...] IMAGE.nii.gz

Do the same for -getqform/-setqform .

Maybe there's a better way, but most tools start with the assumption that the input orientation labels are correct. If this is a one-off, it's not too bad.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.41 seconds. Snitz Forums 2000