18 #ifndef itkWienerDeconvolutionImageFilter_h
19 #define itkWienerDeconvolutionImageFilter_h
75 template <
typename TInputImage,
76 typename TKernelImage = TInputImage,
77 typename TOutputImage = TInputImage,
78 typename TInternalPrecision =
double>
98 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
126 itkSetMacro(NoiseVariance,
double);
127 itkGetConstMacro(NoiseVariance,
double);
136 GenerateData()
override;
139 PrintSelf(std::ostream & os,
Indent indent)
const override;
147 template <
typename TPixel>
154 : m_NoisePowerSpectralDensityConstant(f.m_NoisePowerSpectralDensityConstant)
155 , m_KernelZeroMagnitudeThreshold(f.m_KernelZeroMagnitudeThreshold)
166 return !(*
this != other);
171 TPixel Pn = m_NoisePowerSpectralDensityConstant;
176 TPixel Pf = std::norm(I);
178 TPixel denominator = std::norm(H) + (Pn / (Pf - Pn));
180 if (std::abs(denominator) >= m_KernelZeroMagnitudeThreshold)
182 value = I * (std::conj(H) / denominator);
193 m_NoisePowerSpectralDensityConstant = constant;
198 return m_NoisePowerSpectralDensityConstant;
207 m_KernelZeroMagnitudeThreshold = mu;
212 return m_KernelZeroMagnitudeThreshold;
217 double m_NoisePowerSpectralDensityConstant = 0.0;
218 double m_KernelZeroMagnitudeThreshold = 0.0;
224 #ifndef ITK_MANUAL_INSTANTIATION
225 # include "itkWienerDeconvolutionImageFilter.hxx"