Duke-UNC Brain Imaging and Analysis Center
BIAC Forums | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Support Forums
 BXH Header Support
 Trouble with orientation

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
tonev Posted - Nov 10 2003 : 11:23:55 AM
Hi There-I'm having a bit of trouble trying to figure out some of the orientation information in my bxh files. For instance, I've got a volume with the following direction vectors, according to the header:

x = -1 0 0
y = 0 0 -1
z = 0 1 0

If my understanding of the RAS coordinate system is correct, the following vectors represent a straight coronal image (z dimension has an integer value in the P-A position) collected R-L (-x) within S-I (-y) within P-A (+z). Indeed, when I load it into readmr, it gives me an orientation of Coronal P=>A and an RAS flag of "LIA". However, at this point I have 2 questions:

1) When I read the file into showsrs2, the slices move from A-P. In showsrs they (correctly) go from P-A. Why is there a difference?

2) SnAP:IRS reads the orientation as LSA. Why does this information conflict with what readmr gets (or does it)? Should I change the "File Orientation" setting to LIA?

3) Finally, once I get all this straight, I'm still not sure how to tell what side of the brain I'm drawing an ROI on. If, in fact, my image is LIA, does that mean that when I'm drawing on the left side of the screen, I'm actually drawing on the right side of the brain, or does this depend on what "Display Orientation" is set to in SnAP? If Display Orientation matters, what should I set it to given the File Orientation?

Sorry for so many questions. I haven't had this much trouble distinguishing left from right since I was five.

Cheers,

Simon
8   L A T E S T    R E P L I E S    (Newest First)
syam.gadde Posted - May 24 2007 : 3:25:45 PM
If the avwhd matrix is exactly how it is in the output, then you need to flip it (across the diagonal), and that should match the vectors in the .bxh file (which in this case looks right).
smhayes Posted - May 24 2007 : 3:21:02 PM
For the spgr images (NIFTI format), the matrices for the output of avwhd command and the bxh file don't match.
BXH output:
-1 0 0
0 0 -1
0 1 0
avwhd output:
-1 0 0
0 0 1
0 -1 0
syam.gadde Posted - May 24 2007 : 2:09:13 PM
It's hard to know what's going on without seeing the actual image files, but if FSLView is displaying two files in radically different orientations and the .bxh files have the same orientation, then the .bxh files and the image files don't match.

What format are the image files you are reading into FSLView? If NIFTI, and if you have access to the program avwhd (from Freesurfer) you can try:

avwhd file.nii.gz

or:

env FSLOUTPUTTYPE=NIFTI_GZ avwhd file.nii.gz

and the 3x3 upper-left matrix in the qto_xyz lines (inverted) should match the three direction vectors in the .bxh file.
smhayes Posted - May 24 2007 : 1:29:01 PM
When I load images into fslview (3 planes), the func data comes up in a different orientation than the anatomical data. I looked at the orientation in the bxh files, and they appear to be in the same orientation, yet FSL view is reading them differently. That is, in the 3 plane view, upper left is coronal for func data and axial for spgr. fslview appears to have them labeled correctly as far as S-I, and A-P. I checked out the wiki: http://fourier.biac.duke.edu/wiki/doku.php/biac:fsl:guide
but it seems as though some changes have occurred since it was written (e.g., I didn't find a reorient.mat in chris's dir).

Is there a new method that has been developed for addressing these orientation issues? Any suggestions would be appreciated.
Thanks,
Scott
syam.gadde Posted - Nov 10 2003 : 2:35:08 PM
quote:
Originally posted by tonev

Given the RSP File Orientation in SnAP (and IRP Display Orientation; I assume it flips S to I for the same reasons showsrs2 does, as Chuck mentioned), I found that the first slice in the axial orientation started at the most inferior slice, "I", and the first slice in the coronal orientation started at the most posterior slice, "P". As such, the first slice in the sagittal orientation should start at the rightmost slice, "R", which just happens to be on the left side of my screen. Does that logic make sense?



