From Ohm

Thresholding with ITK

Simple thresholding example:

The threshold filter compares the input image with a threshold and replaces the image pixels which are below the threshold with an outside color (black by default).

// create threshold filter
typedef itk::ThresholdImageFilter<Image3DType> ThresholdImageFilterType;
ThresholdImageFilterType::Pointer thresholdFilter = ThresholdImageFilterType::New();

// filter settings

// connect input of filter to output of reader

// pull the pipeline at its end
ThresholdBefore ThresholdAfter
ThresholdBefore3D ThresholdAfter3D

Histogram-based thresholding example:

Other intensity filters:

Retrieved from

Page last modified on November 16, 2020, at 11:39 PM