18 #ifndef itkDiscreteGaussianImageFilter_h
19 #define itkDiscreteGaussianImageFilter_h
62 template <
typename TInputImage,
typename TOutputImage = TInputImage>
97 static constexpr
unsigned int ImageDimension = TOutputImage::ImageDimension;
123 itkGetConstMacro(Variance,
const ArrayType);
130 itkGetConstMacro(MaximumError,
const ArrayType);
135 itkGetConstMacro(MaximumKernelWidth,
int);
136 itkSetMacro(MaximumKernelWidth,
int);
144 itkGetConstMacro(FilterDimensionality,
unsigned int);
145 itkSetMacro(FilterDimensionality,
unsigned int);
168 m_MaximumError.Fill(v);
177 for (
unsigned int i = 0; i < ImageDimension; i++)
181 this->SetVariance(dv);
189 for (
unsigned int i = 0; i < ImageDimension; i++)
193 this->SetVariance(dv);
204 for (
unsigned int i = 0; i < ImageDimension; i++)
206 variance[i] = sigmas[i] * sigmas[i];
208 this->SetVariance(variance);
213 this->SetVariance(sigma * sigma);
222 for (
unsigned int i = 0; i < ImageDimension; i++)
224 sigmas[i] = std::sqrt(m_Variance[i]);
235 return std::sqrt(m_Variance[0]);
243 for (
unsigned int i = 0; i < ImageDimension; i++)
247 this->SetMaximumError(dv);
255 for (
unsigned int i = 0; i < ImageDimension; i++)
259 this->SetMaximumError(dv);
267 itkSetMacro(UseImageSpacing,
bool);
268 itkGetConstMacro(UseImageSpacing,
bool);
269 itkBooleanMacro(UseImageSpacing);
272 #if !defined(ITK_FUTURE_LEGACY_REMOVE)
278 SetUseImageSpacingOn()
280 this->SetUseImageSpacing(
true);
287 SetUseImageSpacingOff()
289 this->SetUseImageSpacing(
false);
302 itkLegacyMacro(
unsigned int GetInternalNumberOfStreamDivisions()
const);
303 itkLegacyMacro(
void SetInternalNumberOfStreamDivisions(
unsigned int));
312 GenerateInputRequestedRegion()
override;
314 #ifdef ITK_USE_CONCEPT_CHECKING
317 itkConceptMacro(OutputHasNumericTraitsCheck, (Concept::HasNumericTraits<OutputPixelValueType>));
325 m_Variance.Fill(0.0);
326 m_MaximumError.Fill(0.01);
327 m_MaximumKernelWidth = 32;
328 m_UseImageSpacing =
true;
329 m_FilterDimensionality = ImageDimension;
330 m_InputBoundaryCondition = &m_InputDefaultBoundaryCondition;
331 m_RealBoundaryCondition = &m_RealDefaultBoundaryCondition;
336 PrintSelf(std::ostream & os,
Indent indent)
const override;
344 GenerateData()
override;
381 #ifndef ITK_MANUAL_INSTANTIATION
382 # include "itkDiscreteGaussianImageFilter.hxx"