18#ifndef itkTikhonovDeconvolutionImageFilter_h
19#define itkTikhonovDeconvolutionImageFilter_h
50template <
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);
119 double m_RegularizationConstant{};
124template <
typename TInput1,
typename TInput2,
typename TOutput>
131 : m_RegularizationConstant(f.m_RegularizationConstant)
132 , m_KernelZeroMagnitudeThreshold(f.m_KernelZeroMagnitudeThreshold)
146 typename TOutput::value_type normH = std::norm(H);
147 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"
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(TikhonovDeconvolutionFunctor)
bool operator==(const TikhonovDeconvolutionFunctor &) const
double GetRegularizationConstant() const
~TikhonovDeconvolutionFunctor()=default
void SetRegularizationConstant(double constant)
TOutput operator()(const TInput1 &I, const TInput2 &H) const
TikhonovDeconvolutionFunctor(const TikhonovDeconvolutionFunctor &f)
void SetKernelZeroMagnitudeThreshold(double mu)
TikhonovDeconvolutionFunctor()=default
double GetKernelZeroMagnitudeThreshold() const
Control indentation during Print() invocation.
The direct linear inverse deconvolution filter.
Light weight base class for most itk classes.
An inverse deconvolution filter regularized in the Tikhonov sense.
TikhonovDeconvolutionImageFilter()
TInputImage InputImageType
TKernelImage KernelImageType
~TikhonovDeconvolutionImageFilter() override=default
void GenerateData() override
TOutputImage OutputImageType
void PrintSelf(std::ostream &os, Indent indent) const override
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
unsigned long SizeValueType