AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
bob cox
August 05, 2003 03:45PM
Allison Wymore asked

Hello... It makes me cringe to even open this can of worms, but... I'm not sure that the analyze format images are being displayed correctly in AFNI. I went round and round with the PET department on this. I was using mnc2ana, as downloaded, to convert my minc format images to analyze format images. However, after much gnashing of teeth, we discovered that to our horror, the analyze images that we sent to the PET department were reversed left/right with respect to the images off the PET scanner. Rich Carson verified things on the scanner, I corrected mnc2ana, and re-generated all my analyze format images to make absolutely certain that they were being both
converted, stored, and displayed correctly. Now, if I open up my analyze
format images in medx (where I am sure they are being read correctly, as my
images now agree with PET department images) they appear correctly (left is
right), while they appear reversed in AFNI (where supposedly left is right).
I'm thoroughly confused, and this is making my head hurt...


I agree -- volume orientation is a very head-pain-inducing issue. My recommendation is that you set the environment variable AFNI_ANALYZE_ORIENT to specify the orientation of the ANALYZE format volumes. Let's call the axes in the ANALYZE file (i,j,k), where i varies most rapidly and k the least. Then you set AFNI_ANALYZE_ORIENT to a 3 letter code that corresponds to the spatial orientation of the axes:
Quote

The code must be 3 letters, one each from the
pairs {R,L} {A,P} {I,S}. The first letter gives
the orientation of the x-axis, the second the
orientation of the y-axis, the third the z-axis:
R = Right-to-Left L = Left-to-Right
A = Anterior-to-Posterior P = Posterior-to-Anterior
I = Inferior-to-Superior S = Superior-to-Inferior
For example, 'LPI' means
-x = Left +x = Right
-y = Posterior +y = Anterior
-z = Inferior +z = Superior
For display in SPM, 'LPI' or 'RPI' seem to work OK.
With this variable set in the environment (e.g., via setenv, or in .afnirc), then when AFNI reads in a .hdr file, it will use the code to determine how to display the images. You'll probably have to experiment with the orientation code to get it right for your data.

Sorry for the headache. I've had some of them, too. The basic problem is that the ANALYZE format itself doesn't provide a coherent way to express the orientation of the data.

bob cox

P.S. You may also want to check out the AFNI_LEFT_IS_LEFT environment variable. See [afni.nimh.nih.gov] for the gruesome details.
Subject Author Posted

ANALYZE format and AFNI orientation

bob cox August 05, 2003 03:45PM