docstr: This functions calculates the average symmetric distance and the
  hausdorff distance between a segmentation and a reference image
  
  :return: hausdorff distance and average symmetric distance
docstr_tok: ["This","functions","calculates","the","average","symmetric","distance","and","the","hausdorff","distance","between","a","segmentation","and","a","reference","image",":","return",":","hausdorff","distance","and","average","symmetric","distance"]
code: def measured_distance(self):
      """
      This functions calculates the average symmetric distance and the
      hausdorff distance between a segmentation and a reference image
  
      :return: hausdorff distance and average symmetric distance
      """
      (
          ref_border_dist,
          seg_border_dist,
          ref_border,
          seg_border,
      ) = self.border_distance()
      average_distance = (
          np.sum(ref_border_dist) + np.sum(seg_border_dist)
      ) / (np.sum(self.ref + self.seg))
      hausdorff_distance = np.max(
          [np.max(ref_border_dist), np.max(seg_border_dist)]
      )
      return hausdorff_distance, average_distance
  
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 36 for calling the PairwiseMeasures obj's underlying member method code with example usage: obj.measured_distance() and returns: hausdorff_distance,  average_distance