ITK  5.2.0
Insight Toolkit
Public Types | Public Member Functions | List of all members
itk::ImageKernelOperator< TPixel, VDimension, TAllocator > Class Template Reference

#include <itkImageKernelOperator.h>

+ Inheritance diagram for itk::ImageKernelOperator< TPixel, VDimension, TAllocator >:
+ Collaboration diagram for itk::ImageKernelOperator< TPixel, VDimension, TAllocator >:

Public Types

using CoefficientVector = typename Superclass::CoefficientVector
 
using ImageType = Image< TPixel, VDimension >
 
using Self = ImageKernelOperator
 
using SizeType = typename Superclass::SizeType
 
using Superclass = NeighborhoodOperator< TPixel, VDimension, TAllocator >
 
- Public Types inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
using PixelType = TPixel
 
using Self = NeighborhoodOperator
 
using SizeType = typename Superclass::SizeType
 
using SliceIteratorType = SliceIterator< TPixel, Self >
 
using Superclass = Neighborhood< TPixel, VDimension, TAllocator >
 
using PixelRealType = typename NumericTraits< TPixel >::RealType
 
- Public Types inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
using AllocatorType = TAllocator
 
using ConstIterator = typename AllocatorType::const_iterator
 
using DimensionValueType = unsigned int
 
using Iterator = typename AllocatorType::iterator
 
using NeighborIndexType = SizeValueType
 
using OffsetType = Offset< VDimension >
 
using PixelType = TPixel
 
using RadiusType = ::itk::Size< VDimension >
 
using Self = Neighborhood
 
using SizeType = ::itk::Size< VDimension >
 
using SizeValueType = typename SizeType::SizeValueType
 
using SliceIteratorType = SliceIterator< TPixel, Self >
 

Public Member Functions

const ImageTypeGetImageKernel () const
 
virtual const char * GetNameOfClass () const
 
void SetImageKernel (const ImageType *kernel)
 
- Public Member Functions inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
virtual void CreateDirectional ()
 
virtual void CreateToRadius (const SizeType &)
 
virtual void CreateToRadius (const SizeValueType)
 
virtual void FlipAxes ()
 
unsigned long GetDirection () const
 
void SetDirection (const unsigned long &direction)
 
void PrintSelf (std::ostream &os, Indent i) const override
 
void ScaleCoefficients (PixelRealType)
 
- Public Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
 itkTypeMacroNoParent (Neighborhood)
 
 Neighborhood ()
 
virtual ~Neighborhood ()=default
 
 Neighborhood (const Self &other)
 
 Neighborhood (Self &&)=default
 
Selfoperator= (const Self &other)
 
Selfoperator= (Self &&)=default
 
bool operator== (const Self &other) const
 
bool operator!= (const Self &other) const
 
const SizeType GetRadius () const
 
SizeValueType GetRadius (DimensionValueType n) const
 
SizeValueType GetSize (DimensionValueType n) const
 
SizeType GetSize () const
 
OffsetValueType GetStride (DimensionValueType axis) const
 
Iterator End ()
 
Iterator Begin ()
 
ConstIterator End () const
 
ConstIterator Begin () const
 
NeighborIndexType Size () const
 
TPixel & operator[] (NeighborIndexType i)
 
const TPixel & operator[] (NeighborIndexType i) const
 
TPixel & GetElement (NeighborIndexType i)
 
TPixel GetCenterValue () const
 
void SetRadius (const SizeType &)
 
void SetRadius (const SizeValueType *rad)
 
void SetRadius (const SizeValueType)
 
void Print (std::ostream &os) const
 
AllocatorTypeGetBufferReference ()
 
const AllocatorTypeGetBufferReference () const
 
TPixel & operator[] (const OffsetType &o)
 
const TPixel & operator[] (const OffsetType &o) const
 
OffsetType GetOffset (NeighborIndexType i) const
 
virtual NeighborIndexType GetNeighborhoodIndex (const OffsetType &) const
 
NeighborIndexType GetCenterNeighborhoodIndex () const
 
std::slice GetSlice (unsigned int) const
 
ImageType::ConstPointer m_ImageKernel
 
