ITK  6.0.0
Insight Toolkit
itkIterativeDeconvolutionImageFilter.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 itkIterativeDeconvolutionImageFilter_h
19#define itkIterativeDeconvolutionImageFilter_h
20
23
24namespace itk
25{
51template <typename TInputImage,
52 typename TKernelImage = TInputImage,
53 typename TOutputImage = TInputImage,
54 typename TInternalPrecision = double>
55class ITK_TEMPLATE_EXPORT IterativeDeconvolutionImageFilter
56 : public FFTConvolutionImageFilter<TInputImage, TKernelImage, TOutputImage, TInternalPrecision>
57{
58public:
59 ITK_DISALLOW_COPY_AND_MOVE(IterativeDeconvolutionImageFilter);
60
66
68 using InputImageType = TInputImage;
69 using KernelImageType = TKernelImage;
70 using OutputImageType = TOutputImage;
71
73 using typename Superclass::InternalImageType;
74 using typename Superclass::InternalImagePointerType;
75 using typename Superclass::InternalComplexType;
76 using typename Superclass::InternalComplexImageType;
77 using typename Superclass::InternalComplexImagePointerType;
78
80 itkOverrideGetNameOfClassMacro(IterativeDeconvolutionImageFilter);
81
83 itkSetMacro(NumberOfIterations, unsigned int);
84 itkGetMacro(NumberOfIterations, unsigned int);
88 itkGetModifiableObjectMacro(CurrentEstimate, InternalImageType);
89
92 void
94 {
95 // Don't call Modified() to avoid triggering a new update.
96 m_StopIteration = stop;
97 }
98 itkGetConstMacro(StopIteration, bool);
102 itkGetConstMacro(Iteration, unsigned int);
103
104protected:
107
109 virtual void
110 Initialize(ProgressAccumulator * progress, float progressWeight, float iterationProgressWeight);
111
113 virtual void
114 Iteration(ProgressAccumulator * itkNotUsed(progress), float itkNotUsed(iterationProgressWeight)) = 0;
115
117 virtual void
118 Finish(ProgressAccumulator * progress, float progressWeight);
119
127 void
129
132 void
133 GenerateData() override;
134
137
139 InternalImagePointerType m_CurrentEstimate{};
140
141 using typename Superclass::FFTFilterType;
142 using typename Superclass::IFFTFilterType;
143
144 void
145 PrintSelf(std::ostream & os, Indent indent) const override;
146
147private:
149 unsigned int m_NumberOfIterations{};
150
152 unsigned int m_Iteration{};
153
155 bool m_StopIteration{};
156
158 ModifiedTimeType m_InputMTime{};
159 ModifiedTimeType m_KernelMTime{};
160};
161} // end namespace itk
162
163#ifndef ITK_MANUAL_INSTANTIATION
164# include "itkIterativeDeconvolutionImageFilter.hxx"
165#endif
166
167#endif
Convolve a given image with an arbitrary image kernel using multiplication in the Fourier domain.
Templated n-dimensional image class.
Definition: itkImage.h:89
Control indentation during Print() invocation.
Definition: itkIndent.h:50
Abstract base class for filters that implement iterative deconvolution algorithms.
void PrintSelf(std::ostream &os, Indent indent) const override
virtual void Iteration(ProgressAccumulator *, float)=0
virtual void Finish(ProgressAccumulator *progress, float progressWeight)
virtual void Initialize(ProgressAccumulator *progress, float progressWeight, float iterationProgressWeight)
Light weight base class for most itk classes.
Facilitates progress reporting for filters that wrap around multiple other filters.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:105