Class BinShrinkImageFilter


public class BinShrinkImageFilter extends ImageFilter
Reduce the size of an image by an integer factor in each dimension while performing averaging of an input neighborhood. The output image size in each dimension is given by: outputSize[j] = max( std::floor(inputSize[j]/shrinkFactor[j]), 1 ); The algorithm implemented can be describe with the following equation for 2D: \\[ \\mathsf{I}_{out}(x_o,x_1) = \\frac{\\sum_{i=0}^{f_0}\\sum_{j=0}^{f_1}\\mathsf{I}_{in}(f_0 x_o+i,f_1 x_1+j)}{f_0 f_1} \\] This filter is implemented so that the starting extent of the first pixel of the output matches that of the input. The change in image geometry from a 5x5 image binned by a factor of 2x2. This code was contributed in the Insight Journal paper: "BinShrink: A multi-resolution filter with cache efficient averaging" by Lowekamp B., Chen D. https://www.insight-journal.org/browse/publication/912 See: itk::simple::BinShrink for the procedural interface itk::BinShrinkImageFilter for the Doxygen on the original ITK class. C++ includes: sitkBinShrinkImageFilter.h
  • Constructor Details

    • BinShrinkImageFilter

      protected BinShrinkImageFilter(long cPtr, boolean cMemoryOwn)
    • BinShrinkImageFilter

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

    • getCPtr

      protected static long getCPtr(BinShrinkImageFilter obj)
    • swigRelease

      protected static long swigRelease(BinShrinkImageFilter obj)
    • finalize

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

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

      public void setShrinkFactor(long s)
      Self& itk::simple::BinShrinkImageFilter::SetShrinkFactor(unsigned int s) Custom public declarations
    • setShrinkFactors

      public void setShrinkFactors(VectorUInt32 ShrinkFactors)
      Self& itk::simple::BinShrinkImageFilter::SetShrinkFactors(std::vector< unsigned int > ShrinkFactors) Set the shrink factors. Values are clamped to a minimum value of 1. Default is 1 for all dimensions.
    • getShrinkFactors

      public VectorUInt32 getShrinkFactors()
      std::vector<unsigned int> itk::simple::BinShrinkImageFilter::GetShrinkFactors() const Get the shrink factors.
    • getName

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

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

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