Class OtsuMultipleThresholdsImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.OtsuMultipleThresholdsImageFilter
Threshold an image using multiple Otsu Thresholds.
This filter creates a labeled image that separates the input image
into various classes. The filter computes the thresholds using the OtsuMultipleThresholdsCalculator and applies those thresholds to the input image using the ThresholdLabelerImageFilter . The NumberOfHistogramBins and NumberOfThresholds can be set for the
Calculator. The LabelOffset can be set for the ThresholdLabelerImageFilter .
This filter also includes an option to use the valley emphasis
algorithm from H.F. Ng, "Automatic thresholding for defect
detection", Pattern Recognition Letters, (27): 1644-1649, 2006. The
valley emphasis algorithm is particularly effective when the object to
be thresholded is small. See the following tests for examples:
itkOtsuMultipleThresholdsImageFilterTest3 and
itkOtsuMultipleThresholdsImageFilterTest4 To use this algorithm,
simple call the setter: SetValleyEmphasis(true) It is turned off by
default.
See:
 ScalarImageToHistogramGenerator
 OtsuMultipleThresholdsCalculator
 ThresholdLabelerImageFilter
 itk::simple::OtsuMultipleThresholds for the procedural interface
 itk::OtsuMultipleThresholdsImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkOtsuMultipleThresholdsImageFilter.h
- 
Field SummaryFields inherited from class org.itk.simple.ProcessObjectswigCMemOwn
- 
Constructor SummaryConstructorsModifierConstructorDescriptionitk::simple::OtsuMultipleThresholdsImageFilter::OtsuMultipleThresholdsImageFilter() Default Constructor that takes no arguments and initializes default parametersprotectedOtsuMultipleThresholdsImageFilter(long cPtr, boolean cMemoryOwn) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete()virtual itk::simple::OtsuMultipleThresholdsImageFilter::~OtsuMultipleThresholdsImageFilter() DestructorImage itk::simple::OtsuMultipleThresholdsImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected voidfinalize()protected static longshortuint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetLabelOffset() const Set/Get the offset which labels have to start from.getName()std::string itk::simple::OtsuMultipleThresholdsImageFilter::GetName() const Name of this classlonguint32_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfHistogramBins() const Set/Get the number of histogram bins.shortuint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfThresholds() const Set/Get the number of thresholds.booleanbool itk::simple::OtsuMultipleThresholdsImageFilter::GetReturnBinMidpoint() const Should the threshold value be mid-point of the bin or the maximum? Default is to return bin maximum.std::vector<double> itk::simple::OtsuMultipleThresholdsImageFilter::GetThresholds() const Get the computed threshold.booleanbool itk::simple::OtsuMultipleThresholdsImageFilter::GetValleyEmphasis() const Set/Get the use of valley emphasis.voidSelf& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOff()voidSelf& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOn() Set the value of ReturnBinMidpoint to true or false respectfully.voidsetLabelOffset(short LabelOffset) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetLabelOffset(uint8_t LabelOffset) Set/Get the offset which labels have to start from.voidsetNumberOfHistogramBins(long NumberOfHistogramBins) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins) Set/Get the number of histogram bins.voidsetNumberOfThresholds(short NumberOfThresholds) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfThresholds(uint8_t NumberOfThresholds) Set/Get the number of thresholds.voidsetReturnBinMidpoint(boolean ReturnBinMidpoint) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetReturnBinMidpoint(bool ReturnBinMidpoint) Should the threshold value be mid-point of the bin or the maximum? Default is to return bin maximum.voidsetValleyEmphasis(boolean ValleyEmphasis) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetValleyEmphasis(bool ValleyEmphasis) Set/Get the use of valley emphasis.protected static longtoString()std::string itk::simple::OtsuMultipleThresholdsImageFilter::ToString() const Print ourselves outvoidSelf& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOff()voidSelf& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOn() Set the value of ValleyEmphasis to true or false respectfully.Methods inherited from class org.itk.simple.ImageFiltergetCPtr, swigReleaseMethods inherited from class org.itk.simple.ProcessObjectabort, addCommand, debugOff, debugOn, getCPtr, getDebug, getGlobalDefaultCoordinateTolerance, getGlobalDefaultDebug, getGlobalDefaultDirectionTolerance, getGlobalDefaultNumberOfThreads, getGlobalDefaultThreader, getGlobalWarningDisplay, getNumberOfThreads, getNumberOfWorkUnits, getProgress, globalDefaultDebugOff, globalDefaultDebugOn, globalWarningDisplayOff, globalWarningDisplayOn, hasCommand, removeAllCommands, setDebug, setGlobalDefaultCoordinateTolerance, setGlobalDefaultDebug, setGlobalDefaultDirectionTolerance, setGlobalDefaultNumberOfThreads, setGlobalDefaultThreader, setGlobalWarningDisplay, setNumberOfThreads, setNumberOfWorkUnits, swigRelease
- 
Constructor Details- 
OtsuMultipleThresholdsImageFilterprotected OtsuMultipleThresholdsImageFilter(long cPtr, boolean cMemoryOwn) 
- 
OtsuMultipleThresholdsImageFilterpublic OtsuMultipleThresholdsImageFilter()itk::simple::OtsuMultipleThresholdsImageFilter::OtsuMultipleThresholdsImageFilter() Default Constructor that takes no arguments and initializes default parameters
 
