ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkLandweberDeconvolutionImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkLandweberDeconvolutionImageFilter_h
19#define itkLandweberDeconvolutionImageFilter_h
20
22
25
26namespace itk
27{
28namespace Functor
29{
35template <typename TInput1, typename TInput2, typename TInput3, typename TOutput>
36class ITK_TEMPLATE_EXPORT LandweberMethod
37{
38public:
39 bool
41 {
42 return true;
43 }
44
46
47 inline TOutput
48 operator()(const TInput1 & estimateFT, const TInput2 & kernelFT, const TInput2 & inputFT) const
49 {
50 return m_Alpha * std::conj(kernelFT) * inputFT +
51 (NumericTraits<typename TInput1::value_type>::OneValue() - m_Alpha * std::norm(kernelFT)) * estimateFT;
52 }
53
54 typename TInput1::value_type m_Alpha;
55};
56} // end namespace Functor
57
94template <typename TInputImage,
95 typename TKernelImage = TInputImage,
96 typename TOutputImage = TInputImage,
97 typename TInternalPrecision = double>
98class ITK_TEMPLATE_EXPORT LandweberDeconvolutionImageFilter
99 : public IterativeDeconvolutionImageFilter<TInputImage, TKernelImage, TOutputImage, TInternalPrecision>
100{
101public:
102 ITK_DISALLOW_COPY_AND_MOVE(LandweberDeconvolutionImageFilter);
103
109
111 using InputImageType = TInputImage;
112 using KernelImageType = TKernelImage;
113 using OutputImageType = TOutputImage;
114
116 using typename Superclass::InternalImageType;
118 using typename Superclass::InternalComplexType;
121
123 itkNewMacro(Self);
124
126 itkOverrideGetNameOfClassMacro(LandweberDeconvolutionImageFilter);
127
129 itkSetMacro(Alpha, double);
130 itkGetMacro(Alpha, double);
132
133protected:
136
137 void
138 Initialize(ProgressAccumulator * progress, float progressWeight, float iterationProgressWeight) override;
139
140 void
141 Iteration(ProgressAccumulator * progress, float iterationProgressWeight) override;
142
143 void
144 Finish(ProgressAccumulator * progress, float progressWeight) override;
145
146 using typename Superclass::FFTFilterType;
147 using typename Superclass::IFFTFilterType;
148
149 void
150 PrintSelf(std::ostream & os, Indent indent) const override;
151
152private:
153 double m_Alpha{};
154
156
163
165 typename IFFTFilterType::Pointer m_IFFTFilter{};
166};
167
168} // end namespace itk
169
170#ifndef ITK_MANUAL_INSTANTIATION
171# include "itkLandweberDeconvolutionImageFilter.hxx"
172#endif
173
174#endif
HalfHermitianToRealInverseFFTImageFilter< InternalComplexImageType, InternalImageType > IFFTFilterType
RealToHalfHermitianForwardFFTImageFilter< InternalImageType, InternalComplexImageType > FFTFilterType
Functor class for computing a Landweber iteration.
bool operator==(const LandweberMethod &) const
ITK_UNEQUAL_OPERATOR_MEMBER_FUNCTION(LandweberMethod)
TOutput operator()(const TInput1 &estimateFT, const TInput2 &kernelFT, const TInput2 &inputFT) const
Control indentation during Print() invocation.
Definition itkIndent.h:50
void Finish(ProgressAccumulator *progress, float progressWeight) override
void Initialize(ProgressAccumulator *progress, float progressWeight, float iterationProgressWeight) override
void Iteration(ProgressAccumulator *progress, float iterationProgressWeight) override
void PrintSelf(std::ostream &os, Indent indent) const override
Functor::LandweberMethod< InternalComplexType, InternalComplexType, InternalComplexType, InternalComplexType > LandweberFunctor
IterativeDeconvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > Superclass
TernaryGeneratorImageFilter< InternalComplexImageType, InternalComplexImageType, InternalComplexImageType, InternalComplexImageType > LandweberFilterType
Facilitates progress reporting for filters that wrap around multiple other filters.
Implements transparent reference counting.
Implements pixel-wise generic operation of three images or images with constants.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....