Class BinaryThresholdImageFilter


public class BinaryThresholdImageFilter extends ImageFilter
Binarize an input image by thresholding. This filter produces an output image whose pixels are either one of two values ( OutsideValue or InsideValue ), depending on whether the corresponding input image pixels lie between the two thresholds ( LowerThreshold and UpperThreshold ). Values equal to either threshold is considered to be between the thresholds. More precisely \\[ Output(x_i) = \\begin{cases} InsideValue & \\text{if \\f$LowerThreshold \\leq x_i \\leq UpperThreshold\\f$} \\\\ OutsideValue & \\text{otherwise} \\end{cases} \\] This filter is templated over the input image type and the output image type. The filter expect both images to have the same number of dimensions. The default values for LowerThreshold and UpperThreshold are: LowerThreshold = NumericTraits<TInput>::NonpositiveMin() ; UpperThreshold = NumericTraits<TInput>::max() ; Therefore, generally only one of these needs to be set, depending on whether the user wants to threshold above or below the desired threshold. See: itk::simple::BinaryThreshold for the procedural interface itk::BinaryThresholdImageFilter for the Doxygen on the original ITK class. C++ includes: sitkBinaryThresholdImageFilter.h
  • Constructor Details

    • BinaryThresholdImageFilter

      protected BinaryThresholdImageFilter(long cPtr, boolean cMemoryOwn)
    • BinaryThresholdImageFilter

      public BinaryThresholdImageFilter()
      itk::simple::BinaryThresholdImageFilter::BinaryThresholdImageFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(BinaryThresholdImageFilter obj)
    • swigRelease

      protected static long swigRelease(BinaryThresholdImageFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::BinaryThresholdImageFilter::~BinaryThresholdImageFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • setLowerThreshold

      public void setLowerThreshold(double LowerThreshold)
      Self& itk::simple::BinaryThresholdImageFilter::SetLowerThreshold(double LowerThreshold)
    • getLowerThreshold

      public double getLowerThreshold()
      double itk::simple::BinaryThresholdImageFilter::GetLowerThreshold() const
    • setUpperThreshold

      public void setUpperThreshold(double UpperThreshold)
      Self& itk::simple::BinaryThresholdImageFilter::SetUpperThreshold(double UpperThreshold) Set the thresholds. The default lower threshold is NumericTraits<InputPixelType>::NonpositiveMin() . The default upper threshold is NumericTraits<InputPixelType>::max . An exception is thrown if the lower threshold is greater than the upper threshold.
    • getUpperThreshold

      public double getUpperThreshold()
      double itk::simple::BinaryThresholdImageFilter::GetUpperThreshold() const Get the threshold values.
    • setInsideValue

      public void setInsideValue(short InsideValue)
      Self& itk::simple::BinaryThresholdImageFilter::SetInsideValue(uint8_t InsideValue) Set the "inside" pixel value. The default value NumericTraits<OutputPixelType>::max()
    • getInsideValue

      public short getInsideValue()
      uint8_t itk::simple::BinaryThresholdImageFilter::GetInsideValue() const Get the "inside" pixel value.
    • setOutsideValue

      public void setOutsideValue(short OutsideValue)
      Self& itk::simple::BinaryThresholdImageFilter::SetOutsideValue(uint8_t OutsideValue) Set the "outside" pixel value. The default value NumericTraits<OutputPixelType>::ZeroValue() .
    • getOutsideValue

      public short getOutsideValue()
      uint8_t itk::simple::BinaryThresholdImageFilter::GetOutsideValue() const Get the "outside" pixel value.
    • getName

      public String getName()
      std::string itk::simple::BinaryThresholdImageFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::BinaryThresholdImageFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image image1)
      Image itk::simple::BinaryThresholdImageFilter::Execute(Image &&image1) Execute the filter on the input image