Skip to main content

Compare Masks

The Compare Masks tool calculates overlap statistics between two mask objects. This is useful for evaluating segmentation accuracy, comparing different segmentation methods, or assessing inter-observer variability.

Accessing the Tool

  1. Navigate to the Measure tab in the ribbon
  2. Click the Compare Masks button in the Statistics section

Overview

Compare the overlap and differences between two masks using statistical measures.


User Interface

Description

The description panel explains the available metrics:

  • Dice coefficient (0 to 1): Measures spatial overlap by computing twice the intersection volume divided by the sum of both mask volumes. A value of 0 indicates no overlap, while 1 represents perfect overlap.

  • False negative error (0 to 1): Represents the proportion of target mask voxels that are missing in the source mask (under-segmentation). A value of 0 means no missing voxels, while 1 means all target voxels are missing.

  • False positive error (0 to 1): Represents the proportion of voxels present in the source mask but absent in the target mask (over-segmentation). A value of 0 means no extra voxels, while 1 means all source voxels are extra.

  • Volume similarity (-2 to 2): Measures the relative volume difference between the source and target masks. A value of 0 indicates identical volumes, while values approaching -2 or 2 indicate extreme volume differences.

Mask Objects

ControlDescription
SourceSelect the first mask (typically the test segmentation)
TargetSelect the second mask (typically the reference/ground truth)

Overlap Statistics Table

Displays the calculated overlap metrics:

MetricRangeInterpretation
Dice coefficient0–11 = perfect overlap
False negative error0–10 = no under-segmentation
False positive error0–10 = no over-segmentation
Volume similarity-2 to 20 = identical volumes

Individual Label Overlap Statistics

For multi-label masks, this table shows overlap statistics calculated separately for each label value present in both masks.

ColumnDescription
Source MaskName of source mask
Target MaskName of target mask
LabelLabel value
Dice coefficientPer-label Dice score
False negative errorPer-label false negative
False positive errorPer-label false positive
Volume similarityPer-label volume similarity

Toolbar

ButtonDescription
Export...Export statistics to a file
UpdateRecalculate statistics

Metrics Explained

Dice Coefficient

The Dice coefficient (also known as Dice Similarity Coefficient or F1 score) measures the overlap between two segmentations:

Dice=2×ABA+B\text{Dice} = \frac{2 \times |A \cap B|}{|A| + |B|}

Where:

  • AB|A \cap B| is the intersection volume (voxels in both masks)
  • A|A| and B|B| are the volumes of each mask

Interpretation:

  • 1.0 = Perfect overlap
  • 0.8–1.0 = Excellent agreement
  • 0.6–0.8 = Good agreement
  • < 0.6 = Poor agreement

False Negative Error

Measures under-segmentation—how much of the target is missed by the source:

FNE=BAB\text{FNE} = \frac{|B \setminus A|}{|B|}

Where BA|B \setminus A| is the volume in target but not in source.

False Positive Error

Measures over-segmentation—how much extra volume the source includes:

FPE=ABA\text{FPE} = \frac{|A \setminus B|}{|A|}

Where AB|A \setminus B| is the volume in source but not in target.

Volume Similarity

Measures relative volume difference:

VS=2×ABA+B\text{VS} = 2 \times \frac{|A| - |B|}{|A| + |B|}

Workflow

Basic Comparison

  1. Ensure at least two masks exist in the project
  2. Open the Compare Masks tool
  3. Select Source mask (test segmentation)
  4. Select Target mask (reference/ground truth)
  5. Click Update to calculate statistics
  6. Review overlap metrics in the table

Multi-Label Comparison

  1. Create or load multi-label masks
  2. Open the Compare Masks tool
  3. Select source and target masks
  4. View overall statistics and per-label breakdown
  5. Identify which labels have good/poor agreement

Use Cases

Segmentation Validation

Compare automated segmentation results against manual ground truth to evaluate algorithm performance.

Inter-Observer Variability

Compare segmentations created by different operators to assess consistency.

Algorithm Comparison

Compare results from different segmentation algorithms on the same data.

Longitudinal Analysis

Compare segmentations from different time points after registration.


Export

Click Export... to save comparison statistics to a file for reporting or further analysis.