Transforming tags with 3dAllineate


I have collected a T1w MRI scan using two different scanners for the same patient. In one of these scans, the patient has LPA, RPA, and Nasion fiducials which I have labeled using the “Edit Tagset” Plugin. I want to find the coordinates of these fiducials in the other MRI image where the patient does not have markers on their head. Since I have hundreds of patients like this, I want to find an automated way to do this that is as accurate and efficient as possible.

I tried using 3dAllineate to align the fiducial T1 (containing a tagset) with the other T1, hoping that the tagset would also transform during the process. However, I discovered that the tagset disappeared in the transformed dataset. Is there a way to also transform the tagset? I imagine there must be a way to save out the transformation matrix and then apply it to the coordinates of the tagset, but I’m not sure the easiest way to do this. I know that I could manually edit the tagset in the transformed MRI, but this approach would likely require more time.

Let me know if you have any suggestions!


If you are using only an affine transformation, then you can use Vecwarp to transform lists of coordinates.,158095,158098#msg-158098,146048,146181#msg-146181

You can load these tags in from a new file with those new coordinates, or put spheres down instead of “tags” on the new locations.

If you need to use a transformation that uses both an affine and nonlinear transformations, then you can use the new I’ll be adding an affine only option, just for convenience there.