The confusing output of orientation from 3dinfo

Dear,
when I look at 3dinfo’s output for a dataset, I just get a little confused by the conflicting orientation, just like this:
Data Axes Orientation:
first (x) = Right-to-Left
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient RPI]
R-to-L extent: -102.774 [R] -to- 105.914 [L] -step- 3.312 mm [ 64 voxels]
A-to-P extent: -89.485 [A] -to- 119.203 [P] -step- 3.312 mm [ 64 voxels]
I-to-S extent: -44.866 [I] -to- 110.822 [S] -step- 3.312 mm [ 48 voxels]
It’s RPI at above, while it’s RAI at below, and I also find it’s not only for this dataset, but actually a common one, which one should I believe?
Thanks,
Peng Ren

Hi, Peng Ren-

This is the orientation information:


3dinfo -orient FILE

… which in your file’s case is RPI. The part of the header describing/showing this orientation information is:


first (x) = Right-to-Left
second (y) = Posterior-to-Anterior
third (z) = Inferior-to-Superior [-orient RPI]

You can change the orientation with something like


3dresample -orient AIL -prefix NEWFILE -inset FILE

and see that the above all changes to match.

The other information you point out:


 R-to-L extent: -102.774 [R] -to- 105.914 [L] -step- 3.312 mm [ 64 voxels]
A-to-P extent: -89.485 [A] -to- 119.203 [P] -step- 3.312 mm [ 64 voxels]
I-to-S extent: -44.866 -to- 110.822 [S] -step- 3.312 mm [ 48 voxels] 

does not change with defining a new orientation with 3dresample. This is the dataset field of view information-- what is teh extent that 3D rectangle/box takes up in physical space (showing the “extent” values along with the voxel dimensions and matrix size). It is always just shown in the “AFNI standard” ordering with the RAI side of things listed first. The FOV/extents don’t change just by resampling orientation.

Note that when you resample, the “origin” value changes-- it is basically the corner of the dataset defined by the orientation. That changes along with the orientation when you resample.

–pt

Dear ptalylor,
Thank you for your immediate reply.It helps me a lot with this problem, I just express your explanation again in my words for confirmation: the “x,y,z extent” information in the header is just preference of showing 3D volume in afni, so it won’t change with 3dresample. if i want to change the orientation of the dataset, 3dresample -orient should be used. Is that right?
Typically, the dataset is in the wrong orientation when we want to change the orientation, but how do we confirm it’s the wrong orientation? I usually click on one point in the right, anterior, inferior orientation to check if the coordinates are all minus values, is this the right way?
Besides, I found 3drefit can also change the orientation, but only change the sign of the origin, while 3dresample changes both their signs and values.what’s running inside, could you help me?
Best Wishes!
Yours,
Peng Ren

Hi Peng Ren,

Use 3dresample to alter the orientation when the current orientation is accurate, but not what you want (i.e. the views look correct when shown by the afni GUI). If the orientation is NOT correct (i.e. the views do not look correct in the afni GUI), then use 3drefit to adjust them.

The former leaves the brain in the same location in space, but changes it on disk. The latter alters the location of the data in space, e.g. because it has the anterior brain pointing left, not anterior, one would want to change the definition of where anterior is.

Which position are you in? When viewing the brains in the GUI, do they look correct or not?

  • rick

Dear rick,

Thanks for your immediately reply, I get the difference between 3drefit and 3dresample, but get confused by “leaves the brain in the same location in space, but changes it on disk”, could you explain further?

As I known, there are four attributes in afni related to orientation:
1.the -orientation option showed by 3dinfo
2.R-L extent … option showed by 3dinfo
3.the upper left corner of afni GUI, with RAI and SPM LPI option
4.the actual orientation they are stored

To my understanding, the -orientation in the header is the actual orientation they are stored, while R-L extent … is the same preference as the upper left corner orientation option in afni GUI, is this right?

if not, what’s the difference of these four attributes? could you show some details?

Best wishes,
Peng