ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
#include <itkNeighborhoodOperator.h>
Public Types | |
typedef NumericTraits< TPixel > ::RealType | PixelRealType |
typedef TPixel | PixelType |
typedef NeighborhoodOperator | Self |
typedef Superclass::SizeType | SizeType |
typedef SliceIterator< TPixel, Self > | SliceIteratorType |
typedef Neighborhood< TPixel, VDimension, TAllocator > | Superclass |
Public Member Functions | |
virtual void | CreateDirectional () |
virtual void | CreateToRadius (const SizeType &) |
virtual void | CreateToRadius (const SizeValueType) |
virtual void | FlipAxes () |
unsigned long | GetDirection () const |
NeighborhoodOperator () | |
NeighborhoodOperator (const Self &orig) | |
void | ScaleCoefficients (PixelRealType) |
void | SetDirection (const unsigned long &direction) |
Self & | operator= (const Self &orig) |
virtual void | PrintSelf (std::ostream &os, Indent i) const |
Protected Types | |
typedef std::vector< double > | CoefficientVector |
Protected Member Functions | |
virtual void | Fill (const CoefficientVector &)=0 |
virtual void | FillCenteredDirectional (const CoefficientVector &) |
virtual CoefficientVector | GenerateCoefficients ()=0 |
void | InitializeToZero () |
Private Attributes | |
unsigned long | m_Direction |
Virtual class that defines a common interface to all neighborhood operator subtypes.
A NeighborhoodOperator is a set of pixel values that can be applied to a Neighborhood to perform a user-defined operation (i.e. convolution kernel, morphological structuring element). A NeighborhoodOperator is itself a specialized Neighborhood, with functionality to generate its coefficients according to user-defined parameters. Because the operator is a subclass of Neighborhood, it is a valid operand in any of the operations defined on the Neighborhood object (convolution, inner product, etc.).
NeighborhoodOperator is a pure virtual object that must be subclassed to be used. A user's subclass must implement two methods:
(1) GenerateCoefficients -- the algorithm that computes the scalar coefficients of the operator.
(2) Fill -- the algorithm that places the scalar coefficients into the memory buffer of the operator (arranges them spatially in the neighborhood).
NeighborhoodOperator supports the concept of a "directional operator." A directional operator is defined in this context to be an operator that is applied along a single dimension. Examples of this type of operator are directional derivatives and the individual, directional components of separable processes such as Gaussian smoothing.
How a NeighborhoodOperator is applied to data is up to the user who defines it. One possible use of an operator would be to take its inner product with a neighborhood of values to produce a scalar result. This process effects convolution when applied to successive neighborhoods across a region of interest in an image.
Definition at line 66 of file itkNeighborhoodOperator.h.
typedef std::vector< double > itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::CoefficientVector [protected] |
Typedef support for coefficient vector type. Necessary to fix bug in the microsoft VC++ compiler.
Reimplemented in itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< ScalarType, Superclass::Dimension >, itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, itk::ForwardDifferenceOperator< TPixel, VDimension, TAllocator >, itk::BackwardDifferenceOperator< TPixel, TDimension, TAllocator >, and itk::ImageKernelOperator< TPixel, VDimension, TAllocator >.
Definition at line 149 of file itkNeighborhoodOperator.h.
typedef NumericTraits< TPixel >::RealType itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::PixelRealType |
Reimplemented in itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, and itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >.
Definition at line 140 of file itkNeighborhoodOperator.h.
typedef TPixel itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::PixelType |
External support for pixel type
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
Reimplemented in itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::BackwardDifferenceOperator< TPixel, TDimension, TAllocator >, and itk::ForwardDifferenceOperator< TPixel, VDimension, TAllocator >.
Definition at line 78 of file itkNeighborhoodOperator.h.
typedef NeighborhoodOperator itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::Self |
Standard class typedefs.
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
Reimplemented in itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >, itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, itk::GaussianOperator< ScalarType, Superclass::Dimension >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::ImageKernelOperator< TPixel, VDimension, TAllocator >, itk::BackwardDifferenceOperator< TPixel, TDimension, TAllocator >, and itk::ForwardDifferenceOperator< TPixel, VDimension, TAllocator >.
Definition at line 71 of file itkNeighborhoodOperator.h.
typedef Superclass::SizeType itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::SizeType |
Size object typedef support
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
Reimplemented in itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, and itk::ImageKernelOperator< TPixel, VDimension, TAllocator >.
Definition at line 75 of file itkNeighborhoodOperator.h.
typedef SliceIterator< TPixel, Self > itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::SliceIteratorType |
Slice iterator typedef support
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
Definition at line 81 of file itkNeighborhoodOperator.h.
typedef Neighborhood< TPixel, VDimension, TAllocator > itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::Superclass |
Reimplemented in itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >, itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, itk::GaussianOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< ScalarType, Superclass::Dimension >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::ImageKernelOperator< TPixel, VDimension, TAllocator >, itk::BackwardDifferenceOperator< TPixel, TDimension, TAllocator >, and itk::ForwardDifferenceOperator< TPixel, VDimension, TAllocator >.
Definition at line 72 of file itkNeighborhoodOperator.h.
itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::NeighborhoodOperator | ( | ) | [inline] |
Constructor.
Definition at line 84 of file itkNeighborhoodOperator.h.
itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::NeighborhoodOperator | ( | const Self & | orig | ) | [inline] |
Copy constructor
Definition at line 88 of file itkNeighborhoodOperator.h.
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::CreateDirectional | ( | ) | [virtual] |
Creates the operator with length only in the specified direction. The radius of the operator will be 0 except along the axis on which the operator will work.
Reimplemented in itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, and itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >.
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::CreateToRadius | ( | const SizeType & | ) | [virtual] |
Creates the operator with a specified radius. The spatial location of the coefficients within the operator is defined by the subclass implementation of the Fill method.
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::CreateToRadius | ( | const SizeValueType | ) | [virtual] |
Creates the operator with a specified radius ("square", same length on each side). The spatial location of the coefficients within the operator is defined by the subclass implementation of the Fill method.
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::Fill | ( | const CoefficientVector & | ) | [protected, pure virtual] |
A subclass-specific algorithm that positions the coefficients spatially in the operator.
Implemented in itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< ScalarType, Superclass::Dimension >, itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, itk::ImageKernelOperator< TPixel, VDimension, TAllocator >, itk::ForwardDifferenceOperator< TPixel, VDimension, TAllocator >, and itk::BackwardDifferenceOperator< TPixel, TDimension, TAllocator >.
Referenced by itk::AnnulusOperator< TPixel, TDimension, TAllocator >::AnnulusOperator().
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::FillCenteredDirectional | ( | const CoefficientVector & | ) | [protected, virtual] |
A pre-defined Fill function that can be called by a subclass Fill function to center coefficients along the axis specified by the SetDirection method. Useful for creating directional operators, or centering coefficients in an N-dimensional neighborhood.
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::FlipAxes | ( | ) | [virtual] |
Reverses the direction of all axes of the operator by reversing the order of the coefficients.
virtual CoefficientVector itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::GenerateCoefficients | ( | ) | [protected, pure virtual] |
A subclass-specific algorithm that computes the coefficients of the operator.
Implemented in itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< ScalarType, Superclass::Dimension >, itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, itk::ImageKernelOperator< TPixel, VDimension, TAllocator >, itk::ForwardDifferenceOperator< TPixel, VDimension, TAllocator >, and itk::BackwardDifferenceOperator< TPixel, TDimension, TAllocator >.
unsigned long itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::GetDirection | ( | ) | const [inline] |
Returns the direction (dimension number) of a directional operator.
Definition at line 106 of file itkNeighborhoodOperator.h.
void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::InitializeToZero | ( | ) | [inline, protected] |
Initializes all the coefficients in the neighborhood to zero values
Definition at line 167 of file itkNeighborhoodOperator.h.
Self& itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::operator= | ( | const Self & | orig | ) | [inline] |
Assignment operator.
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
Reimplemented in itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, and itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >.
Definition at line 93 of file itkNeighborhoodOperator.h.
virtual void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::PrintSelf | ( | std::ostream & | os, |
Indent | i | ||
) | const [inline, virtual] |
Prints some debugging information.
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
Reimplemented in itk::AnnulusOperator< TPixel, TDimension, TAllocator >, itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< TPixel, VDimension, TAllocator >, itk::GaussianOperator< ScalarType, Superclass::Dimension >, itk::SobelOperator< TPixel, VDimension, TAllocator >, itk::SobelOperator< FixedGradientPixelType, itkGetStaticConstMacro(FixedImageDimension) >, itk::SobelOperator< MovedGradientPixelType, itkGetStaticConstMacro(MovedImageDimension) >, itk::LaplacianOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< TPixel, VDimension, TAllocator >, itk::DerivativeOperator< ScalarValueType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< OutputImagePixelType, itkGetStaticConstMacro(ImageDimension) >, itk::DerivativeOperator< PixelType, itkGetStaticConstMacro(ImageDimension) >, and itk::ImageKernelOperator< TPixel, VDimension, TAllocator >.
Definition at line 132 of file itkNeighborhoodOperator.h.
void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::ScaleCoefficients | ( | PixelRealType | ) |
Multiplies all of the coefficients of the kernel by a single scalar value.
void itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::SetDirection | ( | const unsigned long & | direction | ) | [inline] |
Sets the dimensional direction of a directional operator.
Definition at line 102 of file itkNeighborhoodOperator.h.
unsigned long itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >::m_Direction [private] |
Direction (dimension number) of the derivative.
Definition at line 178 of file itkNeighborhoodOperator.h.