Why is default -cmass off in 3dAllineate?

Hey all,

I am kinda posting a lot lately, but having an automatic processing pipeline rises some questions.

So I am trying to do a minimal pre-processing with afni_proc.py, and I 'm getting lots of WARNINGS. Some are regular and I found them easily on internet, but the

“WARNING -cmass is off :frowning:
please check results PLEASE PLEASE PLEASE”

was a tricky one.
I finaly found the 3dAllineate page which stated that we should do it most of the time, but that we should choose the dimensions (or put cmass+a)
I don’t understand why we can’t specify all 3 dimensions, and why isn’t this option automatic in a rather regular pre-processing pipeline.

Thanks

The alignment part of afni_proc.py (handled by a less super script, but still plenty super align_epi_anat.py) hopes that your anatomical and EPI datasets are somewhat close together. However, If these two volumes are not close, then the recommendation is to use options within that script (and configured as a pass-through option in afni_proc.py) such as -big_move and -giant_move. From the align_epi_anat.py help:

Notes on the big_move and giant_move options:
    "big_move" allows for a two pass alignment in 3dAllineate.
    The two-pass method is less likely to find a false minimum
    cost for alignment because it does a number of coarse (blurred,
    rigid body) alignments first and then follows the best of these
    coarse alignments to the fine alignment stage. The big_move
    option should be a relatively safe option, but it adds
    processing time.

    The giant_move option expands the search parameters in space
    from 6 degrees and 10 mm to 45 degrees and 45 mm and adds in
    a center of mass adjustment. The giant_move option will usually
    work well too, but it adds significant time to the processing
    and allows for the possibility of a very bad alignment.Another cost
    functional is available that has worked well with noisy data, "lpc+ZZ".
    For difficult data, consider that alternative.

    If your data starts out fairly close (probably the typical case
    for EPI and anatomical data), you can use the -big_move with
    little problem. All these methods when used with the default
    lpc cost function require good contrast in the EPI image so that
    the CSF can be roughly identifiable.

TLDR: the -cmass option is off by default because it’s not necessary in the common case where your anatomical and EPI volumes start off somewhat close to each other. If you wish to use this option, you can simply add “-align_opts_aea -giant_move” to your afni_proc.py script. See here.

To hopefully alleviate exasperation in searching for help pages, the help for all AFNI programs is available online here. Or can be seen by running the program with no options or a -help.

If you’re still running into issues feel free to post images of your alignment and your afni_proc.py command either here or over on the AFNI message board and we can try to troubleshoot that.

1 Like

Hello,

Thank you very much for your explainations, and FOR THE LINK.
This is gonna be so usefull !!!

The cmass was from a warning, and looking at my images, they were not perfectly aligned. I hope big_move will do the job.

Thanks

By not perfectly aligned, do you mean they were far off, or close but not quite?
The “far off” case can use something like @pmolfese’s suggestion of -giant_move.
The “close but not quite” case is usually due to either EPI distortion or to CSF. Distortion needs distortion correction data.
However with extra-cranial CSF, sometimes the results can look a little misaligned, but in reality they are very well aligned. If CSF pockets are between the brain and the skull, that will show brightly in the EPI, and it should indeed be sticking outside the aligned anatomy brain. For this case, you should actually visually compare the anatomy with its skull (fina anat_w_skulll dataset) against the final EPI base.

1 Like

Thanks for your replies.

Indeed rickr, it isn’t far off, but some pockets are cutting brain voxels, and some skull is within the mask.
I will follow your advice to see it is really missaligned or if I can carry on with the data I have already.

Thanks again