Package org.itk.simple
Class ConvolutionImageFilter
java.lang.Object
org.itk.simple.ProcessObject
org.itk.simple.ImageFilter
org.itk.simple.ConvolutionImageFilter
Convolve a given image with an arbitrary image kernel.
This filter operates by centering the flipped kernel at each pixel in
the image and computing the inner product between pixel values in the
image and pixel values in the kernel. The center of the kernel is
defined as $ \\lfloor (2*i+s-1)/2 \\rfloor $ where $i$ is the index and $s$ is the size of the largest possible region of the kernel image. For
kernels with odd sizes in all dimensions, this corresponds to the
center pixel. If a dimension of the kernel image has an even size,
then the center index of the kernel in that dimension will be the
largest integral index that is less than the continuous index of the
image center.
The kernel can optionally be normalized to sum to 1 using NormalizeOn() . Normalization is off by default.
WARNING:
This filter ignores the spacing, origin, and orientation of the kernel
image and treats them as identical to those in the input image.
This code was contributed in the Insight Journal paper:
"Image Kernel Convolution" by Tustison N., Gee J. https://insight-journal.org/browse/publication/208
Nicholas J. Tustison
James C. Gee
See:
itk::simple::Convolution for the procedural interface
itk::ConvolutionImageFilter for the Doxygen on the original ITK class.
C++ includes: sitkConvolutionImageFilter.h
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
static final class
-
Field Summary
Fields inherited from class org.itk.simple.ProcessObject
swigCMemOwn
-
Constructor Summary
ConstructorsModifierConstructorDescriptionitk::simple::ConvolutionImageFilter::ConvolutionImageFilter() Default Constructor that takes no arguments and initializes default parametersprotected
ConvolutionImageFilter
(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoid
delete()
virtual itk::simple::ConvolutionImageFilter::~ConvolutionImageFilter() DestructorImage itk::simple::ConvolutionImageFilter::Execute(const Image &image, const Image &kernelImage) Execute the filter on the input imageprotected void
finalize()
BoundaryConditionType itk::simple::ConvolutionImageFilter::GetBoundaryCondition() constprotected static long
getName()
std::string itk::simple::ConvolutionImageFilter::GetName() const Name of this classboolean
bool itk::simple::ConvolutionImageFilter::GetNormalize() constOutputRegionModeType itk::simple::ConvolutionImageFilter::GetOutputRegionMode() constvoid
Self& itk::simple::ConvolutionImageFilter::NormalizeOff()void
Self& itk::simple::ConvolutionImageFilter::NormalizeOn() Set the value of Normalize to true or false respectfully.void
setBoundaryCondition
(ConvolutionImageFilter.BoundaryConditionType BoundaryCondition) Self& itk::simple::ConvolutionImageFilter::SetBoundaryCondition(BoundaryConditionType BoundaryCondition)void
setNormalize
(boolean Normalize) Self& itk::simple::ConvolutionImageFilter::SetNormalize(bool Normalize) Normalize the output image by the sum of the kernel componentsvoid
setOutputRegionMode
(ConvolutionImageFilter.OutputRegionModeType OutputRegionMode) Self& itk::simple::ConvolutionImageFilter::SetOutputRegionMode(OutputRegionModeType OutputRegionMode)protected static long
toString()
std::string itk::simple::ConvolutionImageFilter::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
-
ConvolutionImageFilter
protected ConvolutionImageFilter(long cPtr, boolean cMemoryOwn) -
ConvolutionImageFilter
public ConvolutionImageFilter()itk::simple::ConvolutionImageFilter::ConvolutionImageFilter() 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::ConvolutionImageFilter::~ConvolutionImageFilter() Destructor- Overrides:
delete
in classImageFilter
-
setNormalize
public void setNormalize(boolean Normalize) Self& itk::simple::ConvolutionImageFilter::SetNormalize(bool Normalize) Normalize the output image by the sum of the kernel components -
normalizeOn
public void normalizeOn()Self& itk::simple::ConvolutionImageFilter::NormalizeOn() Set the value of Normalize to true or false respectfully. -
normalizeOff
public void normalizeOff()Self& itk::simple::ConvolutionImageFilter::NormalizeOff() -
getNormalize
public boolean getNormalize()bool itk::simple::ConvolutionImageFilter::GetNormalize() const -
setBoundaryCondition
Self& itk::simple::ConvolutionImageFilter::SetBoundaryCondition(BoundaryConditionType BoundaryCondition) -
getBoundaryCondition
BoundaryConditionType itk::simple::ConvolutionImageFilter::GetBoundaryCondition() const -
setOutputRegionMode
Self& itk::simple::ConvolutionImageFilter::SetOutputRegionMode(OutputRegionModeType OutputRegionMode) -
getOutputRegionMode
OutputRegionModeType itk::simple::ConvolutionImageFilter::GetOutputRegionMode() const -
getName
std::string itk::simple::ConvolutionImageFilter::GetName() const Name of this class- Overrides:
getName
in classProcessObject
-
toString
std::string itk::simple::ConvolutionImageFilter::ToString() const Print ourselves out- Overrides:
toString
in classProcessObject
-
execute
Image itk::simple::ConvolutionImageFilter::Execute(const Image &image, const Image &kernelImage) Execute the filter on the input image
-