Average calculation over whole ROI from template


I have some questions about using 3dmaskave or 3dROIstats

  1. If I want to compute the average time series of epi_r1+orig over ROI1+orgi, I can use
    3dmaskave -mask ROI1+orig epi_r1+orig
    But If I would like to do same thing over whole ROI from the atlas (for example, MNIa_caez_ml_18+tlrc, or TTatlas+tlrc),
    do I need to do it in the ‘for loop’ from ROI1 to ROIlast? or, is there any other way to do it?

  2. When I see my statistical results on the AFNI GUI, and I checked the location of peak voxel by using ‘whereami’ function.
    My result is already spatially normalized to MNI space. How can ‘whereami’ provide ROI name from different template, different atlas?
    Is it automatically transformed to several space and provide ROI names?

  3. As I mentioned in 2), my epi image is already spatially normalized to MNI space. How can I compute the average time series of epi from the MNI-anat space or TLRC space (for example, MNIa_caez_ml_18+tlrc, or TTatlas+tlrc template)? Do I need to transform my whole epi time series to certain space? or can I transform the template to MNI space and use this MNI-spaced template for 3dmaskave -mask?



Hi Jung-

  1. You can use 3dROIstats to get values for EVERY single ROI in your atlas on a given dataset.

  2. whereami uses not-so-secret transforms to convert from one space to another.

  3. I would probably convert your ROI to different spaces using a variety of options. I believe there’s a function in whereami’s command line (-show_chain) that would be of help. Daniel Glen may have more suggestions


For 2),

Can I ask you what kind of registration is used?
For example, if I have a template on Talairach space (Each ROI would has an integer value for labeling) and try to transform this template to MNI space, I assume that this MNI-registered template would not have integer value(maybe it would be floating number) to represent ROIs since we performed registration.

I need MNI-registered template with integer value labeling. Could you recommend a way to do it?

We’re talking in pretty hypotheticals, so feel free to list what atlas and templates you’re using for more directed help. But in the abstract, you could use auto_warp.py[/url] to do a combination of linear and nonlinear from one template to another. Then when you apply that combined warp ([url=https://afni.nimh.nih.gov/pub/dist/doc/program_help/3dNwarpApply.html]3dNwarpApply) to your atlas, you specify an interpolation of NN (nearest neighbors), which would preserve the ROI values.

I need to transform the following two atlas to MNI space(I am using 2.5mm^3 resolution MNI mask which I resampled for my data) .

CA_ML_18_MNIA MNI_ANAT /home/afniHQ/afni.build/pub.dist/bin/linux_ubuntu_16_64//MNIa_caez_ml_18+tlrc Macro Labels (N27)
TT_Daemon TLRC /home/afniHQ/afni.build/pub.dist/bin/linux_ubuntu_16_64//TTatlas+tlrc Talairach-

The first one should now be included in the standard binary distribution as MNI_caez_ml_18+tlrc. (Note the name starts with “MNI”, not “MNIa”.

The TTatlas+tlrc atlas regions can be transformed using a variety of methods, but all of them, like the atlas, are approximate.

As my understanding, MNIa is the shifted version of MNI.

When I see my statistical results on the AFNI GUI, and I checked the location of peak voxel by using ‘whereami’ function.
From this, ROI name is given according to MNIa atlas not MNI atlas.

  1. Why do we need MNIa instead of MNI atlas in the ‘whereami’ on the AFNI GUI?

  2. If I use ‘MNI_caez_ml_18+tlrc’ for 3dROIstats to extract the average time series over ROI_01, this ROI_01 would be captured at the same region which defined from ‘MNIa_caez_ml_18+tlrc’ even though these two atlas does not have same center?

  1. MNIa is the original version from the Eickhoff-Zilles SPM anatomy toolbox. You don’t really need it. If you would like a different list to appear in whereami output, you can set the atlases and the order with the AFNI environment variable AFNI_ATLAS_LIST. This can be optionally set to “ALL” to show all available atlases. Keep in mind that will use more memory.

  2. The MNI version is a shifted version, computed by changing the origin and without interpolation. The whereami interface does this transformation behind the scenes when computing the coordinates. By default, the list of coordinates shown in the whereami report is TLRC,MNI,MNI_ANAT. You can control this list also with another AFNI environment variable, AFNI_TEMPLATE_SPACE_LIST.

Does Afni folder have ‘MNI_caez_ml_18+tlrc’?

In my AFNI folder, there is only ‘MNIa_caez_ml_18+tlrc’, I can’t find ‘MNI_caez_ml_18+tlrc’.

That was a recent change. What version of AFNI are you running? Use “afni -ver” to find out.