18#ifndef itkDiscreteGaussianImageFilter_h
19#define itkDiscreteGaussianImageFilter_h
63template <
typename TInputImage,
typename TOutputImage = TInputImage>
98 static constexpr unsigned int ImageDimension = TOutputImage::ImageDimension;
107#ifndef ITK_FUTURE_LEGACY_REMOVE
108 using InputBoundaryConditionPointerType [[deprecated(
"Please just use `BoundaryConditionType *` instead!")]] =
143 itkGetConstMacro(MaximumKernelWidth,
unsigned int);
144 itkSetMacro(MaximumKernelWidth,
unsigned int);
152 itkGetConstMacro(FilterDimensionality,
unsigned int);
153 itkSetMacro(FilterDimensionality,
unsigned int);
176 m_MaximumError.Fill(v);
185 for (
unsigned int i = 0; i < ImageDimension; ++i)
189 this->SetVariance(dv);
197 for (
unsigned int i = 0; i < ImageDimension; ++i)
201 this->SetVariance(dv);
210 for (
unsigned int i = 0; i < ImageDimension; ++i)
212 variance[i] = sigma[i] * sigma[i];
214 this->SetVariance(variance);
222 this->SetSigma(sigmas);
227 this->SetVariance(sigma * sigma);
236 for (
unsigned int i = 0; i < ImageDimension; ++i)
238 sigmas[i] = std::sqrt(m_Variance[i]);
249 return std::sqrt(m_Variance[0]);
257 for (
unsigned int i = 0; i < ImageDimension; ++i)
261 this->SetMaximumError(dv);
269 for (
unsigned int i = 0; i < ImageDimension; ++i)
273 this->SetMaximumError(dv);
294 itkSetMacro(UseImageSpacing,
bool);
295 itkGetConstMacro(UseImageSpacing,
bool);
296 itkBooleanMacro(UseImageSpacing);
299#if !defined(ITK_FUTURE_LEGACY_REMOVE)
305 SetUseImageSpacingOn()
307 this->SetUseImageSpacing(
true);
314 SetUseImageSpacingOff()
316 this->SetUseImageSpacing(
false);
330 itkLegacyMacro(
void SetInternalNumberOfStreamDivisions(
unsigned int);)
332#ifdef ITK_USE_CONCEPT_CHECKING
343 m_Variance.Fill(0.0);
344 m_MaximumError.Fill(0.01);
345 m_MaximumKernelWidth = 32;
346 m_UseImageSpacing =
true;
347 m_FilterDimensionality = ImageDimension;
348 m_InputBoundaryCondition = &m_InputDefaultBoundaryCondition;
349 m_RealBoundaryCondition = &m_RealDefaultBoundaryCondition;
393 unsigned int m_MaximumKernelWidth{};
396 unsigned int m_FilterDimensionality{};
399 bool m_UseImageSpacing{};
416#ifndef ITK_MANUAL_INSTANTIATION
417# include "itkDiscreteGaussianImageFilter.hxx"
Blurs an image by separable convolution with discrete gaussian kernels. This filter performs Gaussian...
void SetVariance(const float *v)
void GenerateKernel(const unsigned int dimension, KernelType &oper) const
void SetSigma(const ArrayType &sigma)
void GenerateInputRequestedRegion() override
ArrayType GetKernelSize() const
typename NumericTraits< InputPixelType >::ValueType InputPixelValueType
typename TOutputImage::InternalPixelType OutputInternalPixelType
unsigned int GetKernelRadius(const unsigned int dimension) const
ArrayType GetSigmaArray() const
void SetVariance(const typename ArrayType::ValueType v)
typename TInputImage::InternalPixelType InputInternalPixelType
typename KernelType::RadiusType RadiusType
typename NumericTraits< RealOutputPixelType >::ValueType RealOutputPixelValueType
typename TInputImage::PixelType InputPixelType
void SetMaximumError(const typename ArrayType::ValueType v)
void SetSigma(double sigma)
void SetMaximumError(const float *v)
void SetVariance(const double *v)
ArrayType GetKernelRadius() const
TOutputImage OutputImageType
ArrayType GetKernelVarianceArray() const
~DiscreteGaussianImageFilter() override=default
typename NumericTraits< OutputPixelType >::ValueType OutputPixelValueType
DiscreteGaussianImageFilter()
void SetMaximumError(const double *v)
typename TOutputImage::PixelType OutputPixelType
TInputImage InputImageType
void PrintSelf(std::ostream &os, Indent indent) const override
void SetSigmaArray(const ArrayType &sigmas)
itkLegacyMacro(unsigned int GetInternalNumberOfStreamDivisions() const ;) itkLegacyMacro(void SetInternalNumberOfStreamDivisions(unsigned int)
Set/Get number of pieces to divide the input for the internal composite pipeline. The upstream pipeli...
void GenerateData() override
typename NumericTraits< OutputPixelType >::RealType RealOutputPixelType
A NeighborhoodOperator whose coefficients are a one dimensional, discrete Gaussian kernel.
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Control indentation during Print() invocation.
Light weight base class for most itk classes.
Define additional traits for native types such as int or float.
A function object that determines a neighborhood of values at an image boundary according to a Neuman...
#define itkConceptMacro(name, concept)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....