# compute Distance center of barbell 3dCM -Dcent maskset.nii.gz # add the output manually or append it to centers.txt # use the centers to make a new dataset of spheres # the distance center here overlays the Icent, internal center, almost # exactly (difference - Icent was computed on upsampled resolution) 3dUndump -srad 4.000000 -xyz -master maskset_rs_RAI.nii.gz -datum byte \ -prefix __tt_spheres_coords.nii.gz -overwrite centers.txt # make dataset smaller to compute surfaces faster 3dAutobox -noclust -prefix spheres_coords2.nii.gz -npad 1 \ -overwrite __tt_spheres_coords.nii.gz # show in separate colors 3drefit -cmap INT_CMAP spheres_coords2.nii.gz # create surfaces - one way to show the centers mkdir surfs cd surfs/ IsoSurface -isorois+dsets -input ../spheres_coords2.nii.gz -o center.gii suma -onestate -i ../anat.gii *.gii cd .. # can also create rounded icosahedrons at coords, which are smoother # cat centers.txt tcsh -x center_ico.tcsh suma -onestate -i ico_combined.gii anat.gii suma -onestate -i ico_?.gii anat.gii