- 
- 
Method Details- 
getCPtr
- 
swigRelease
- 
finalizeprotected void finalize()- Overrides:
- finalizein class- ImageFilter
 
- 
deletepublic void delete()virtual itk::simple::OtsuMultipleThresholdsImageFilter::~OtsuMultipleThresholdsImageFilter() Destructor- Overrides:
- deletein class- ImageFilter
 
- 
setNumberOfThresholdspublic void setNumberOfThresholds(short NumberOfThresholds) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfThresholds(uint8_t NumberOfThresholds) Set/Get the number of thresholds. Default is 1.
- 
getNumberOfThresholdspublic short getNumberOfThresholds()uint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfThresholds() const Set/Get the number of thresholds. Default is 1.
- 
setLabelOffsetpublic void setLabelOffset(short LabelOffset) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetLabelOffset(uint8_t LabelOffset) Set/Get the offset which labels have to start from. Default is 0.
- 
getLabelOffsetpublic short getLabelOffset()uint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetLabelOffset() const Set/Get the offset which labels have to start from. Default is 0.
- 
setNumberOfHistogramBinspublic void setNumberOfHistogramBins(long NumberOfHistogramBins) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins) Set/Get the number of histogram bins. Default is 128.
- 
getNumberOfHistogramBinspublic long getNumberOfHistogramBins()uint32_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfHistogramBins() const Set/Get the number of histogram bins. Default is 128.
- 
setValleyEmphasispublic void setValleyEmphasis(boolean ValleyEmphasis) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetValleyEmphasis(bool ValleyEmphasis) Set/Get the use of valley emphasis. Default is false.
- 
valleyEmphasisOnpublic void valleyEmphasisOn()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOn() Set the value of ValleyEmphasis to true or false respectfully.
- 
valleyEmphasisOffpublic void valleyEmphasisOff()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOff()
- 
getValleyEmphasispublic boolean getValleyEmphasis()bool itk::simple::OtsuMultipleThresholdsImageFilter::GetValleyEmphasis() const Set/Get the use of valley emphasis. Default is false.
- 
setReturnBinMidpointpublic void setReturnBinMidpoint(boolean ReturnBinMidpoint) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetReturnBinMidpoint(bool ReturnBinMidpoint) Should the threshold value be mid-point of the bin or the maximum? Default is to return bin maximum.
- 
returnBinMidpointOnpublic void returnBinMidpointOn()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOn() Set the value of ReturnBinMidpoint to true or false respectfully.
- 
returnBinMidpointOffpublic void returnBinMidpointOff()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOff()
- 
getReturnBinMidpointpublic boolean getReturnBinMidpoint()bool itk::simple::OtsuMultipleThresholdsImageFilter::GetReturnBinMidpoint() const Should the threshold value be mid-point of the bin or the maximum? Default is to return bin maximum.
- 
getThresholdsstd::vector<double> itk::simple::OtsuMultipleThresholdsImageFilter::GetThresholds() const Get the computed threshold. This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
- 
getNamestd::string itk::simple::OtsuMultipleThresholdsImageFilter::GetName() const Name of this class- Overrides:
- getNamein class- ProcessObject
 
- 
toStringstd::string itk::simple::OtsuMultipleThresholdsImageFilter::ToString() const Print ourselves out- Overrides:
- toStringin class- ProcessObject
 
- 
execute
 
-