class_docstr: Computes the centers of mass of each component in the reference standard
class_docstr_tok: ["Computes","the","centers","of","mass","of","each","component","in","the","reference","standard"]
docstr: :param seg: numpy array with binary mask from inferred segmentation
  :param ref: numpy array with binary mask from reference segmentation
  :return: dict of centers of mass in each axis
docstr_tok: [":","param","seg",":","numpy","array","with","binary","mask","from","inferred","segmentation",":","param","ref",":","numpy","array","with","binary","mask","from","reference","segmentation",":","return",":","dict","of","centers","of","mass","in","each","axis"]
code: def metric_from_binarized(self, seg, ref):
      """
      :param seg: numpy array with binary mask from inferred segmentation
      :param ref: numpy array with binary mask from reference segmentation
      :return: dict of centers of mass in each axis
      """
      return {
          d: "com_ref_" + x
          for d, x in zip("XYZ", ndimage.center_of_mass(ref))
      }
  
file_path: NiftyNet/niftynet/contrib/evaluation/segmentation_evaluations.py
imports: import os
  import numpy
  import pandas
  from scipy import ndimage
  from niftynet.evaluation.base_evaluations import BaseEvaluation
  from niftynet.evaluation.segmentation_evaluations import PerComponentEvaluation, connected_components, cached_label_binarizer, union_of_seg_for_each_ref_cc
  from niftynet.io.misc_io import save_data_array
label_desc: Use image node_id 1 for calling the com_ref obj's underlying member method code with example usage: obj.metric_from_binarized(seg, ref) and returns: unknown