Usage: 3dCM [options] dset
Output = center of mass of dataset, to stdout.
    Note: by default, the output is (x,y,z) values in DICOM
          coordinates.  But as of Dec, 2016, there are now
          command line switches for other options (see -local*

  -mask mset   Means to use the dataset 'mset' as a mask:
                 Only voxels with nonzero values in 'mset'
                 will be averaged from 'dataset'.  Note
                 that the mask dataset and the input dataset
                 must have the same number of voxels.
  -automask    Generate the mask automatically.
  -set x y z   After computing the CM of the dataset, set the
                 origin fields in the header so that the CM
                 will be at (x,y,z) in DICOM coords.
  -local_ijk   Output values as (i,j,k) in local orienation.
  -roi_vals v0 v1 v2 ... : Compute center of mass for each blob
                           with voxel value of v0, v1, v2, etc.
                           This option is handy for getting ROI
                           centers of mass.
  -all_rois     Don't bother listing the values of ROIs you want
                the program will find all of them and produce a
                full list.
  -Icent Compute Internal Center. For some shapes, the center can
          lie outside the shape. This option finds the location
          of the center of a voxel closest to the center of mass
          It will be the same or similar to a center of mass
          if the CM lies within the volume. It will lie necessarily
          on an edge voxel if the CMass lies outside the volume
  -Dcent Compute Distance Center, i.e. the center of the voxel
          that has the shortest average distance to all the other
          voxels. This is much more computational expensive than
          Cmass or Icent centers
  NOTE: Masking options are ignored with -roi_vals and -all_rois

++ Compile date = Aug 10 2020 {AFNI_20.2.11:linux_ubuntu_16_64}