Dealing with Overlapping ROIs (3dcalc, 3dNetCorr)

I have 18 ROI centers. I use 3dUndump to make 18 ROI masks of radius 10 (giving values 1-18). Because of the large size, there are overlaps. So when i combine them using 3dcalc using formula (a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r) and then do 3dNetCorr, i end up with 20 columns with codes 1-18 , 25 and 28. Can you suggest how to deal with this? I would still want 18 ROIs in the end. My guess is that there is overlap and when i do 3dcalc the values get added. From the images i can see some of the ROIs overlapping.


Hi, Prateek-

How about make a text file with all xyz coords (first 3 cols) and ROI values (4th col), called file_xyz_and_values.txt, which could look like, say:

-17  47 -48 1
 47 -27  -7 2
 -7 -80 -12 35
 52 -19 -29 4
-29   5 -12 12

Then, 3dUndump that text file, and you can see the preferences given by ordering in cases of overlap:

3dUndump                              \
    -overwrite                        \
    -xyz                              \
    -orient RAI                       \
    -prefix M2.nii.gz                 \
    -master REFERENCE_DSET     \
    -datum byte                       \
    -srad 10                          \

… so you can control which seed/ROI “wins” in cases of overlap?