3dWarp -deoblique problem

Howdy-

One thing to note at the start, if you are putting your data into afni_proc.py, I wouldn’t worry about deobliquing the EPIs. You can let afni_proc.py deal with it appropriately for you. (Perhaps you would want to deoblique the anatomicals, in a manner discussed below.)

There are 2 meanings of deoblique, with distinct consequences in either case.

  • “3dWarp -deoblique” will apply the obliquity transformation, leading to your data being blurred a bit by the interpolation that will entail. It is also possible your grid dimensions might change slightly. But the benefit is your data will be in the coordinates that they would appear in in the scanner.
  • “3drefit -deoblique” will purge the obliquity transformation, by default in a way that (unfortunately) might make your data look far away from its original coordinates in some cases. But the benefit is that the data is not regridded/interpolated, so you don’t incur a blur.

The reason why obliquity is annoying is primarily a visualization one: because applying it means interpolating the data, there would be a bit of a blur, so it is generally not applied in the GUI and therefore the dataset “appears” to be in a different location relative to other ones acquired at the same time that have no/differing obliquity. But afni_proc.py, via align_epi_anat.py, will deal with this OK if you let it. So there shouldn’t be a need to go down either of these roads.

If you do want to get rid of obliquity while both not regridding and not pushing your data far from its original coordinates, you can run the following for your DSET_IN:



3dcopy DSET_IN _tmp_dset                            # copy to BRIK/HEAD
3drefit -oblique_recenter _tmp_dset+orig         # recenter, obl transform is now just mainly rotation
3drefit -deoblique _tmp_dset+orig                    # purge obl info

# ... and then if you want a NIFTI output
3dcopy _tmp_dset+orig DSET_OUT.nii

That will purge the obliquity in a way that does not regrid/interpolate the data and it also preserves the location of the coordinate origin (x,y,z) = (0, 0, 0).

But again, I don’t think you will need to do this with your EPIs. If you have anatomical datasets with obliquity, then I would probably deoblique them with the above incantation before any processing, to not have to worry about it.

–pt