Class BinShrinkImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.BinShrinkImageFilter
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://doi.org/10.54294/p39qox
See:
 itk::simple::BinShrink for the procedural interface
 itk::BinShrinkImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkBinShrinkImageFilter.h
- 
Field SummaryFields inherited from class org.itk.simple.ProcessObjectswigCMemOwn
- 
Constructor SummaryConstructorsModifierConstructorDescriptionitk::simple::BinShrinkImageFilter::BinShrinkImageFilter() Default Constructor that takes no arguments and initializes default parametersprotectedBinShrinkImageFilter(long cPtr, boolean cMemoryOwn) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddelete()virtual itk::simple::BinShrinkImageFilter::~BinShrinkImageFilter() DestructorImage itk::simple::BinShrinkImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected voidfinalize()protected static longgetName()std::string itk::simple::BinShrinkImageFilter::GetName() const Name of this classstd::vector<unsigned int> itk::simple::BinShrinkImageFilter::GetShrinkFactors() const Get the shrink factors.voidsetShrinkFactor(long s) Self& itk::simple::BinShrinkImageFilter::SetShrinkFactor(unsigned int s) Custom public declarationsvoidsetShrinkFactors(VectorUInt32 ShrinkFactors) Self& itk::simple::BinShrinkImageFilter::SetShrinkFactors(std::vector< unsigned int > ShrinkFactors) Set the shrink factors.protected static longtoString()std::string itk::simple::BinShrinkImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFiltergetCPtr, swigReleaseMethods inherited from class org.itk.simple.ProcessObjectabort, 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- 
BinShrinkImageFilterprotected BinShrinkImageFilter(long cPtr, boolean cMemoryOwn) 
- 
BinShrinkImageFilterpublic BinShrinkImageFilter()itk::simple::BinShrinkImageFilter::BinShrinkImageFilter() Default Constructor that takes no arguments and initializes default parameters
 
- 
- 
Method Details- 
getCPtr
- 
swigRelease
- 
finalizeprotected void finalize()- Overrides:
- finalizein class- ImageFilter
 
- 
deletepublic void delete()virtual itk::simple::BinShrinkImageFilter::~BinShrinkImageFilter() Destructor- Overrides:
- deletein class- ImageFilter
 
- 
setShrinkFactorpublic void setShrinkFactor(long s) Self& itk::simple::BinShrinkImageFilter::SetShrinkFactor(unsigned int s) Custom public declarations
- 
setShrinkFactorsSelf& 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.
- 
getShrinkFactorsstd::vector<unsigned int> itk::simple::BinShrinkImageFilter::GetShrinkFactors() const Get the shrink factors.
- 
getNamestd::string itk::simple::BinShrinkImageFilter::GetName() const Name of this class- Overrides:
- getNamein class- ProcessObject
 
- 
toStringstd::string itk::simple::BinShrinkImageFilter::ToString() const Print ourselves out- Overrides:
- toStringin class- ProcessObject
 
- 
execute
 
-