Number of masks depends on the number of subjects

I’m trying to do seed correlation analysis. I have .nii files of 20 subjects each of controls and patients. While creating a spherical mask do I need to create a mask for each subject? or can I create a mask from any template and then use the same for all subjects? If just one mask can work on all subjects, then what is the best master dataset for that? i.e., suppose I want to extract time series values for Left Amygdala, then in total, I’d be creating 40 masks (1 for each subject) or just 1 for all?

You could do this either in native space of the subject or in a standard template space, and you could use either spheres or atlas regions. If you are using spheres and you would like to do this in standard space, transform the coordinate from the standard space back to the original native space and create your spheres there. If you are using atlas regions, transform the regions back to the natives space. There are instructions on transforming datasets in the ROI class documentation linked below. The simplest solution is to do this all on datasets transformed to a standard space, then just place your regions there. All should work similarly.

https://afni.nimh.nih.gov/pub/dist/edu/latest/afni_handouts/afni11_roi.pdf

Well, I only have the subjects’ data in MNI space which I believe couldn’t be converted back to the original natives’ space without other information (anat data etc., but I am not very sure at this point). So I created spherical regions using:

echo “23.23 -4.37 -18.13” | 3dUndump -prefix sub1_masks/subX_rAmygdala -master subX+tlrc. -srad 3 -xyz -

where X=1…40.

You mentioned, “The simplest solution is to do this all on datasets transformed to a standard space, then just place your regions there.” So, regions created in a standard space will work (whether using a template as master or subject’s data as master as long as they are in the same space as I want the region to be), right?

I have gone through the pdf at the link already. While it does help to know about different methods to create ROIs and extract data but it doesn’t talk about the procedure. But since you mentioned to do all this in natives’ space, it makes sense to create regions for all subjects differently (i.e. using subjects’ data as master). I hope there is no transformation of space involved.

Please correct me if I am wrong in doing this. Much appreciated.

Yes, you can use the 3dUndump command to put the spheres and use a single set of coordinates for all subjects if they are all in the same space - standard or in a particular subject’s space. Be careful there of the coordinate order; the default xyz is in the storage order of the dataset. If one dataset is stored in a different order, you may accidentally put the sphere somewhere else entirely. I recommend using the “-orient” option there to specify something like RAI or LPI order coordinates, “-orient RAI”. Either using a standard space or each subject’s native space is correct.