I have collected a functional + anatomical dataset, with the anatomical acquired with an oblique origin. I have successfully used 3dWarp to correct this, and analyzed the data successfully. However, I used the original (oblique) anatomical to reconstruct the cortical surface. Now I would like to use the voxel coordinates from my statistical analysis to define ROIs on the cortical surface, but the two datasets have different coordinate systems, given the obliquity issue. Is there a simple way to apply a transformation to my de-obliqued voxel coordinates to get them back to oblique coordinates?
You could extract the xyz_ob1 → xyz_ob2 transformation matrix by doing this (the same way it is used by align_epi_anat.py)
3dWarp -verb -card2oblique target_dset -prefix temp_outdset mydset "
| \grep -A 4 ‘# mat44 Obliquity Transformation ::’ > obl_transformation.1D
The verb option tells the program to include in the stdout the transformation matrix derived from the ijk to xyz coordinate transformations in each of the datasets. Then use Vecwarp with the matrix that is generated there with either the forward or backward directions depending on which way you want to convert the coordinates.
Thank you - I greatly appreciate the help.