Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
mitk::BooleanOperation Namespace Reference

Namespace providing boolean set operations on multi-label segmentations. More...

Functions

Image::Pointer MITKSEGMENTATION_EXPORT GenerateUnion (const MultiLabelSegmentation *segmentation, MultiLabelSegmentation::LabelValueVectorType labelValues, std::function< void(float progress)> progressCallback=[](float) {})
 Computes the union (logical OR) of the specified label regions. More...
 
Image::Pointer MITKSEGMENTATION_EXPORT GenerateIntersection (const MultiLabelSegmentation *segmentation, MultiLabelSegmentation::LabelValueVectorType labelValues, std::function< void(float progress)> progressCallback=[](float) {})
 Computes the intersection (logical AND) of the specified label regions. More...
 
Image::Pointer MITKSEGMENTATION_EXPORT GenerateDifference (const MultiLabelSegmentation *segmentation, MultiLabelSegmentation::LabelValueType minuendLabelValue, const MultiLabelSegmentation::LabelValueVectorType subtrahendLabelValues, std::function< void(float progress)> progressCallback=[](float) {})
 Computes the difference (set subtraction) of label regions. More...
 

Detailed Description

Namespace providing boolean set operations on multi-label segmentations.

Provides functions to compute the union, intersection, or difference of label regions within a MultiLabelSegmentation. Each function returns a new binary image representing the result of the operation.

See also
MultiLabelSegmentation

Function Documentation

◆ GenerateDifference()

Image::Pointer MITKSEGMENTATION_EXPORT mitk::BooleanOperation::GenerateDifference ( const MultiLabelSegmentation *  segmentation,
MultiLabelSegmentation::LabelValueType  minuendLabelValue,
const MultiLabelSegmentation::LabelValueVectorType  subtrahendLabelValues,
std::function< void(float progress)>  progressCallback = [](float) {} 
)

Computes the difference (set subtraction) of label regions.

Subtracts the union of the subtrahend labels from the minuend label region.

Parameters
[in]segmentationPointer to the source multi-label segmentation.
[in]minuendLabelValueLabel value of the region to subtract from.
[in]subtrahendLabelValuesLabel values of the regions to subtract.
[in]progressCallbackOptional callback for progress reporting (0.0 to 1.0).
Returns
A new binary image representing the difference.
Precondition
segmentation must point to a valid instance.

◆ GenerateIntersection()

Image::Pointer MITKSEGMENTATION_EXPORT mitk::BooleanOperation::GenerateIntersection ( const MultiLabelSegmentation *  segmentation,
MultiLabelSegmentation::LabelValueVectorType  labelValues,
std::function< void(float progress)>  progressCallback = [](float) {} 
)

Computes the intersection (logical AND) of the specified label regions.

Parameters
[in]segmentationPointer to the source multi-label segmentation.
[in]labelValuesVector of label values whose regions are intersected.
[in]progressCallbackOptional callback for progress reporting (0.0 to 1.0).
Returns
A new binary image representing the intersection of all specified labels.
Precondition
segmentation must point to a valid instance.

◆ GenerateUnion()

Image::Pointer MITKSEGMENTATION_EXPORT mitk::BooleanOperation::GenerateUnion ( const MultiLabelSegmentation *  segmentation,
MultiLabelSegmentation::LabelValueVectorType  labelValues,
std::function< void(float progress)>  progressCallback = [](float) {} 
)

Computes the union (logical OR) of the specified label regions.

Parameters
[in]segmentationPointer to the source multi-label segmentation.
[in]labelValuesVector of label values whose regions are combined.
[in]progressCallbackOptional callback for progress reporting (0.0 to 1.0).
Returns
A new binary image representing the union of all specified labels.
Precondition
segmentation must point to a valid instance.