Class ShrinkImageFilter


public class ShrinkImageFilter extends ImageFilter
Reduce the size of an image by an integer factor in each dimension. ShrinkImageFilter reduces the size of an image by an integer factor in each dimension. The algorithm implemented is a simple subsample. The output image size in each dimension is given by: outputSize[j] = max( std::floor(inputSize[j]/shrinkFactor[j]), 1 ); NOTE: The physical centers of the input and output will be the same. Because of this, the Origin of the output may not be the same as the Origin of the input. Since this filter produces an image which is a different resolution, origin and with different pixel spacing than its input image, it needs to override several of the methods defined in ProcessObject in order to properly manage the pipeline execution model. In particular, this filter overrides ProcessObject::GenerateInputRequestedRegion() and ProcessObject::GenerateOutputInformation() . This filter is implemented as a multithreaded filter. It provides a DynamicThreadedGenerateData() method for its implementation. See: itk::simple::Shrink for the procedural interface itk::ShrinkImageFilter for the Doxygen on the original ITK class. C++ includes: sitkShrinkImageFilter.h
  • Constructor Details

    • ShrinkImageFilter

      protected ShrinkImageFilter(long cPtr, boolean cMemoryOwn)
    • ShrinkImageFilter

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

    • getCPtr

      protected static long getCPtr(ShrinkImageFilter obj)
    • swigRelease

      protected static long swigRelease(ShrinkImageFilter obj)
    • finalize

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

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

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

      public void setShrinkFactors(VectorUInt32 ShrinkFactors)
      Self& itk::simple::ShrinkImageFilter::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::ShrinkImageFilter::GetShrinkFactors() const Get the shrink factors.
    • getName

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

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

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