ITK
6.0.0
Insight Toolkit
|
#include <itkGaussianOperator.h>
A NeighborhoodOperator whose coefficients are a one dimensional, discrete Gaussian kernel.
GaussianOperator can be used to perform Gaussian blurring by taking its inner product with a Neighborhood (NeighborhoodIterator) that is swept across an image region. It is a directional operator. N successive applications oriented along each dimensional direction will effect separable, efficient, N-D Gaussian blurring of an image region.
GaussianOperator takes two parameters:
(1) The floating-point variance of the desired Gaussian function.
(2) The "maximum error" allowed in the discrete Gaussian function. "Maximum error" is defined as the difference between the area under the discrete Gaussian curve and the area under the continuous Gaussian. Maximum error affects the Gaussian operator size. Care should be taken not to make this value too small relative to the variance lest the operator size become unreasonably large.
References: The Gaussian kernel contained in this operator was described by Tony Lindeberg (Discrete Scale-Space Theory and the Scale-Space Primal Sketch. Dissertation. Royal Institute of Technology, Stockholm, Sweden. May 1991.).
Definition at line 69 of file itkGaussianOperator.h.
Protected Types | |
using | CoefficientVector = typename std::vector< PixelRealType > |
Protected Types inherited from itk::NeighborhoodOperator< TPixel, 2, NeighborhoodAllocator< TPixel > > | |
using | CoefficientVector = typename std::vector< PixelRealType > |
Protected Member Functions | |
void | Fill (const CoefficientVector &coeff) override |
CoefficientVector | GenerateCoefficients () override |
Protected Member Functions inherited from itk::NeighborhoodOperator< TPixel, 2, NeighborhoodAllocator< TPixel > > | |
virtual void | Fill (const CoefficientVector &)=0 |
virtual void | FillCenteredDirectional (const CoefficientVector &) |
virtual CoefficientVector | GenerateCoefficients ()=0 |
void | InitializeToZero () |
Protected Member Functions inherited from itk::Neighborhood< TPixel, VDimension, NeighborhoodAllocator< TPixel > > | |
virtual void | Allocate (NeighborIndexType i) |
virtual void | ComputeNeighborhoodOffsetTable () |
virtual void | ComputeNeighborhoodStrideTable () |
virtual void | PrintSelf (std::ostream &, Indent) const |
void | SetSize () |
Private Attributes | |
bool | m_Debug { false } |
double | m_MaximumError { .01 } |
unsigned int | m_MaximumKernelWidth { 30 } |
double | m_Variance { 1 } |
Additional Inherited Members | |
Static Public Attributes inherited from itk::Neighborhood< TPixel, VDimension, NeighborhoodAllocator< TPixel > > | |
static constexpr unsigned int | NeighborhoodDimension |
|
protected |
Type alias support for coefficient vector type. Necessary to fix bug in the microsoft VC++ compiler.
Definition at line 153 of file itkNeighborhoodOperator.h.
using itk::GaussianOperator< TPixel, VDimension, TAllocator >::Self = GaussianOperator |
Standard class type aliases.
Definition at line 74 of file itkGaussianOperator.h.
using itk::GaussianOperator< TPixel, VDimension, TAllocator >::Superclass = NeighborhoodOperator<TPixel, VDimension, TAllocator> |
Definition at line 75 of file itkGaussianOperator.h.
|
inline |
Turn debugging output off.
Definition at line 164 of file itkGaussianOperator.h.
|
inline |
Turn debugging output on.
Definition at line 157 of file itkGaussianOperator.h.
|
inlineoverrideprotectedvirtual |
Arranges coefficients spatially in the memory buffer.
Implements itk::NeighborhoodOperator< TPixel, 2, NeighborhoodAllocator< TPixel > >.
Definition at line 202 of file itkGaussianOperator.h.
|
overrideprotectedvirtual |
Calculates operator coefficients.
Implements itk::NeighborhoodOperator< TPixel, 2, NeighborhoodAllocator< TPixel > >.
|
inline |
Get the value of the debug flag. Mimics the itk::Object interface so that itkDebugMacro can be used in selective printouts from Gaussian kernel generation.
Definition at line 150 of file itkGaussianOperator.h.
|
inline |
Returns the maximum error of the gaussian approximation. Maximum error is the difference between the area under the discrete Gaussian curve and the area under the continuous Gaussian. Maximum error affects the Gaussian operator size.
Definition at line 114 of file itkGaussianOperator.h.
|
inline |
Returns the maximum allowed kernel width.
Definition at line 131 of file itkGaussianOperator.h.
|
overridevirtual |
Reimplemented from itk::Neighborhood< TPixel, VDimension, NeighborhoodAllocator< TPixel > >.
|
inline |
Returns the variance of the Gaussian (scale) for the operator.
Definition at line 104 of file itkGaussianOperator.h.
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI | ( | int | , |
double | |||
) |
Returns the value of the modified Bessel function Ik(x) at a point x>=0, where k>=2.
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI0 | ( | double | ) |
Returns the value of the modified Bessel function I0(x) at a point x >= 0.
double itk::GaussianOperator< TPixel, VDimension, TAllocator >::ModifiedBesselI1 | ( | double | ) |
Returns the value of the modified Bessel function I1(x) at a point x, x real.
|
inlineoverridevirtual |
Standard itk object method.
Reimplemented from itk::Neighborhood< TPixel, VDimension, NeighborhoodAllocator< TPixel > >.
Definition at line 137 of file itkGaussianOperator.h.
|
inline |
Set the value of the debug flag. A non-zero value turns debugging on.
Definition at line 171 of file itkGaussianOperator.h.
|
inline |
Sets the desired maximum error of the gaussian approximation. Maximum error is the difference between the area under the discrete Gaussian curve and the area under the continuous Gaussian. Maximum error affects the Gaussian operator size. The value must be between 0.0 and 1.0.
Definition at line 92 of file itkGaussianOperator.h.
|
inline |
Sets a limit for growth of the kernel. Small maximum error values with large variances will yield very large kernel sizes. This value can be used to truncate a kernel in such instances. A warning will be given on truncation of the kernel.
Definition at line 124 of file itkGaussianOperator.h.
|
inline |
Sets the desired variance of the Gaussian kernel.
Definition at line 82 of file itkGaussianOperator.h.
|
mutableprivate |
Enable/disable kernel generation debug warnings
Definition at line 221 of file itkGaussianOperator.h.
|
private |
Difference between the areas under the curves of the continuous and discrete Gaussian functions.
Definition at line 213 of file itkGaussianOperator.h.
|
private |
Maximum kernel size allowed. This value is used to truncate a kernel that has grown too large. A warning is given when the specified maximum error causes the kernel to exceed this size.
Definition at line 218 of file itkGaussianOperator.h.
|
private |
Desired variance of the discrete Gaussian function.
Definition at line 209 of file itkGaussianOperator.h.