docstr: This function calculates the outline error as defined in Wack et al.
  
  :return: OER: Outline error ratio, OEFP: number of false positive
      outlier error voxels, OEFN: number of false negative outline error
      elements
docstr_tok: ["This","function","calculates","the","outline","error","as","defined","in","Wack","et","al",".",":","return",":","OER",":","Outline","error","ratio",",","OEFP",":","number","of","false","positive","outlier","error","voxels",",","OEFN",":","number","of","false","negative","outline","error","elements"]
code: def outline_error(self):
      """
      This function calculates the outline error as defined in Wack et al.
  
      :return: OER: Outline error ratio, OEFP: number of false positive
          outlier error voxels, OEFN: number of false negative outline error
          elements
      """
      TPcMap, _, _ = self.connected_errormaps()
      OEFMap = self.ref - np.multiply(TPcMap, self.seg)
      unique, counts = np.unique(OEFMap, return_counts=True)
      # print(counts)
      OEFN = counts[unique == 1]
      OEFP = counts[unique == -1]
      OEFN = 0 if len(OEFN) == 0 else OEFN[0]
      OEFP = 0 if len(OEFP) == 0 else OEFP[0]
      OER = 2 * (OEFN + OEFP) / (self.n_pos_seg() + self.n_pos_ref())
      return OER, OEFP, OEFN
  
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 42 for calling the PairwiseMeasures obj's underlying member method code with example usage: obj.outline_error() and returns: OER,  OEFP,  OEFN