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  

|
January 15, 2019 01:48PM
It seems likely you have the orientation wrong. This occasionally comes up with new types of acquisitions or data that has been transferred and process through other software. The data header needs to be "refit" with the correct orientation. Here is a somewhat manual procedure to handle this problem that I just wrote up for another user, so I'm posting it here:

In similarly confusing situations like this, this is what I have done. It's a little bit of detective work to find the right orientation..., so do this, copy to afni format or use the original DICOM files.

3dcopy wonky_data.nii test_wonky

If you have output, test_wonky+orig.BRIK.gz, gunzip that file. If AFNI_COMPRESSOR is not set, then you won't have that.

gunzip test_wonky+orig.BRIK.gz

Now use to3d to read the dataset back in with the sizes from test_wonky/wonk_data+orig / .nii (discovered with 3dinfo)

to3d '3D:0:0:192:128:56:test_wonky+orig.BRIK" (replace the 192,128,56 with the values from 3dinfo above, and be sure to use the BRIK file here.
also the 3D is for 16-bit short integer data. If bytes needs to be swapped,use 3Ds. If your data is 32-bit
float, use 3Df. See to3d's help for other options)

In the to3d GUI, click the "View images" button in the lower right. Now fill out the orientation by using the three buttons in the upper left, noting how the data changes across the screen, down the screen and as you increase the slice number. The first letters of each direction are what AFNI uses as the orientation. If you like, you can finish filling out the form for irregular voxel sizes and save with a prefix, but you can just exit out once you have the orientation code.

Armed with the orientation, update the dataset with

3drefit -orient RAI test_wonky+orig (Change the code in the command to the one you found in the to3d GUI)

Major warning here: the left and right are not obvious in many cases. You can verify if the left and right are *consistent* with another dataset (which you may trust more to be correct) by alignment and corresponding cost metrics for the original and flipped versions with the -check_flip option for align_epi_anat.py.



Edited 1 time(s). Last edit at 01/17/2019 04:22PM by Daniel Glen.
Subject Author Posted

Anatomical/EPI Plane Change Help

JaegerL January 11, 2019 11:16AM

Re: Anatomical/EPI Plane Change Help

Daniel Glen January 15, 2019 01:48PM

Re: Anatomical/EPI Plane Change Help

JaegerL January 17, 2019 10:46AM