18 #ifndef itkTikhonovDeconvolutionImageFilter_h
19 #define itkTikhonovDeconvolutionImageFilter_h
50 template <
typename TInputImage,
51 typename TKernelImage = TInputImage,
52 typename TOutputImage = TInputImage,
53 typename TInternalPrecision =
double>
73 static constexpr
unsigned int ImageDimension = TInputImage::ImageDimension;
78 using typename Superclass::InputPixelType;
79 using typename Superclass::OutputPixelType;
80 using typename Superclass::KernelPixelType;
81 using typename Superclass::InputIndexType;
82 using typename Superclass::OutputIndexType;
83 using typename Superclass::KernelIndexType;
84 using typename Superclass::InputSizeType;
85 using typename Superclass::OutputSizeType;
86 using typename Superclass::KernelSizeType;
88 using typename Superclass::InputRegionType;
89 using typename Superclass::OutputRegionType;
90 using typename Superclass::KernelRegionType;
93 using typename Superclass::InternalImageType;
94 using typename Superclass::InternalImagePointerType;
95 using typename Superclass::InternalComplexType;
96 using typename Superclass::InternalComplexImageType;
97 using typename Superclass::InternalComplexImagePointerType;
103 itkSetMacro(RegularizationConstant,
double);
104 itkGetConstMacro(RegularizationConstant,
double);
113 GenerateData()
override;
116 PrintSelf(std::ostream & os,
Indent indent)
const override;
119 double m_RegularizationConstant{};
124 template <
typename TInput1,
typename TInput2,
typename TOutput>
131 : m_RegularizationConstant(f.m_RegularizationConstant)
132 , m_KernelZeroMagnitudeThreshold(f.m_KernelZeroMagnitudeThreshold)
146 const typename TOutput::value_type normH = std::norm(H);
147 const typename TOutput::value_type denominator = normH + m_RegularizationConstant;
149 if (denominator >= m_KernelZeroMagnitudeThreshold)
151 value = static_cast<TOutput>(I * (std::conj(H) / denominator));
162 m_RegularizationConstant = constant;
167 return m_RegularizationConstant;
176 m_KernelZeroMagnitudeThreshold = mu;
181 return m_KernelZeroMagnitudeThreshold;
186 double m_RegularizationConstant = 0.0;
187 double m_KernelZeroMagnitudeThreshold = 0.0;
193 #ifndef ITK_MANUAL_INSTANTIATION
194 # include "itkTikhonovDeconvolutionImageFilter.hxx"