#include <itkGaussianDerivativeOperator.h>
A NeighborhoodOperator whose coefficients are a one dimensional, discrete derivative Gaussian kernel.
GaussianDerivativeOperator can be used to calculate Gaussian derivatives by taking its inner product with to a Neighborhood (NeighborhoodIterator) that is swept across an image region. It is a directional operator. N successive applications oriented along each dimensional direction will calculate separable, efficient, N-D Gaussian derivatives of an image region.
GaussianDerivativeOperator takes three parameters:
(1) The floating-point variance of the desired Gaussian function.
(2) The order of the derivative to be calculated (zero order means it performs only smoothing as a standard itk::GaussianOperator)
(3) 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 in [70].
This implementation is derived from the Insight Journal paper: https://doi.org/10.54294/mrg5is
Definition at line 102 of file itkGaussianDerivativeOperator.h.
Public Member Functions | |
double | GetMaximumError () |
const char * | GetNameOfClass () const override |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | SetMaximumError (const double maxerror) |
void | SetNormalizeAcrossScale (bool flag) |
bool | GetNormalizeAcrossScale () const |
virtual void | NormalizeAcrossScaleOn () |
virtual void | NormalizeAcrossScaleOff () |
void | SetVariance (const double variance) |
double | GetVariance () const |
void | SetSpacing (const double spacing) |
double | GetSpacing () const |
void | SetMaximumKernelWidth (unsigned int n) |
virtual unsigned int | GetMaximumKernelWidth () const |
void | SetOrder (const unsigned int order) |
unsigned int | GetOrder () const |
![]() | |
virtual void | CreateDirectional () |
virtual void | CreateToRadius (const SizeType &) |
virtual void | CreateToRadius (const SizeValueType) |
virtual void | FlipAxes () |
unsigned int | GetDirection () const |
const char * | GetNameOfClass () const override |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | ScaleCoefficients (PixelRealType) |
void | SetDirection (const unsigned int direction) |
![]() | |
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 |
SizeType | GetSize () const |
SizeValueType | GetSize (DimensionValueType n) const |
std::slice | GetSlice (unsigned int) const |
OffsetValueType | GetStride (DimensionValueType axis) const |
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION (Self) | |
Neighborhood ()=default | |
Neighborhood (const Self &)=default | |
Neighborhood (Self &&)=default | |
Self & | operator= (const Self &)=default |
Self & | operator= (Self &&)=default |
bool | operator== (const Self &other) const |
void | Print (std::ostream &os) const |
void | SetRadius (const SizeType &) |
void | SetRadius (const SizeValueType *rad) |
void | SetRadius (const SizeValueType) |
NeighborIndexType | Size () const |
virtual | ~Neighborhood ()=default |
Iterator | End () |
Iterator | Begin () |
ConstIterator | End () const |
ConstIterator | Begin () const |
TPixel & | operator[] (NeighborIndexType i) |
const TPixel & | operator[] (NeighborIndexType i) const |
TPixel & | GetElement (NeighborIndexType i) |
AllocatorType & | GetBufferReference () |
const AllocatorType & | GetBufferReference () const |
TPixel & | operator[] (const OffsetType &o) |
const TPixel & | operator[] (const OffsetType &o) const |
Protected Types | |
using | CoefficientVector |
![]() | |
using | CoefficientVector = typename std::vector<PixelRealType> |
Protected Member Functions | |
void | Fill (const CoefficientVector &coeff) override |
CoefficientVector | GenerateCoefficients () override |
![]() | |
virtual void | FillCenteredDirectional (const CoefficientVector &) |
void | InitializeToZero () |
![]() | |
virtual void | Allocate (NeighborIndexType i) |
virtual void | ComputeNeighborhoodOffsetTable () |
virtual void | ComputeNeighborhoodStrideTable () |
void | SetSize () |
Static Protected Member Functions | |
static double | ModifiedBesselI (int, double) |
static double | ModifiedBesselI0 (double) |
static double | ModifiedBesselI1 (double) |
Private Member Functions | |
CoefficientVector | GenerateGaussianCoefficients () const |
Private Attributes | |
double | m_MaximumError { 0.005 } |
unsigned int | m_MaximumKernelWidth { 30 } |
bool | m_NormalizeAcrossScale { true } |
unsigned int | m_Order { 1 } |
double | m_Spacing { 1.0 } |
double | m_Variance { 1.0 } |
Additional Inherited Members | |
![]() | |
static constexpr unsigned int | NeighborhoodDimension = VDimension |
|
protected |
Type alias support for coefficient vector type. Necessary to fix bug in the microsoft VC++ compiler.
Definition at line 152 of file itkNeighborhoodOperator.h.
using itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::DerivativeOperatorType = DerivativeOperator<TPixel, VDimension, TAllocator> |
Definition at line 116 of file itkGaussianDerivativeOperator.h.
using itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::GaussianOperatorType = GaussianOperator<TPixel, VDimension, TAllocator> |
Neighborhood operator types.
Definition at line 115 of file itkGaussianDerivativeOperator.h.
using itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::InterpolationModeEnum = GaussianDerivativeOperatorEnums::InterpolationMode |
Definition at line 112 of file itkGaussianDerivativeOperator.h.
using itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::Self = GaussianDerivativeOperator |
Standard class type aliases.
Definition at line 106 of file itkGaussianDerivativeOperator.h.
using itk::GaussianDerivativeOperator< TPixel, VDimension, TAllocator >::Superclass = NeighborhoodOperator<TPixel, VDimension, TAllocator> |
Definition at line 107 of file itkGaussianDerivativeOperator.h.
|
inlineoverrideprotectedvirtual |
Arranges coefficients spatially in the memory buffer.
Implements itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >.
Definition at line 238 of file itkGaussianDerivativeOperator.h.
|
overrideprotectedvirtual |
Calculates operator coefficients.
Implements itk::NeighborhoodOperator< TPixel, VDimension, TAllocator >.
|
private |
|
inline |
Definition at line 180 of file itkGaussianDerivativeOperator.h.
|
virtual |
Sets/Get 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.
|
overridevirtual |
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
|
inline |
Set/Get the flag for calculating scale-space normalized derivatives.
Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.
Definition at line 133 of file itkGaussianDerivativeOperator.h.
|
inline |
Sets/Get the order of the derivative.
Definition at line 205 of file itkGaussianDerivativeOperator.h.
|
inline |
Set/Get the spacing for the direction of this kernel.
Definition at line 162 of file itkGaussianDerivativeOperator.h.
|
inline |
Set/Get the variance of the Gaussian kernel.
Definition at line 149 of file itkGaussianDerivativeOperator.h.
|
staticprotected |
Returns the value of the modified Bessel function Ik(x) at a point x>=0, where k>=2.
|
staticprotected |
Returns the value of the modified Bessel function I0(x) at a point x >= 0.
|
staticprotected |
Returns the value of the modified Bessel function I1(x) at a point x, x real.
|
virtual |
Set/Get the flag for calculating scale-space normalized derivatives.
Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.
|
virtual |
Set/Get the flag for calculating scale-space normalized derivatives.
Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.
|
overridevirtual |
Standard itk object method.
Reimplemented from itk::Neighborhood< TPixel, VDimension, TAllocator >.
|
inline |
Set/Get 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 is clamped between 0.00001 and 0.99999.
Definition at line 172 of file itkGaussianDerivativeOperator.h.
|
inline |
Sets/Get 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 191 of file itkGaussianDerivativeOperator.h.
|
inline |
Set/Get the flag for calculating scale-space normalized derivatives.
Normalized derivatives are obtained multiplying by the scale parameter $t^1/order$. This use useful for scale-space selection algorithms such as blob detection. The scaling results in the value of the derivatives being independent of the size of an object.
Definition at line 128 of file itkGaussianDerivativeOperator.h.
|
inline |
Sets/Get the order of the derivative.
Definition at line 200 of file itkGaussianDerivativeOperator.h.
|
inline |
Set/Get the spacing for the direction of this kernel.
Definition at line 157 of file itkGaussianDerivativeOperator.h.
|
inline |
Set/Get the variance of the Gaussian kernel.
Definition at line 144 of file itkGaussianDerivativeOperator.h.
|
private |
Difference between the areas under the curves of the continuous and discrete Gaussian functions.
Definition at line 257 of file itkGaussianDerivativeOperator.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 262 of file itkGaussianDerivativeOperator.h.
|
private |
Normalize derivatives across scale space
Definition at line 250 of file itkGaussianDerivativeOperator.h.
|
private |
Order of the derivative.
Definition at line 265 of file itkGaussianDerivativeOperator.h.
|
private |
Spacing in the direction of this kernel.
Definition at line 268 of file itkGaussianDerivativeOperator.h.
|
private |
Desired variance of the discrete Gaussian function.
Definition at line 253 of file itkGaussianDerivativeOperator.h.