code: def get_center_of_mass(image):
      
      if image.pixeltype != 'float':
          image = image.clone('float')
  
      libfn = utils.get_lib_fn('centerOfMass%s' % image._libsuffix)
      com = libfn(image.pointer)
  
      return tuple(com)
docs: Compute an image center of mass in physical space which is defined 
      as the mean of the intensity weighted voxel coordinate system.
  
      ANTsR function: `getCenterOfMass`
      
      Arguments
      ---------
      image : ANTsImage
          image from which center of mass will be computed
  
      Returns
      -------
      scalar
  
      Example
      -------
      >>> fi = ants.image_read( ants.get_ants_data("r16"))
      >>> com1 = ants.get_center_of_mass( fi )
      >>> fi = ants.image_read( ants.get_ants_data("r64"))
      >>> com2 = ants.get_center_of_mass( fi )