Class RankImageFilter


public class RankImageFilter extends ImageFilter
Rank filter of a greyscale image. Nonlinear filter in which each output pixel is a user defined rank of input pixels in a user defined neighborhood. The default rank is 0.5 (median). The boundary conditions are different to the standard itkMedianImageFilter. In this filter the neighborhood is cropped at the boundary, and is therefore smaller. This filter uses a recursive implementation - essentially the one by Huang 1979, I believe, to compute the rank, and is therefore usually a lot faster than the direct implementation. The extensions to Huang are support for arbitrary pixel types (using c++ maps) and arbitrary neighborhoods. I presume that these are not new ideas. This filter is based on the sliding window code from the consolidatedMorphology package on InsightJournal. The structuring element is assumed to be composed of binary values (zero or one). Only elements of the structuring element having values > 0 are candidates for affecting the center pixel. This code was contributed in the Insight Journal paper: "Efficient implementation of kernel filtering" by Beare R., Lehmann G https://www.insight-journal.org/browse/publication/160 See: MedianImageFilter Richard Beare See: itk::simple::Rank for the procedural interface itk::RankImageFilter for the Doxygen on the original ITK class. C++ includes: sitkRankImageFilter.h
  • Constructor Details

    • RankImageFilter

      protected RankImageFilter(long cPtr, boolean cMemoryOwn)
    • RankImageFilter

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

    • getCPtr

      protected static long getCPtr(RankImageFilter obj)
    • swigRelease

      protected static long swigRelease(RankImageFilter obj)
    • finalize

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

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

      public void setRank(double Rank)
      Self& itk::simple::RankImageFilter::SetRank(double Rank)
    • getRank

      public double getRank()
      double itk::simple::RankImageFilter::GetRank() const
    • setRadius

      public void setRadius(VectorUInt32 Radius)
      Self& itk::simple::RankImageFilter::SetRadius(std::vector< unsigned int > Radius)
    • getRadius

      public VectorUInt32 getRadius()
      std::vector<unsigned int> itk::simple::RankImageFilter::GetRadius() const
    • setKernelType

      public void setKernelType(KernelEnum KernelType)
      Self& itk::simple::RankImageFilter::SetKernelType(KernelEnum KernelType) Set the kernel or structuring element.
    • getKernelType

      public KernelEnum getKernelType()
      KernelEnum itk::simple::RankImageFilter::GetKernelType() const Get the kernel or structuring element .
    • getName

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

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

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