void PrintSelf (std::ostream &os, Indent i) const override
 
CoefficientVector GenerateCoefficients () override
 
void Fill (const CoefficientVector &coeff) override
 

Additional Inherited Members

- Static Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
static constexpr unsigned int NeighborhoodDimension = VDimension
 
- Protected Types inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
using CoefficientVector = std::vector< PixelRealType >
 
- Protected Member Functions inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
virtual void Fill (const CoefficientVector &)=0
 
virtual void FillCenteredDirectional (const CoefficientVector &)
 
void InitializeToZero ()
 
- Protected Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
void SetSize ()
 
virtual void Allocate (NeighborIndexType i)
 
virtual void ComputeNeighborhoodStrideTable ()
 
virtual void ComputeNeighborhoodOffsetTable ()
 

Detailed Description

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
class itk::ImageKernelOperator< TPixel, VDimension, TAllocator >

A NeighborhoodOperator whose coefficients are from an image.

This code was contributed in the Insight Journal paper:

"Image Kernel Convolution" by Tustison N., Gee J. https://hdl.handle.net/1926/1323 http://www.insight-journal.org/browse/publication/208

Note
ImageKernelOperator does not have any user-declared "special member function", following the C++ Rule of Zero: the compiler will generate them if necessary.
See also
NeighborhoodOperator
NeighborhoodIterator
Neighborhood
Examples
SphinxExamples/src/Core/Common/DemonstrateAllOperators/Code.cxx, SphinxExamples/src/Filtering/Convolution/ColorNormalizedCorrelation/Code.cxx, SphinxExamples/src/Filtering/Convolution/NormalizedCorrelation/Code.cxx, and SphinxExamples/src/Filtering/Convolution/NormalizedCorrelationOfMaskedImage/Code.cxx.

Definition at line 50 of file itkImageKernelOperator.h.

Member Typedef Documentation

◆ CoefficientVector

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::CoefficientVector = typename Superclass::CoefficientVector

Definition at line 60 of file itkImageKernelOperator.h.

◆ ImageType

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::ImageType = Image<TPixel, VDimension>

Definition at line 58 of file itkImageKernelOperator.h.

◆ Self

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::Self = ImageKernelOperator

Standard class type aliases.

Definition at line 55 of file itkImageKernelOperator.h.

◆ SizeType

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::SizeType = typename Superclass::SizeType

Definition at line 59 of file itkImageKernelOperator.h.

◆ Superclass

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
using itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::Superclass = NeighborhoodOperator<TPixel, VDimension, TAllocator>

Definition at line 56 of file itkImageKernelOperator.h.

Member Function Documentation

◆ Fill()

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::Fill ( const CoefficientVector coeff)
overrideprotected

Arranges coefficients spatially in the memory buffer.

◆ GenerateCoefficients()

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
CoefficientVector itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::GenerateCoefficients ( )
overrideprotectedvirtual

Calculates operator coefficients.

Implements itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >.

◆ GetImageKernel()

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
const ImageType* itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::GetImageKernel ( ) const

Get the image kernel.

◆ GetNameOfClass()

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
virtual const char* itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::GetNameOfClass ( ) const
virtual

◆ PrintSelf()

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::PrintSelf ( std::ostream &  os,
Indent  i 
) const
inlineoverridevirtual

Prints information about the object.

Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.

Definition at line 76 of file itkImageKernelOperator.h.

References itk::Indent::GetNextIndent().

◆ SetImageKernel()

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
void itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::SetImageKernel ( const ImageType kernel)

Set the image kernel. Only images with odd size in all dimensions are allowed. If an image with an even size is passed as an argument, an exception will be thrown.

Examples
SphinxExamples/src/Filtering/Convolution/NormalizedCorrelationOfMaskedImage/Code.cxx.

Member Data Documentation

◆ m_ImageKernel

template<typename TPixel, unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator<TPixel>>
ImageType::ConstPointer itk::ImageKernelOperator< TPixel, VDimension, TAllocator >::m_ImageKernel
private

Prints information about the object.

Definition at line 93 of file itkImageKernelOperator.h.


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