ITK  4.9.0
Insight Segmentation and Registration Toolkit
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Private Attributes | List of all members
itk::LaplacianOperator< TPixel, VDimension, TAllocator > Class Template Reference

#include <itkLaplacianOperator.h>

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

Detailed Description

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

A NeighborhoodOperator for use in calculating the Laplacian at a pixel.

A NeighborhoodOperator for use in calculating the Laplacian at a pixel. The LaplacianOperator's coefficients are a tightest-fitting convolution kernel.

For example, the simplest Laplacian Operator for 2D has the form:

* 0 1 0
* 1 -4 1
* 0 1 0
*
The LaplacianOperator is a non-directional NeighborhoodOperator that should be applied to a Neighborhood or NeighborhoodIterator using an inner product method (itkNeighborhoodInnerProduct). To initialize the operator, you need call CreateOperator() before using it.
By default the operator will be created for an isotropic image, but you can modify the operator to handle different pixel spacings by calling SetDerivativeScalings. The argument to SetDerivativeScalings is an array of doubles that is of length VDimension (the dimensionality of the image). Make sure to use 1/pixel_spacing to properly scale derivatives.
See Also
NeighborhoodOperator
Neighborhood
Wiki Examples:
Examples:
WikiExamples/Operators/LaplacianOperator.cxx.

Definition at line 64 of file itkLaplacianOperator.h.

Public Types

typedef Superclass::PixelType PixelType
 
typedef LaplacianOperator Self
 
typedef Superclass::SizeType SizeType
 
typedef NeighborhoodOperator
< TPixel, VDimension,
TAllocator > 
Superclass
 
- Public Types inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
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 Types inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
typedef TAllocator AllocatorType
 
typedef
AllocatorType::const_iterator 
ConstIterator
 
typedef unsigned int DimensionValueType
 
typedef AllocatorType::iterator Iterator
 
typedef SizeValueType NeighborIndexType
 
typedef Offset< VDimension > OffsetType
 
typedef TPixel PixelType
 
typedef Neighborhood Self
 
typedef SizeType::SizeValueType SizeValueType
 
typedef SliceIterator< TPixel,
Self
SliceIteratorType
 

Public Member Functions

void CreateOperator ()
 
void SetDerivativeScalings (const double *s)
 
 LaplacianOperator ()
 
 LaplacianOperator (const Self &other)
 
Selfoperator= (const Self &other)
 
virtual void PrintSelf (std::ostream &os, Indent i) const
 
- 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
 
virtual const char * GetNameOfClass () const
 
 NeighborhoodOperator ()
 
 NeighborhoodOperator (const Self &orig)
 
void ScaleCoefficients (PixelRealType)
 
void SetDirection (const unsigned long &direction)
 
Selfoperator= (const Self &orig)
 
- Public Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
NeighborIndexType GetCenterNeighborhoodIndex () const
 
TPixel GetCenterValue () const
 
virtual NeighborIndexType GetNeighborhoodIndex (const OffsetType &) const
 
OffsetType GetOffset (NeighborIndexType i) const
 
const SizeType GetRadius () const
 
SizeValueType GetRadius (DimensionValueType n) const
 
SizeValueType GetSize (DimensionValueType n) const
 
SizeType GetSize () const
 
std::slice GetSlice (unsigned int) const
 
OffsetValueType GetStride (DimensionValueType axis) const
 
 itkTypeMacroNoParent (Neighborhood)
 
 Neighborhood (const Self &other)
 
bool operator!= (const Self &other) const
 
Selfoperator= (const Self &other)
 
bool operator== (const Self &other) const
 
void Print (std::ostream &os) const
 
void SetRadius (const SizeType &)
 
void SetRadius (const SizeValueType)
 
NeighborIndexType Size () const
 
virtual ~Neighborhood ()
 
 Neighborhood ()
 
Iterator End ()
 
Iterator Begin ()
 
ConstIterator End () const
 
ConstIterator Begin () const
 
TPixel & operator[] (NeighborIndexType i)
 
const TPixel & operator[] (NeighborIndexType i) const
 
TPixel & GetElement (NeighborIndexType i)
 
void SetRadius (const SizeValueType *rad)
 
AllocatorTypeGetBufferReference ()
 
const AllocatorTypeGetBufferReference () const
 
TPixel & operator[] (const OffsetType &o)
 
const TPixel & operator[] (const OffsetType &o) const
 

Protected Types

typedef
Superclass::CoefficientVector 
CoefficientVector
 
- Protected Types inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
typedef std::vector
< PixelRealType
CoefficientVector
 

Protected Member Functions

void Fill (const CoefficientVector &)
 
CoefficientVector GenerateCoefficients ()
 
- Protected Member Functions inherited from itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >
virtual void FillCenteredDirectional (const CoefficientVector &)
 
void InitializeToZero ()
 
- Protected Member Functions inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
virtual void Allocate (NeighborIndexType i)
 
virtual void ComputeNeighborhoodOffsetTable ()
 
virtual void ComputeNeighborhoodStrideTable ()
 
void SetSize ()
 

Private Attributes

double m_DerivativeScalings [VDimension]
 

Additional Inherited Members

- Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
typedef::itk::Size< VDimension > RadiusType
 
typedef::itk::Size< VDimension > SizeType
 
- Static Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, TAllocator >
static const unsigned int NeighborhoodDimension = VDimension
 

Member Typedef Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef Superclass::CoefficientVector itk::LaplacianOperator< TPixel, VDimension, TAllocator >::CoefficientVector
protected

Typedef support for coefficient vector type. Necessary to work around compiler bug on VC++.

Definition at line 127 of file itkLaplacianOperator.h.

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
typedef Superclass::PixelType itk::LaplacianOperator< TPixel, VDimension, TAllocator >::PixelType

Definition at line 75 of file itkLaplacianOperator.h.

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

Standard "Self" typedef support.

Definition at line 70 of file itkLaplacianOperator.h.

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

Definition at line 76 of file itkLaplacianOperator.h.

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

Standard "Superclass" typedef.

Definition at line 73 of file itkLaplacianOperator.h.

Constructor & Destructor Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
itk::LaplacianOperator< TPixel, VDimension, TAllocator >::LaplacianOperator ( )
inline
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
itk::LaplacianOperator< TPixel, VDimension, TAllocator >::LaplacianOperator ( const Self other)
inline

Member Function Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::LaplacianOperator< TPixel, VDimension, TAllocator >::CreateOperator ( )

This function is called to create the operator

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

Arranges coefficients spatially in the memory buffer, default function was NOT used.

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

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

Calculates operator coefficients.

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

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
Self& itk::LaplacianOperator< TPixel, VDimension, TAllocator >::operator= ( const Self other)
inline
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
virtual void itk::LaplacianOperator< TPixel, VDimension, TAllocator >::PrintSelf ( std::ostream &  os,
Indent  i 
) const
inlinevirtual
template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
void itk::LaplacianOperator< TPixel, VDimension, TAllocator >::SetDerivativeScalings ( const double *  s)

Sets the weights that are applied to the derivative in each axial direction when the kernel is computed. These weights are all 1.0 by default. This method must be called BEFORE CreateOperator

Member Data Documentation

template<typename TPixel , unsigned int VDimension = 2, typename TAllocator = NeighborhoodAllocator< TPixel >>
double itk::LaplacianOperator< TPixel, VDimension, TAllocator >::m_DerivativeScalings[VDimension]
private

Weights applied to derivatives in each axial direction

Definition at line 138 of file itkLaplacianOperator.h.

Referenced by itk::LaplacianOperator< TPixel, VDimension, TAllocator >::LaplacianOperator().


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