docstr: This function calculates the euclidean distance between the centres
  of mass of the reference and segmentation.
  
  :return:
docstr_tok: ["This","function","calculates","the","euclidean","distance","between","the","centres","of","mass","of","the","reference","and","segmentation",".",":","return",":"]
code: def com_dist(self):
      """
      This function calculates the euclidean distance between the centres
      of mass of the reference and segmentation.
  
      :return:
      """
      if self.flag_empty:
          return -1
      com_ref = ndimage.center_of_mass(self.ref)
      com_seg = ndimage.center_of_mass(self.seg)
      com_dist = np.sqrt(
          np.dot(
              np.square(np.asarray(com_ref) - np.asarray(com_seg)),
              np.square(self.pixdim),
          )
      )
      return com_dist
  
imports: from __future__ import absolute_import, print_function
  import numpy
  from scipy import ndimage
  from niftynet.utilities.util_common import MorphologyOps, CacheFunctionOutput
label_desc: Use image node_id 30 for calling the PairwiseMeasures obj's underlying member method code with example usage: obj.com_dist() and returns: com_dist, unknown