niftynet.evaluation.pairwise_measures module¶
-
class
PairwiseMeasures
(seg_img, ref_img, measures=None, num_neighbors=8, pixdim=(1, 1, 1), empty=False, list_labels=None)[source]¶ Bases:
object
-
check_binary
()[source]¶ Checks whether self.seg and self.ref are binary. This is to enable measurements such as ‘false positives’, which only have meaning in the binary case (what is positive/negative for multiple class?)
-
n_pos_ref
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
n_neg_ref
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
n_pos_seg
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
n_neg_seg
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
fp
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
fn
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
tp
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
tn
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
n_intersection
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
n_union
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
negative_predictive_values
()[source]¶ This function calculates the negative predictive value ratio between the number of true negatives and the total number of negative elements
Returns:
-
dice_score
()[source]¶ This function returns the dice score coefficient between a reference and segmentation images
Returns: dice score
-
intersection_over_union
()[source]¶ This function the intersection over union ratio - Definition of jaccard coefficient
Returns:
-
jaccard
()[source]¶ This function returns the jaccard coefficient (defined as intersection over union)
Returns: jaccard coefficient
-
informedness
()[source]¶ This function calculates the informedness between the segmentation and the reference
Returns: informedness
-
com_dist
()[source]¶ This function calculates the euclidean distance between the centres of mass of the reference and segmentation.
Returns:
-
com_ref
()[source]¶ This function calculates the centre of mass of the reference segmentation
Returns:
-
vol_diff
()[source]¶ This function calculates the ratio of difference in volume between the reference and segmentation images.
Returns: vol_diff
-
border_distance
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
measured_distance
()[source]¶ This functions calculates the average symmetric distance and the hausdorff distance between a segmentation and a reference image
Returns: hausdorff distance and average symmetric distance
-
measured_average_distance
()[source]¶ This function returns only the average distance when calculating the distances between segmentation and reference
Returns:
-
measured_hausdorff_distance
()[source]¶ This function returns only the hausdorff distance when calculated the distances between segmentation and reference
Returns:
-
connected_elements
()[source]¶ This function returns the number of FP FN and TP in terms of connected components.
Returns: Number of true positive connected components, Number of false positives connected components, Number of false negatives connected components
-
connected_errormaps
¶ this provides a decorator to cache function outputs to avoid repeating some heavy function computations
-
outline_error
()[source]¶ This function calculates the outline error as defined in Wack et al.
Returns: OER: Outline error ratio, OEFP: number of false positive outlier error voxels, OEFN: number of false negative outline error elements
-