Package org.itk.simple
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 Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::OtsuMultipleThresholdsImageFilter::OtsuMultipleThresholdsImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
OtsuMultipleThresholdsImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::OtsuMultipleThresholdsImageFilter::~OtsuMultipleThresholdsImageFilter() DestructorImage itk::simple::OtsuMultipleThresholdsImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected void
finalize()
protected static long
short
uint8_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 classlong
uint32_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfHistogramBins() const Set/Get the number of histogram bins.short
uint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfThresholds() const Set/Get the number of thresholds.boolean
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.std::vector<double> itk::simple::OtsuMultipleThresholdsImageFilter::GetThresholds() const Get the computed threshold.boolean
bool itk::simple::OtsuMultipleThresholdsImageFilter::GetValleyEmphasis() const Set/Get the use of valley emphasis.void
Self& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOff()void
Self& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOn() Set the value of ReturnBinMidpoint to true or false respectfully.void
setLabelOffset
(short LabelOffset) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetLabelOffset(uint8_t LabelOffset) Set/Get the offset which labels have to start from.void
setNumberOfHistogramBins
(long NumberOfHistogramBins) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins) Set/Get the number of histogram bins.void
setNumberOfThresholds
(short NumberOfThresholds) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfThresholds(uint8_t NumberOfThresholds) Set/Get the number of thresholds.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.void
setValleyEmphasis
(boolean ValleyEmphasis) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetValleyEmphasis(bool ValleyEmphasis) Set/Get the use of valley emphasis.protected static long
toString()
std::string itk::simple::OtsuMultipleThresholdsImageFilter::ToString() const Print ourselves outvoid
Self& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOff()void
Self& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOn() Set the value of ValleyEmphasis to true or false respectfully.Methods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, 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
-
OtsuMultipleThresholdsImageFilter
protected OtsuMultipleThresholdsImageFilter(long cPtr, boolean cMemoryOwn) -
OtsuMultipleThresholdsImageFilter
public OtsuMultipleThresholdsImageFilter()itk::simple::OtsuMultipleThresholdsImageFilter::OtsuMultipleThresholdsImageFilter() Default Constructor that takes no arguments and initializes default parameters
-
-
Method Details
-
getCPtr
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::OtsuMultipleThresholdsImageFilter::~OtsuMultipleThresholdsImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setNumberOfThresholds
public void setNumberOfThresholds(short NumberOfThresholds) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfThresholds(uint8_t NumberOfThresholds) Set/Get the number of thresholds. Default is 1. -
getNumberOfThresholds
public short getNumberOfThresholds()uint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfThresholds() const Set/Get the number of thresholds. Default is 1. -
setLabelOffset
public 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. -
getLabelOffset
public short getLabelOffset()uint8_t itk::simple::OtsuMultipleThresholdsImageFilter::GetLabelOffset() const Set/Get the offset which labels have to start from. Default is 0. -
setNumberOfHistogramBins
public void setNumberOfHistogramBins(long NumberOfHistogramBins) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetNumberOfHistogramBins(uint32_t NumberOfHistogramBins) Set/Get the number of histogram bins. Default is 128. -
getNumberOfHistogramBins
public long getNumberOfHistogramBins()uint32_t itk::simple::OtsuMultipleThresholdsImageFilter::GetNumberOfHistogramBins() const Set/Get the number of histogram bins. Default is 128. -
setValleyEmphasis
public void setValleyEmphasis(boolean ValleyEmphasis) Self& itk::simple::OtsuMultipleThresholdsImageFilter::SetValleyEmphasis(bool ValleyEmphasis) Set/Get the use of valley emphasis. Default is false. -
valleyEmphasisOn
public void valleyEmphasisOn()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOn() Set the value of ValleyEmphasis to true or false respectfully. -
valleyEmphasisOff
public void valleyEmphasisOff()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ValleyEmphasisOff() -
getValleyEmphasis
public boolean getValleyEmphasis()bool itk::simple::OtsuMultipleThresholdsImageFilter::GetValleyEmphasis() const Set/Get the use of valley emphasis. Default is false. -
setReturnBinMidpoint
public 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. -
returnBinMidpointOn
public void returnBinMidpointOn()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOn() Set the value of ReturnBinMidpoint to true or false respectfully. -
returnBinMidpointOff
public void returnBinMidpointOff()Self& itk::simple::OtsuMultipleThresholdsImageFilter::ReturnBinMidpointOff() -
getReturnBinMidpoint
public 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. -
getThresholds
std::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. -
getName
std::string itk::simple::OtsuMultipleThresholdsImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::OtsuMultipleThresholdsImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::OtsuMultipleThresholdsImageFilter::Execute(const Image &image1) Execute the filter on the input image
-