Euclidean distance between two volumetric ROIs

Hi all,

I have preprocessed a set of resting state images using AFNI ver 21.2.04 (‘Nerva’). The anatomical images were sent through SSwarper and recon-all and my proc.py script was modeled after example 11. I am using a functional atlas that consists of 90 ROIs in MNI space. I was hoping to calculate some QC-FC metrics as described in Ciric et al (2017) to evaluate the distance-dependent effects of motion on functional connectivity before and after denoising. To do this, a distance matrix is created by calculating the euclidean distance between the centers of mass of all node pairs. Using the 3dCM command I was able to extract the center of mass of each ROI. For calculation of the euclidean distance, I see the SurfDist command, however, my data is volumetric rather than surface-based. Is there any other function in AFNI that can be used to calculate euclidean distance between each ROI pair center of mass in volumetric space?

Thanks!
Jenna

Hi Jenna,

It would not be too difficult to script such a thing, but for convenience, I added a -show_distmat option to 1d_tool.py.
The input would be a file of coordinates (or motion parameters or other vectors), one vector per row. The output would be an NROW x NROW matrix of pairwise distances.

This is not yet built, but should be available later today.

  • rick

Hi Rick,

Great! Thank you for adding the option!

Best,
Jenna

Hi Jenna,

This update should be available now. Just let me know if you have questions.

  • rick