Undo manual AC-PC alignment?

Hi All,

I have an anatomical T1 dataset that has been manually AC-PC aligned and further processed (manually skull-stripped, etc). I would like to keep the processing, but undo the AC-PC alignment. I’ve looked at cat_matvec examples to see if I can extract the transformation matrix from the header and apply it/(the inverse) to undo the AC-PC alignment, but am not sure how to proceed. Any help is appreciated!

Thanks!
Jonathan

Hi, Jonathan-

How was AC-PC alignment done?

Does for a given dset name “dset_name”, does this:


cat_matvec dset_name::WARP_DATA

show 12 numbers?

–pt

Hi, again-

Also, as a quick follow up-- for a given dset name “dset_name”, does this:


cat_matvec dset_name::ROTATE_MATVEC_000000

show 12 numbers?

–pt

Hi -

Thanks for the quick reply! Unfortunately, none of these entries (WARP_DATA, ROTATE_MATVEC_000000) are in the .HEAD. I was also hoping to find the WARP_DATA entry. The only matrices that I found are: IJK_TO_DICOM and IJK_TO_DICOM_REAL. I copied one dataset here: http://lacontelab.org/7874t1_mprage+acpc.HEAD
http://lacontelab.org/7874t1_mprage+acpc.BRIK.gz

Thank you!
Jonathan

Hi, Jonathan-

I don’t think you mentioned how you did AC-PC alignment? If done with AFNI, that would help us locate where the information is; elif done in other software, well, I don’t know that it would be recorded in the header.

-pt

The AC-PC alignment was done manually in AFNI. I would not ask this question here otherwise. We do almost everything in AFNI if possible :).

Hi, John-

OK, what did you specifically use in AFNI?

I just tried using the Nudge plugin, which gives a 3drotate command, and from the new dset named “dset_name” I can extract the applied rotation matrix with:


cat_matvec dset_name::ROTATE_MATVEC_000000

The inverse of that matrix can be calculated with:


cat_matvec dset_name::ROTATE_MATVEC_000000 -I

From using the AC-PC alignment “markers” and applying the transform in the GUI, from the created data set dset_name:


cat_matvec dset_name::WARP_DATA

… which can be inverted in a similar way as above.

So, it depends what program you have used.

–pt

Hi - I used the AC-PC alignment (Define Markers), but I do not have the WARP_DATA entry in the header for some reason. I will try to figure out why. Thank you very much for your help with this!

Weird. I will send you a PM to see about getting a header from one of those dsets to check out.

Out of curiosity, what is your AFNI version (afni -ver)?

–pt

Thanks - I’ve uploaded the .HEAD[/url] and the [url=http://lacontelab.org/7874t1_mprage+acpc.BRIK.gz].BRIK.gz file. We used 18.2.10 for this, but are running 19.2.01 now (linux_xorg7_64 binaries).

Jonathan

Jonathan-

Thanks for the dset.

However, it looks like that HEAD file contains no transformation information.

Since the history of that dset is also entirely missing, I wonder if it might have gone through some other software, perhaps, a process that would likely have purged that useful information?

–pt

Hi Paul,

The dataset did not go through any other processing to my knowledge. I agree, It should have the to3d command in the history. The fact that this it is not there is odd. I will do some more digging…

Thank you for all your help!
Jonathan