The module provides algorithms to perform a binary segmentation of an image stack into foreground and background objects. The output of the module is a label image. The algorithms work best if multiple small objects need to be segmented before a slowly varying background.Some of the thresholding algorithms require larger amounts of main memory for their operation (Niblack, Oberlaender, Mardia-Hainsworth). Floating point resolution buffers will be allocated based on the input image size.
Data [required]
Connect an image data set for which the threshold operation should be performed.
Method
The choice of the algorithm will depend on the statistics of the input data. Select one of the provided algorithms based on the resulting segmentation quality and the requirements of memory and processing time.
- Niblack implements local thresholding based on the mean and the variance of the data. Set the ObjectSize port to a size that will fully cover each object together with its immediate background. The provided parameter Lambda selects the threshold based on the variance around the mean. A smaller Lambda will result in a lower number of objects being selected. The value of the Normalization port can be left to half the input data range. Its specific value does not influence the result substantially.
- Oberlaender implements local thresholding based on an initial sigmoidal normalization of the image intensities. Mean and variance of the normalized image are used during the final segmentation. Set the ObjectSize port to a size that will fully cover each object together with its immediate background. The Lambda parameter is a multiplicative factor used during the normalization and affects the shift of the sigmoidal function relative to the local mean. Larger values of Lambda will result in in lower number of foreground objects. Adjust the value range of the slider to be able to select values outside the predefined range.
- Mardia-Hainsworth implements an iterative algorithm for local threshold segmentation. The algorithm assumes that the voxel belonging to foreground and background follow two normal distributions with the same variance. The FilterMask parameter is used to smooth the result at each iteration. The algorithm might fail if the assumption of equal variance for foreground and background is not met.
Backward compatibility: this module had originally three additional algorithms. They are deprecated and could safely be replaced by other modules:
- Hysteresis can be replaced by the module Hysteresis Thresholding;
- Otsu can be replaced by the module Auto Thresholding with Factorization criterion;
- IsoData will be replaced by a new IsoData criterion in the module Auto Thresholding module.
Export
If the algorithm selected generates intermediate volumes they can be exported into the project view. Alternative segmentation algorithm might be based on the generated data.ObjectSize
This port allows the user to specify the size of the objects that are present in the image. By default, 1/5-th of the dimensions of the image are used. For the Mardia-Hainsworth algorithm instead a filter size (3x3x3) is used which does not depend on the object size.Lambda
Used as heuristic values by the Niblack and Oberlaender algorithms only. The default values for Niblack is -0.2, for Oberlaender a value of 0.75 is set. Adjust these values to influence the size and number of foreground objects segmented. The values can savely be adjusted outside the default range provided by the slider.Normalization
This value is used for the Niblack algorithm only. Its value is set to a value at half the data range. The algorithm is relatively insensity to changes in this value.