ITK
6.0.0
Insight Toolkit
|
#include <itkRecursiveGaussianImageFilter.h>
Base class for computing IIR convolution with an approximation of a Gaussian kernel.
\[ \frac{ 1 }{ \sigma \sqrt{ 2 \pi } } \exp{ \left( - \frac{x^2}{ 2 \sigma^2 } \right) } \]
RecursiveGaussianImageFilter is the base class for recursive filters that approximate convolution with the Gaussian kernel. This class implements the recursive filtering method proposed by R.Deriche in IEEE-PAMI Vol.12, No.1, January 1990, pp 78-87, "Fast Algorithms for Low-Level Vision"
Details of the implementation are described in the technical report: R. Deriche, "Recursively Implementing The Gaussian and Its Derivatives", INRIA, 1993, ftp://ftp.inria.fr/INRIA/tech-reports/RR/RR-1893.ps.gz
Further improvements of the algorithm are described in: G. Farnebäck & C.-F. Westin, "Improving Deriche-style Recursive Gaussian Filters". J Math Imaging Vis 26, 293–299 (2006). https://doi.org/10.1007/s10851-006-8464-z
As compared to itk::DiscreteGaussianImageFilter, this filter tends to be faster for large kernels, and it can take the derivative of the blurred image in one step. Also, note that we have itk::RecursiveGaussianImageFilter::SetSigma(), but itk::DiscreteGaussianImageFilter::SetVariance().
Definition at line 100 of file itkRecursiveGaussianImageFilter.h.
Static Public Member Functions | |
static Pointer | New () |
Static Public Member Functions inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
static double | GetGlobalDefaultCoordinateTolerance () |
static double | GetGlobalDefaultDirectionTolerance () |
static void | SetGlobalDefaultCoordinateTolerance (double) |
static void | SetGlobalDefaultDirectionTolerance (double) |
Static Public Member Functions inherited from itk::Object | |
static bool | GetGlobalWarningDisplay () |
static void | GlobalWarningDisplayOff () |
static void | GlobalWarningDisplayOn () |
static Pointer | New () |
static void | SetGlobalWarningDisplay (bool val) |
Static Public Member Functions inherited from itk::LightObject | |
static void | BreakOnError () |
static Pointer | New () |
Private Member Functions | |
void | ComputeDCoefficients (ScalarRealType sigmad, ScalarRealType W1, ScalarRealType L1, ScalarRealType W2, ScalarRealType L2, ScalarRealType &SD, ScalarRealType &DD, ScalarRealType &ED) |
void | ComputeNCoefficients (ScalarRealType sigmad, ScalarRealType A1, ScalarRealType B1, ScalarRealType W1, ScalarRealType L1, ScalarRealType A2, ScalarRealType B2, ScalarRealType W2, ScalarRealType L2, ScalarRealType &N0, ScalarRealType &N1, ScalarRealType &N2, ScalarRealType &N3, ScalarRealType &SN, ScalarRealType &DN, ScalarRealType &EN) |
void | ComputeRemainingCoefficients (bool symmetric) |
Private Attributes | |
bool | m_NormalizeAcrossScale {} |
GaussianOrderEnum | m_Order {} |
ScalarRealType | m_Sigma {} |
Additional Inherited Members | |
Static Public Attributes inherited from itk::InPlaceImageFilter< TInputImage, TInputImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
static constexpr unsigned int | InputImageDimension |
static constexpr unsigned int | OutputImageDimension |
Static Public Attributes inherited from itk::ImageSource< TInputImage > | |
static constexpr unsigned int | OutputImageDimension |
Protected Types inherited from itk::ImageToImageFilter< TInputImage, TInputImage > | |
using | InputToOutputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::OutputImageDimension, Self::InputImageDimension > |
using | OutputToInputRegionCopierType = ImageToImageFilterDetail::ImageRegionCopier< Self::InputImageDimension, Self::OutputImageDimension > |
Static Protected Member Functions inherited from itk::RecursiveSeparableImageFilter< TInputImage, TInputImage > | |
static void | MathEMAMAMAM (T1 &out, const T1 &a1, const T2 &b1, const T1 &a2, const T2 &b2, const T1 &a3, const T2 &b3, const T1 &a4, const T2 &b4) |
static void | MathEMAMAMAM (VariableLengthVector< T1 > &out, const VariableLengthVector< T1 > &a1, const T2 &b1, const VariableLengthVector< T1 > &a2, const T2 &b2, const VariableLengthVector< T1 > &a3, const T2 &b3, const VariableLengthVector< T1 > &a4, const T2 &b4) |
static void | MathSMAMAMAM (T1 &out, const T1 &a1, const T2 &b1, const T1 &a2, const T2 &b2, const T1 &a3, const T2 &b3, const T1 &a4, const T2 &b4) |
static void | MathSMAMAMAM (VariableLengthVector< T1 > &out, const VariableLengthVector< T1 > &a1, const T2 &b1, const VariableLengthVector< T1 > &a2, const T2 &b2, const VariableLengthVector< T1 > &a3, const T2 &b3, const VariableLengthVector< T1 > &a4, const T2 &b4) |
Static Protected Member Functions inherited from itk::ImageSource< TInputImage > | |
static const ImageRegionSplitterBase * | GetGlobalDefaultSplitter () |
static ITK_THREAD_RETURN_FUNCTION_CALL_CONVENTION | ThreaderCallback (void *arg) |
Static Protected Member Functions inherited from itk::ProcessObject | |
template<typename TSourceObject > | |
static void | MakeRequiredOutputs (TSourceObject &sourceObject, const DataObjectPointerArraySizeType numberOfRequiredOutputs) |
static constexpr float | progressFixedToFloat (uint32_t fixed) |
static uint32_t | progressFloatToFixed (float f) |
Protected Attributes inherited from itk::RecursiveSeparableImageFilter< TInputImage, TInputImage > | |
ScalarRealType | m_BM1 |
ScalarRealType | m_BM2 |
ScalarRealType | m_BM3 |
ScalarRealType | m_BM4 |
ScalarRealType | m_BN1 |
ScalarRealType | m_BN2 |
ScalarRealType | m_BN3 |
ScalarRealType | m_BN4 |
ScalarRealType | m_D1 |
ScalarRealType | m_D2 |
ScalarRealType | m_D3 |
ScalarRealType | m_D4 |
ScalarRealType | m_M1 |
ScalarRealType | m_M2 |
ScalarRealType | m_M3 |
ScalarRealType | m_M4 |
ScalarRealType | m_N0 |
ScalarRealType | m_N1 |
ScalarRealType | m_N2 |
ScalarRealType | m_N3 |
Protected Attributes inherited from itk::ImageSource< TInputImage > | |
bool | m_DynamicMultiThreading |
Protected Attributes inherited from itk::ProcessObject | |
TimeStamp | m_OutputInformationMTime {} |
bool | m_Updating {} |
Protected Attributes inherited from itk::LightObject | |
std::atomic< int > | m_ReferenceCount {} |
using itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::ConstPointer = SmartPointer<const Self> |
Definition at line 110 of file itkRecursiveGaussianImageFilter.h.
using itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::OutputImageType = TOutputImage |
Type of the output image
Definition at line 130 of file itkRecursiveGaussianImageFilter.h.
using itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::Pointer = SmartPointer<Self> |
Definition at line 109 of file itkRecursiveGaussianImageFilter.h.
using itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::Self = RecursiveGaussianImageFilter |
Standard class type aliases.
Definition at line 107 of file itkRecursiveGaussianImageFilter.h.
using itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::Superclass = RecursiveSeparableImageFilter<TInputImage, TOutputImage> |
Definition at line 108 of file itkRecursiveGaussianImageFilter.h.
|
protected |
|
overrideprotecteddefault |
|
private |
Compute the D coefficients in the recursive filter.
|
private |
Compute the N coefficients in the recursive filter.
|
private |
Compute the M coefficients and the boundary coefficients in the recursive filter.
|
overridevirtual |
Reimplemented from itk::ProcessObject.
|
virtual |
|
virtual |
Set/Get the Order of the Gaussian to convolve with.
|
virtual |
Set/Get the Sigma, measured in world coordinates, of the Gaussian kernel. The default is 1.0. An exception will be generated if the Sigma value is less than or equal to zero.
|
static |
Method for creation through the object factory.
|
virtual |
|
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::ProcessObject.
void itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::SetFirstOrder | ( | ) |
Explicitly set a first order derivative.
|
virtual |
Set/Get the flag for normalizing the gaussian over scale-space.
This flag enables the analysis of the differential shape of features independent of their size ( both pixels and physical size ). Following the notation of Tony Lindeberg:
Let
\[ L(x; t) = g(x; t) \ast f(x) \]
be the scale-space representation of image
\[ f(x) \]
where
\[ g(x; t) = \frac{1}{ \sqrt{ 2 \pi t} } \exp{ \left( -\frac{x^2}{ 2 t } \right) } \]
is the Gaussian function and
\[\ast\]
denotes convolution. This is a change from above with
\[ t = \sigma^2 \]
.
Then the normalized derivative operator for normalized coordinates across scale is:
\[ \partial_\xi = \sqrt{t} \partial_x \]
The resulting scaling factor is
\[ \sigma^N \]
where N is the order of the derivative.
When this flag is ON the filter will be normalized in such a way that the values of derivatives are not biased by the size of the object. That is to say the maximum value a feature reaches across scale is independent of the scale of the object.
For analyzing an image across scale-space you want to enable this flag. It is disabled by default.
|
virtual |
Set/Get the Order of the Gaussian to convolve with.
void itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::SetSecondOrder | ( | ) |
Explicitly set a second order derivative.
|
virtual |
Set/Get the Sigma, measured in world coordinates, of the Gaussian kernel. The default is 1.0. An exception will be generated if the Sigma value is less than or equal to zero.
|
overrideprotectedvirtual |
Set up the coefficients of the filter to approximate a specific kernel. Here it is used to approximate a Gaussian or one of its derivatives. Parameter is the spacing along the dimension to filter.
Implements itk::RecursiveSeparableImageFilter< TInputImage, TInputImage >.
void itk::RecursiveGaussianImageFilter< TInputImage, TOutputImage >::SetZeroOrder | ( | ) |
Explicitly set a zeroth order derivative.
|
overrideprotectedvirtual |
Verifies that the process object has been configured correctly, that all required inputs are set, and needed parameters are set appropriately. If not valid an exceptions will be thrown.
This method is called before UpdateOutputInformation() is propagated to the inputs.
The ProcessObject's implementation verifies that the m_NumberOfRequiredInputs are set and not null.
Reimplemented from itk::ProcessObject.
|
private |
Normalize the image across scale space
Definition at line 266 of file itkRecursiveGaussianImageFilter.h.
|
private |
Definition at line 268 of file itkRecursiveGaussianImageFilter.h.
|
private |
Sigma of the gaussian kernel.
Definition at line 263 of file itkRecursiveGaussianImageFilter.h.