ITK  4.1.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Member Functions
itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage > Class Template Reference

#include <itkConvolutionImageFilter.h>

+ Inheritance diagram for itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >:
+ Collaboration diagram for itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >:

List of all members.

Public Types

typedef SmartPointer< const SelfConstPointer
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< SelfPointer
typedef ConvolutionImageFilter Self
typedef
ConvolutionImageFilterBase
< TInputImage, TOutputImage > 
Superclass

Public Member Functions

virtual ::itk::LightObject::Pointer CreateAnother (void) const
virtual const char * GetNameOfClass () const

Static Public Member Functions

static Pointer New ()

Static Public Attributes

static const unsigned int ImageDimension = TInputImage::ImageDimension

Protected Member Functions

 ConvolutionImageFilter ()
void GenerateData ()
virtual void GenerateInputRequestedRegion ()
bool GetKernelNeedsPadding () const
KernelSizeType GetKernelPadSize () const
template<class TImage >
KernelSizeType GetKernelRadius (const TImage *kernelImage) const
 ~ConvolutionImageFilter ()

Private Member Functions

template<class TImage >
void ComputeConvolution (const TImage *kernelImage, ProgressAccumulator *progress)
 ConvolutionImageFilter (const Self &)
void operator= (const Self &)

Detailed Description

template<class TInputImage, class TKernelImage = TInputImage, class TOutputImage = TInputImage>
class itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >

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. http://hdl.handle.net/1926/1323 http://www.insight-journal.org/browse/publication/208

Author:
Nicholas J. Tustison
James C. Gee
Wiki Examples:

Definition at line 65 of file itkConvolutionImageFilter.h.


Member Typedef Documentation

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef SmartPointer< const Self > itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::ConstPointer
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef TInputImage itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputImageType

Some convenient typedefs.

Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.

Definition at line 84 of file itkConvolutionImageFilter.h.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef InputImageType::IndexType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputIndexType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef InputImageType::PixelType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputPixelType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef InputImageType::RegionType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputRegionType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef InputImageType::SizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::InputSizeType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef TKernelImage itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelImageType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef KernelImageType::IndexType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelIndexType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef KernelImageType::PixelType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelPixelType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef KernelImageType::RegionType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelRegionType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef KernelImageType::SizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::KernelSizeType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef TOutputImage itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputImageType

Some convenient typedefs.

Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.

Definition at line 85 of file itkConvolutionImageFilter.h.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef OutputImageType::IndexType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputIndexType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef OutputImageType::PixelType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputPixelType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef OutputImageType::RegionType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputRegionType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef OutputImageType::SizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::OutputSizeType
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef SmartPointer< Self > itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::Pointer
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef ConvolutionImageFilter itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::Self

Standard class typedefs.

Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.

Definition at line 69 of file itkConvolutionImageFilter.h.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
typedef ConvolutionImageFilterBase< TInputImage, TOutputImage > itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::Superclass

Constructor & Destructor Documentation

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::ConvolutionImageFilter ( ) [protected]
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::~ConvolutionImageFilter ( ) [inline, protected]

Definition at line 102 of file itkConvolutionImageFilter.h.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::ConvolutionImageFilter ( const Self ) [private]

Member Function Documentation

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
template<class TImage >
void itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::ComputeConvolution ( const TImage *  kernelImage,
ProgressAccumulator progress 
) [private]
template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
virtual::itk::LightObject::Pointer itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::CreateAnother ( void  ) const [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.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
void itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::GenerateData ( ) [protected, virtual]

This filter uses a minipipeline to compute the output.

Reimplemented from itk::ImageSource< TOutputImage >.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
virtual void itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::GenerateInputRequestedRegion ( ) [protected, virtual]

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.

See also:
ProcessObject::GenerateInputRequestedRegion()

Reimplemented from itk::ImageToImageFilter< TInputImage, TOutputImage >.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
bool itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::GetKernelNeedsPadding ( ) const [protected]

The kernel needs padding if any of the sizes of its dimensions is even. This method checks for this condition.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
KernelSizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::GetKernelPadSize ( ) const [protected]

Calculates the padding width needed to make each dimension odd.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
template<class TImage >
KernelSizeType itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::GetKernelRadius ( const TImage *  kernelImage) const [protected]

Calculates the radius of the kernel.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
virtual const char* itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::GetNameOfClass ( ) const [virtual]

Run-time type information ( and related methods )

Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
static Pointer itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::New ( ) [static]

Method for creation through the object factory.

Reimplemented from itk::Object.

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
void itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::operator= ( const Self ) [private]

PushBackInput(), PushFronInput() in the public section force the input to be the type expected by an ImageToImageFilter. However, these methods end of "hiding" the versions from the superclass (ProcessObject) whose arguments are DataObjects. Here, we re-expose the versions from ProcessObject to avoid warnings about hiding methods from the superclass.

Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.


Member Data Documentation

template<class TInputImage , class TKernelImage = TInputImage, class TOutputImage = TInputImage>
const unsigned int itk::ConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage >::ImageDimension = TInputImage::ImageDimension [static]

Dimensionality of input and output data is assumed to be the same.

Reimplemented from itk::ConvolutionImageFilterBase< TInputImage, TKernelImage, TOutputImage >.

Definition at line 82 of file itkConvolutionImageFilter.h.


The documentation for this class was generated from the following file: