Hi afni experts!
I'm trying to figure out the best way to convert back and forth between analyze and afni. My steps were:
3dAFNItoANALYZE -4D -orient LPI file+orig
3dcopy file.hdr file_backtoafni
The problem at this point is that analyze datasets don't preserve the origin information, and the re-afnified image ends up far off in a corner.
I tried, unsuccessfully, to remedy this by using:
3drefit -duporigin file+orig file_backtoafni+orig.HEAD
This probably would have worked fine had I not used -orient LPI in the 3dAFNItoANALYZE command.
Opening the HEAD files in a text editor, I saw that the ORIGIN entry was -119 119 75.9 in file+orig. If I manually edit the ORIGIN entry in the LPI-oriented file_backtoafni to read 75.9 119 -119, the orientation is corrected.
Is there a way I can use 3drefit and -duporigin to accomplish this task?
Sally