Package org.itk.simple
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://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
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::BinShrinkImageFilter::BinShrinkImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
BinShrinkImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::BinShrinkImageFilter::~BinShrinkImageFilter() DestructorImage itk::simple::BinShrinkImageFilter::Execute(const Image &image1) Execute the filter on the input imageprotected void
finalize()
protected static long
getName()
std::string itk::simple::BinShrinkImageFilter::GetName() const Name of this classstd::vector<unsigned int> itk::simple::BinShrinkImageFilter::GetShrinkFactors() const Get the shrink factors.void
setShrinkFactor
(long s) Self& itk::simple::BinShrinkImageFilter::SetShrinkFactor(unsigned int s) Custom public declarationsvoid
setShrinkFactors
(VectorUInt32 ShrinkFactors) Self& itk::simple::BinShrinkImageFilter::SetShrinkFactors(std::vector< unsigned int > ShrinkFactors) Set the shrink factors.protected static long
toString()
std::string itk::simple::BinShrinkImageFilter::ToString() const Print ourselves outMethods inherited from class org.itk.simple.ImageFilter
getCPtr, swigRelease
Methods inherited from class org.itk.simple.ProcessObject
abort, 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
-
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
-
swigRelease
-
finalize
protected void finalize()- Overrides:
finalize
in classImageFilter
-
delete
public void delete()virtual itk::simple::BinShrinkImageFilter::~BinShrinkImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setShrinkFactor
public void setShrinkFactor(long s) Self& itk::simple::BinShrinkImageFilter::SetShrinkFactor(unsigned int s) Custom public declarations -
setShrinkFactors
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
std::vector<unsigned int> itk::simple::BinShrinkImageFilter::GetShrinkFactors() const Get the shrink factors. -
getName
std::string itk::simple::BinShrinkImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::BinShrinkImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::BinShrinkImageFilter::Execute(const Image &image1) Execute the filter on the input image
-