niftynet.contrib.evaluation.segmentation_evaluations module

This module holds built-in segmentation evaluations without tests

class com_ref(reader, app_param, eval_param)[source]

Bases: niftynet.evaluation.segmentation_evaluations.PerComponentEvaluation

Computes the centers of mass of each component in the reference standard

metric_from_binarized(seg, ref)[source]
  • seg – numpy array with binary mask from inferred segmentation
  • ref – numpy array with binary mask from reference segmentation

dict of centers of mass in each axis

class ErrorMapsCC(reader, app_param, eval_param)[source]

Bases: niftynet.evaluation.base_evaluations.BaseEvaluation

Create 3 maps of connected component detection: tpc_map shows each detected ref cc (having at least on seg cc that overlaps) and the union of all overlapping seg ccs fnc_map shows all ref ccs that were not detected fpc_map shows all seg ccs that did not overlap any ref ccs Note we currently arbitrarily limit image generation to binary problems

layer_op(subject_id, data)[source]

Perform one evaluation calculation for one subject :param subject_id: subject identifier string :param data: a data dictionary as built by ImageReader :return: a list of pandas.DataFrame objects