#include <itkDiscreteHessianGaussianImageFunction.h>
Compute the Hessian Gaussian of an image at a specific location in space by calculating discrete second-order gaussian derivatives. This class is templated over the input image type.
The Initialize() method must be called after setting the parameters and before evaluating the function.
This implementation was taken from the Insight Journal paper: https://doi.org/10.54294/mrg5is
Definition at line 46 of file itkDiscreteHessianGaussianImageFunction.h.
Public Member Functions | |
virtual::itk::LightObject::Pointer | CreateAnother () const |
OutputType | Evaluate (const PointType &point) const override |
OutputType | EvaluateAtContinuousIndex (const ContinuousIndexType &index) const override |
OutputType | EvaluateAtIndex (const IndexType &index) const override |
const char * | GetNameOfClass () const override |
virtual void | Initialize () |
void | SetInputImage (const InputImageType *ptr) override |
void | SetSigma (const double sigma) |
virtual void | SetVariance (VarianceArrayType _arg) |
virtual const VarianceArrayType | GetVariance () const |
virtual void | SetVariance (double data[]) |
virtual void | SetVariance (double variance) |
virtual void | SetMaximumError (double _arg) |
virtual double | GetMaximumError () const |
virtual void | SetNormalizeAcrossScale (bool _arg) |
virtual bool | GetNormalizeAcrossScale () const |
virtual void | NormalizeAcrossScaleOn () |
virtual void | NormalizeAcrossScaleOff () |
virtual void | SetUseImageSpacing (bool _arg) |
virtual bool | GetUseImageSpacing () const |
virtual void | UseImageSpacingOn () |
virtual void | UseImageSpacingOff () |
virtual void | SetMaximumKernelWidth (unsigned int _arg) |
virtual unsigned int | GetMaximumKernelWidth () const |
virtual void | SetInterpolationMode (const InterpolationModeEnum _arg) |
virtual InterpolationModeEnum | GetInterpolationMode () const |
![]() | |
void | ConvertContinuousIndexToNearestIndex (const ContinuousIndexType &cindex, IndexType &index) const |
void | ConvertPointToContinuousIndex (const PointType &point, ContinuousIndexType &cindex) const |
virtual const ContinuousIndexType & | GetEndContinuousIndex () const |
virtual const IndexType & | GetEndIndex () const |
const InputImageType * | GetInputImage () const |
const char * | GetNameOfClass () const override |
virtual const ContinuousIndexType & | GetStartContinuousIndex () const |
virtual const IndexType & | GetStartIndex () const |
virtual bool | IsInsideBuffer (const IndexType &index) const |
virtual bool | IsInsideBuffer (const ContinuousIndexType &index) const |
virtual bool | IsInsideBuffer (const PointType &point) const |
void | ConvertPointToNearestIndex (const PointType &point, IndexType &index) const |
![]() | |
virtual OutputType | Evaluate (const InputType &input) const=0 |
![]() | |
unsigned long | AddObserver (const EventObject &event, Command *cmd) const |
unsigned long | AddObserver (const EventObject &event, std::function< void(const EventObject &)> function) const |
LightObject::Pointer | CreateAnother () const override |
virtual void | DebugOff () const |
virtual void | DebugOn () const |
Command * | GetCommand (unsigned long tag) |
bool | GetDebug () const |
MetaDataDictionary & | GetMetaDataDictionary () |
const MetaDataDictionary & | GetMetaDataDictionary () const |
virtual ModifiedTimeType | GetMTime () const |
const char * | GetNameOfClass () const override |
virtual const TimeStamp & | GetTimeStamp () const |
bool | HasObserver (const EventObject &event) const |
void | InvokeEvent (const EventObject &) |
void | InvokeEvent (const EventObject &) const |
virtual void | Modified () const |
void | Register () const override |
void | RemoveAllObservers () |
void | RemoveObserver (unsigned long tag) const |
void | SetDebug (bool debugFlag) const |
void | SetReferenceCount (int) override |
void | UnRegister () const noexcept override |
void | SetMetaDataDictionary (const MetaDataDictionary &rhs) |
void | SetMetaDataDictionary (MetaDataDictionary &&rrhs) |
virtual void | SetObjectName (std::string _arg) |
virtual const std::string & | GetObjectName () const |
![]() | |
Pointer | Clone () const |
virtual void | Delete () |
virtual int | GetReferenceCount () const |
void | Print (std::ostream &os, Indent indent=0) const |
Static Public Member Functions | |
static Pointer | New () |
![]() | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
![]() | |
static void | BreakOnError () |
static Pointer | New () |
Static Public Attributes | |
static constexpr unsigned int | ImageDimension2 = InputImageType::ImageDimension |
![]() | |
static constexpr unsigned int | ImageDimension |
Protected Member Functions | |
DiscreteHessianGaussianImageFunction () | |
DiscreteHessianGaussianImageFunction (const Self &) | |
void | operator= (const Self &) |
void | PrintSelf (std::ostream &os, Indent indent) const override |
void | RecomputeGaussianKernel () |
~DiscreteHessianGaussianImageFunction () override=default | |
![]() | |
ImageFunction () | |
void | PrintSelf (std::ostream &os, Indent indent) const override |
~ImageFunction () override=default | |
![]() | |
FunctionBase ()=default | |
~FunctionBase () override=default | |
![]() | |
Object () | |
bool | PrintObservers (std::ostream &os, Indent indent) const |
void | PrintSelf (std::ostream &os, Indent indent) const override |
virtual void | SetTimeStamp (const TimeStamp &timeStamp) |
~Object () override | |
![]() | |
virtual LightObject::Pointer | InternalClone () const |
LightObject () | |
virtual void | PrintHeader (std::ostream &os, Indent indent) const |
virtual void | PrintTrailer (std::ostream &os, Indent indent) const |
virtual | ~LightObject () |
Private Attributes | |
InterpolationModeEnum | m_InterpolationMode { InterpolationModeEnum::NearestNeighbourInterpolation } |
KernelArrayType | m_KernelArray {} |
double | m_MaximumError { 0.005 } |
unsigned int | m_MaximumKernelWidth { 30 } |
bool | m_NormalizeAcrossScale { true } |
GaussianDerivativeOperatorArrayType | m_OperatorArray {} |
OperatorImageFunctionPointer | m_OperatorImageFunction {} |
bool | m_UseImageSpacing { true } |
VarianceArrayType | m_Variance {} |
Additional Inherited Members | |
![]() | |
ContinuousIndexType | m_EndContinuousIndex |
IndexType | m_EndIndex |
InputImageConstPointer | m_Image |
ContinuousIndexType | m_StartContinuousIndex |
IndexType | m_StartIndex |
![]() | |
std::atomic< int > | m_ReferenceCount {} |
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::ConstPointer = SmartPointer<const Self> |
Definition at line 60 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::GaussianDerivativeOperatorArrayType = FixedArray<GaussianDerivativeOperatorType, 3 * Self::ImageDimension2> |
Array to store gaussian derivative operators from zero to second order (3*ImageDimension operators)
Definition at line 89 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::GaussianDerivativeOperatorType = itk::GaussianDerivativeOperator<TOutput, Self::ImageDimension2> |
Definition at line 85 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::InterpolationModeEnum = itk::GaussianDerivativeOperatorEnums::InterpolationMode |
Definition at line 102 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::KernelArrayType = FixedArray<KernelType, Self::ImageDimension2 *(Self::ImageDimension2 + 1) / 2> |
Array to store precomputed N-dimensional kernels for the hessian components
Definition at line 95 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::KernelType = Neighborhood<TOutput, Self::ImageDimension2> |
Definition at line 91 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::OperatorImageFunctionPointer = typename OperatorImageFunctionType::Pointer |
Definition at line 100 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::OperatorImageFunctionType = NeighborhoodOperatorImageFunction<InputImageType, TOutput> |
Image function that performs convolution with the neighborhood operator
Definition at line 99 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::Pointer = SmartPointer<Self> |
Smart pointer type alias support
Definition at line 59 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::Self = DiscreteHessianGaussianImageFunction |
Standard "Self" type alias
Definition at line 52 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::Superclass |
Standard "Superclass" type alias
Definition at line 55 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::TensorType = SymmetricSecondRankTensor<TOutput, TInputImage::ImageDimension> |
Output type
Definition at line 80 of file itkDiscreteHessianGaussianImageFunction.h.
using itk::DiscreteHessianGaussianImageFunction< TInputImage, TOutput >::VarianceArrayType = FixedArray<double, Self::ImageDimension2> |
Definition at line 83 of file itkDiscreteHessianGaussianImageFunction.h.
|
protected |
Referenced by GetNameOfClass().
|
inlineprotected |
Definition at line 202 of file itkDiscreteHessianGaussianImageFunction.h.
|
overrideprotecteddefault |
|
virtual |
Create an object from an instance, potentially deferring to a factory. This method allows you to create an instance of an object that is exactly the same type as the referring object. This is useful in cases where an object has been cast back to a base class.
Reimplemented from itk::LightObject.
|
overridevirtual |
Evaluate the in the given dimension at specified point
Implements itk::ImageFunction< TInputImage, SymmetricSecondRankTensor< double, TInputImage::ImageDimension >, double >.
References itk::point().
|
overridevirtual |
Evaluate the function at specified ContinuousIndex position
Implements itk::ImageFunction< TInputImage, SymmetricSecondRankTensor< double, TInputImage::ImageDimension >, double >.
|
overridevirtual |
Evaluate the function at specified Index position
Implements itk::ImageFunction< TInputImage, SymmetricSecondRankTensor< double, TInputImage::ImageDimension >, double >.
|
virtual |
Set/Get the interpolation mode.
|
virtual |
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.
|
virtual |
Set/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::LightObject.
References DiscreteHessianGaussianImageFunction().
|
virtual |
Set/Get the flag for calculating scale-space normalized derivatives. Normalized derivatives are obtained multiplying by the scale parameter t.
|
virtual |
Set/Get the flag for using image spacing when calculating derivatives.
|
virtual |
Set/Get the variance for the discrete Gaussian kernel. Sets the variance for individual dimensions. The default is 0.0 in each dimension. If UseImageSpacing is true, the units are the physical units of your image. If UseImageSpacing is false then the units are pixels.
|
inlinevirtual |
Initialize the Gaussian kernel. Call this method before evaluating the function. This method MUST be called after any changes to function parameters.
Definition at line 195 of file itkDiscreteHessianGaussianImageFunction.h.
References RecomputeGaussianKernel().
|
static |
Method for creation through the object factory
|
virtual |
Set/Get the flag for calculating scale-space normalized derivatives. Normalized derivatives are obtained multiplying by the scale parameter t.
|
virtual |
Set/Get the flag for calculating scale-space normalized derivatives. Normalized derivatives are obtained multiplying by the scale parameter t.
|
inlineprotected |
Definition at line 207 of file itkDiscreteHessianGaussianImageFunction.h.
|
overrideprotectedvirtual |
Methods invoked by Print() to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from itk::LightObject.
|
protected |
Referenced by Initialize().
|
overridevirtual |
Set the input image.
Reimplemented from itk::ImageFunction< TInputImage, SymmetricSecondRankTensor< double, TInputImage::ImageDimension >, double >.
|
virtual |
Set/Get the interpolation mode.
|
virtual |
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.
|
virtual |
Set/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.
|
virtual |
Set/Get the flag for calculating scale-space normalized derivatives. Normalized derivatives are obtained multiplying by the scale parameter t.
|
inline |
Convenience method for setting the variance through the standard deviation
Definition at line 144 of file itkDiscreteHessianGaussianImageFunction.h.
References SetVariance().
|
virtual |
Set/Get the flag for using image spacing when calculating derivatives.
|
virtual |
Set/Get the variance for the discrete Gaussian kernel. Sets the variance for individual dimensions. The default is 0.0 in each dimension. If UseImageSpacing is true, the units are the physical units of your image. If UseImageSpacing is false then the units are pixels.
References itk::FixedArray< double, Self::ImageDimension2 >::Length.
|
inlinevirtual |
Convenience method for setting the variance for all dimensions
Definition at line 134 of file itkDiscreteHessianGaussianImageFunction.h.
References m_Variance, and itk::Object::Modified().
|
virtual |
Set/Get the variance for the discrete Gaussian kernel. Sets the variance for individual dimensions. The default is 0.0 in each dimension. If UseImageSpacing is true, the units are the physical units of your image. If UseImageSpacing is false then the units are pixels.
Referenced by SetSigma().
|
virtual |
Set/Get the flag for using image spacing when calculating derivatives.
|
virtual |
Set/Get the flag for using image spacing when calculating derivatives.
|
staticconstexpr |
Dimension of the underlying image
Definition at line 77 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
Interpolation mode
Definition at line 249 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
Array of N-dimensional kernels which are the result of convolving the operators for calculating hessian matrix derivatives
Definition at line 237 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
Difference between the areas under the curves of the continuous and discrete Gaussian functions
Definition at line 221 of file itkDiscreteHessianGaussianImageFunction.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 226 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
Flag for scale-space normalization of derivatives
Definition at line 243 of file itkDiscreteHessianGaussianImageFunction.h.
|
mutableprivate |
Array of derivative operators, one for each dimension and order. First N zero-order operators are stored, then N first-order and then N second-order making 3*N operators altogether where N=ImageDimension.
Definition at line 232 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
OperatorImageFunction
Definition at line 240 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
Flag to indicate whether to use image spacing
Definition at line 246 of file itkDiscreteHessianGaussianImageFunction.h.
|
private |
Desired variance of the discrete Gaussian function
Definition at line 217 of file itkDiscreteHessianGaussianImageFunction.h.
Referenced by SetVariance().