Resemple to the center of the image

Hello Afni team,

I would like to modify an atlas that was not centered on its center of mass.
using the following command line 0 is now the center of the atlas.

3dCM -set 0 0 0 img_master

However, how can center the atlas in the center of the image (the center of mass in the center of the FOV)
thank you very much

The solution came to me last night, AFNI has somehow haunted me XHott(
I simply used 3dZeropad to remove the directions (A,P, I, L…) that were in excess.
In the end, I have got a smaller image centered in the brain.
Just to confirm, except for the fact that I have changed the image size does that make sense?

That sounds fine to me. Changing the actual coordinates would change the reference system, but if you were creating a new atlas, that might be a better way. For the zeropad idea, you can do this a bit more automatically with 3dAutobox using a brain mask and then 3dZeropad with the autoboxed brain mask as the master. Add a few slices around to allow for alignment of other datasets.

Note that atlases are generally based off of templates.

The CM of an atlas would be heavily weighted by the distribution of the atlas values, and it would not seem appropriate to base it on that.

The CM of a template would be more reasonable to use, however CM=0,0,0 is not so great there, either. Generally, templates have 0,0,0 somewhat near the AC, which does center the volume reasonably well, and it gives a landmark. Most templates do not have this exact center, but are close.

  • rick

thanks for your answer,
I used the atlas mask for 3dCM which actually did not give me a big difference when used on the template.