ITK
4.3.0
Insight Segmentation and Registration Toolkit
|
#include <itkConvolutionImageFilter.h>
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 where is the index and 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.
This code was contributed in the Insight Journal paper:
"Image Kernel Convolution" by Tustison N., Gee J. http://hdl.handle.net/1926/1323 http://www.insight-journal.org/browse/publication/208
Definition at line 65 of file itkConvolutionImageFilter.h.
Public Types | |
typedef SmartPointer< const Self > | ConstPointer |
typedef TInputImage | InputImageType |
typedef InputImageType::IndexType | InputIndexType |
typedef InputImageType::PixelType | InputPixelType |
typedef InputImageType::RegionType | InputRegionType |
typedef InputImageType::SizeType | InputSizeType |
typedef TKernelImage | KernelImageType |
typedef KernelImageType::IndexType | KernelIndexType |
typedef KernelImageType::PixelType | KernelPixelType |
typedef KernelImageType::RegionType | KernelRegionType |
typedef KernelImageType::SizeType | KernelSizeType |
typedef TOutputImage | OutputImageType |
typedef OutputImageType::IndexType | OutputIndexType |
typedef OutputImageType::PixelType | OutputPixelType |
typedef OutputImageType::RegionType | OutputRegionType |
typedef OutputImageType::SizeType | OutputSizeType |
typedef SmartPointer< Self > | Pointer |
typedef ConvolutionImageFilter | Self |
typedef ConvolutionImageFilterBase < TInputImage, TOutputImage > | Superclass |
Public Types inherited from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage > | |
typedef BoundaryConditionType * | BoundaryConditionPointerType |
typedef ImageBoundaryCondition < TInputImage > | BoundaryConditionType |
typedef SmartPointer< const Self > | ConstPointer |
typedef ZeroFluxNeumannBoundaryCondition < TInputImage > | DefaultBoundaryConditionType |
typedef TInputImage | InputImageType |
typedef InputImageType::IndexType | InputIndexType |
typedef InputImageType::PixelType | InputPixelType |
typedef InputImageType::RegionType | InputRegionType |
typedef InputImageType::SizeType | InputSizeType |
typedef TKernelImage | KernelImageType |
typedef KernelImageType::IndexType | KernelIndexType |
typedef KernelImageType::PixelType | KernelPixelType |
typedef KernelImageType::RegionType | KernelRegionType |
typedef KernelImageType::SizeType | KernelSizeType |
typedef TOutputImage | OutputImageType |
typedef OutputImageType::IndexType | OutputIndexType |
typedef OutputImageType::PixelType | OutputPixelType |
enum | OutputRegionModeType { SAME = 0, VALID } |
typedef OutputImageType::RegionType | OutputRegionType |
typedef OutputImageType::SizeType | OutputSizeType |
typedef SmartPointer< Self > | Pointer |
typedef ConvolutionImageFilterBase | Self |
typedef InputSizeType::SizeValueType | SizeValueType |
typedef ImageToImageFilter < TInputImage, TOutputImage > | Superclass |
Public Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
typedef SmartPointer< const Self > | ConstPointer |
typedef InputImageType::ConstPointer | InputImageConstPointer |
typedef InputImageType::PixelType | InputImagePixelType |
typedef InputImageType::Pointer | InputImagePointer |
typedef InputImageType::RegionType | InputImageRegionType |
typedef TInputImage | InputImageType |
typedef Superclass::OutputImagePixelType | OutputImagePixelType |
typedef Superclass::OutputImageRegionType | OutputImageRegionType |
typedef SmartPointer< Self > | Pointer |
typedef ImageToImageFilter | Self |
typedef ImageSource< TOutputImage > | Superclass |
Public Types inherited from itk::ImageSource< TOutputImage > | |
typedef SmartPointer< const Self > | ConstPointer |
typedef Superclass::DataObjectIdentifierType | DataObjectIdentifierType |
typedef DataObject::Pointer | DataObjectPointer |
typedef Superclass::DataObjectPointerArraySizeType | DataObjectPointerArraySizeType |
typedef OutputImageType::PixelType | OutputImagePixelType |
typedef OutputImageType::Pointer | OutputImagePointer |
typedef OutputImageType::RegionType | OutputImageRegionType |
typedef TOutputImage | OutputImageType |
typedef SmartPointer< Self > | Pointer |
typedef ImageSource | Self |
typedef ProcessObject | Superclass |
Public Types inherited from itk::ProcessObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef DataObject::DataObjectIdentifierType | DataObjectIdentifierType |
typedef DataObject::Pointer | DataObjectPointer |
typedef std::vector < DataObjectPointer > | DataObjectPointerArray |
typedef DataObjectPointerArray::size_type | DataObjectPointerArraySizeType |
typedef std::vector < DataObjectIdentifierType > | NameArray |
typedef SmartPointer< Self > | Pointer |
typedef ProcessObject | Self |
typedef Object | Superclass |
Public Types inherited from itk::Object | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef Object | Self |
typedef LightObject | Superclass |
Public Types inherited from itk::LightObject | |
typedef SmartPointer< const Self > | ConstPointer |
typedef SmartPointer< Self > | Pointer |
typedef LightObject | Self |
Static Public Member Functions | |
static Pointer | New () |
Static Public Attributes | |
static const unsigned int | ImageDimension = TInputImage::ImageDimension |
Static Public Attributes inherited from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage > | |
static const unsigned int | ImageDimension = TInputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
static const unsigned int | InputImageDimension = TInputImage::ImageDimension |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Static Public Attributes inherited from itk::ImageSource< TOutputImage > | |
static const unsigned int | OutputImageDimension = TOutputImage::ImageDimension |
Private Member Functions | |
template<class TImage > | |
void | ComputeConvolution (const TImage *kernelImage, ProgressAccumulator *progress) |
ConvolutionImageFilter (const Self &) | |
void | operator= (const Self &) |
Additional Inherited Members | |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TOutputImage > | |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(OutputImageDimension), itkGetStaticConstMacro(InputImageDimension) > | InputToOutputRegionCopierType |
typedef ImageToImageFilterDetail::ImageRegionCopier < itkGetStaticConstMacro(InputImageDimension), itkGetStaticConstMacro(OutputImageDimension) > | OutputToInputRegionCopierType |
Static Protected Member Functions inherited from itk::ImageSource< TOutputImage > | |
static ITK_THREAD_RETURN_TYPE | ThreaderCallback (void *arg) |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime |
bool | m_Updating |
typedef SmartPointer< const Self > itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::ConstPointer |
Definition at line 72 of file itkConvolutionImageFilter.h.
typedef TInputImage itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputImageType |
Definition at line 84 of file itkConvolutionImageFilter.h.
typedef InputImageType::IndexType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputIndexType |
Definition at line 90 of file itkConvolutionImageFilter.h.
typedef InputImageType::PixelType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputPixelType |
Definition at line 87 of file itkConvolutionImageFilter.h.
typedef InputImageType::RegionType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputRegionType |
Definition at line 96 of file itkConvolutionImageFilter.h.
typedef InputImageType::SizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputSizeType |
Definition at line 93 of file itkConvolutionImageFilter.h.
typedef TKernelImage itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelImageType |
Definition at line 86 of file itkConvolutionImageFilter.h.
typedef KernelImageType::IndexType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelIndexType |
Definition at line 92 of file itkConvolutionImageFilter.h.
typedef KernelImageType::PixelType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelPixelType |
Definition at line 89 of file itkConvolutionImageFilter.h.
typedef KernelImageType::RegionType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelRegionType |
Definition at line 98 of file itkConvolutionImageFilter.h.
typedef KernelImageType::SizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelSizeType |
Definition at line 95 of file itkConvolutionImageFilter.h.
typedef TOutputImage itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputImageType |
Definition at line 85 of file itkConvolutionImageFilter.h.
typedef OutputImageType::IndexType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputIndexType |
Definition at line 91 of file itkConvolutionImageFilter.h.
typedef OutputImageType::PixelType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputPixelType |
Definition at line 88 of file itkConvolutionImageFilter.h.
typedef OutputImageType::RegionType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputRegionType |
Definition at line 97 of file itkConvolutionImageFilter.h.
typedef OutputImageType::SizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputSizeType |
Definition at line 94 of file itkConvolutionImageFilter.h.
typedef SmartPointer< Self > itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::Pointer |
Definition at line 71 of file itkConvolutionImageFilter.h.
typedef ConvolutionImageFilter itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::Self |
Definition at line 69 of file itkConvolutionImageFilter.h.
typedef ConvolutionImageFilterBase< TInputImage, TOutputImage > itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::Superclass |
Definition at line 70 of file itkConvolutionImageFilter.h.
|
protected |
|
inlineprotected |
Definition at line 102 of file itkConvolutionImageFilter.h.
|
private |
|
private |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::Object.
|
protectedvirtual |
This filter uses a minipipeline to compute the output.
Reimplemented from itk::ImageSource< TOutputImage >.
|
protectedvirtual |
ConvolutionImageFilter needs the entire image kernel, which in general is going to be a different size then the output requested region. As such, this filter needs to provide an implementation for GenerateInputRequestedRegion() in order to inform the pipeline execution model.
Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.
|
protected |
The kernel needs padding if any of the sizes of its dimensions is even. This method checks for this condition.
|
protected |
Calculates the padding width needed to make each dimension odd.
|
protected |
Calculates the radius of the kernel.
|
virtual |
Run-time type information ( and related methods )
Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.
|
static |
Method for creation through the object factory.
|
private |
|
static |
Dimensionality of input and output data is assumed to be the same.
Definition at line 82 of file itkConvolutionImageFilter.h.