18 #ifndef itkDiscreteGaussianImageFilter_h
19 #define itkDiscreteGaussianImageFilter_h
63 template <
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!")]] =
131 itkGetConstMacro(Variance,
const ArrayType);
138 itkGetConstMacro(MaximumError,
const ArrayType);
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);
278 GetKernelRadius(
const unsigned int dimension)
const;
282 GetKernelRadius()
const;
287 GetKernelSize()
const;
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);
329 itkLegacyMacro(
unsigned int GetInternalNumberOfStreamDivisions()
const;)
330 itkLegacyMacro(
void SetInternalNumberOfStreamDivisions(
unsigned int);)
332 #ifdef ITK_USE_CONCEPT_CHECKING
335 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputPixelValueType>));
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;
354 PrintSelf(std::ostream & os,
Indent indent)
const override;
363 GenerateInputRequestedRegion()
override;
371 GenerateData()
override;
375 GenerateKernel(
const unsigned int dimension, KernelType & oper)
const;
379 GetKernelVarianceArray()
const;
393 unsigned int m_MaximumKernelWidth{};
396 unsigned int m_FilterDimensionality{};
399 bool m_UseImageSpacing{};
416 #ifndef ITK_MANUAL_INSTANTIATION
417 # include "itkDiscreteGaussianImageFilter.hxx"