It does to me. I have verified the same behavior (where slice 1 means pulling the scroll bar to the very bottom of the image). Also, it looks like the lower-left corner in each image is the starting point for each dimension, so perhaps the left and bottom edges will always be "Inferior", "Posterior", or "Right", if you use SNAP IRP display orientation.
tonev Posted - Nov 10 2003 : 2:21:54 PM
Thanks Chuck and Syam--I got the latest version of SnAP and it does now read the orientation as RSP (i.e., where the dimension starts -- opposite to the RAS coordinate system.

Instead of drawing a bright voxel on the picture, there is a particular gyrus on a particular slice of a particular brain that I have become familiar with, so I use that as a landmark in this case. This landmark appears on the same side of the coronal image in SnAP as it does with showsrs2 (and for that matter, the same side on the DICOM image that comes off the scanner). So there is consistent mapping from scanner to SnAP. So then I guess my question is: Given the LIA RAS-orientation of my image, if this landmark is on the left side of the screen, is it actually on the right side of the brain as in radiological convention?

The reason that I believe this right-is-left orientation to be true is the following:

Given the RSP File Orientation in SnAP (and IRP Display Orientation; I assume it flips S to I for the same reasons showsrs2 does, as Chuck mentioned), I found that the first slice in the axial orientation started at the most inferior slice, "I", and the first slice in the coronal orientation started at the most posterior slice, "P". As such, the first slice in the sagittal orientation should start at the rightmost slice, "R", which just happens to be on the left side of my screen. Does that logic make sense?

Cheers,

Simon
syam.gadde Posted - Nov 10 2003 : 12:55:01 PM
quote:
2) SnAP:IRS reads the orientation as LSA. Why does this information conflict with what readmr gets (or does it)? Should I change the "File Orientation" setting to LIA?


This is actually a combination of two bugs. SNAP writes its three-letter orientation vector in terms of the origin of each dimension, rather than where the dimension goes, so the orientation (LIA) should actually have been displayed as RPS in Snap-world. Moreover, there was also a bug in the declaration of the S-I direction, so this was flipped. I have fixed the BXH reading code to take these things into account, and the behavior should be more consistent now.

quote:
3) Finally, once I get all this straight, I'm still not sure how to tell what side of the brain I'm drawing an ROI on. If, in fact, my image is LIA, does that mean that when I'm drawing on the left side of the screen, I'm actually drawing on the right side of the brain, or does this depend on what "Display Orientation" is set to in SnAP? If Display Orientation matters, what should I set it to given the File Orientation?


Chuck's suggestion to paint some voxels in a known image and see where they end up in SNAP is good. The display orientation does in fact depend on what the Display Orientation field is set to, but the mapping isn't entirely clear to me. If anyone determines what this is, could you post those findings back to the forum? Thanks!

charles.michelich Posted - Nov 10 2003 : 11:41:31 AM
Simon,

In response to your first question, showsrs2 automatically attempts to flip the images in the slice direction such that it displays properly in the "3 Orthoganal Planes" view. This feature is particularly useful for axial images which were collected I to S since the brain will appear upside-down. The logic currently flips the images in the slice dimension if they are not L, P, or I for sagittal, coronal, and axial images respectively.

Any flips which have been applied are shown in the "Orientation:Flip Images ..." menu. If you want the original orientation, just uncheck the flip dimension in this menu. showsrs does not have this feature, so you see the data in the original orientation.

I'm not sure why SnAP:IRIS is incorrectly reading the orientation or which side is right and left on the display. You can determine the R-L display in SnAP by using MATLAB to place one or more bright voxels in either the right or left side of the brain and then load the image in SnAP to find out which side it is on.

Enjoy,
Chuck


BIAC Forums © 2000-2010 Brain Imaging and Analysis Center Go To Top Of Page
This page was generated in 0.27 seconds. Snitz Forums 2000