ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkIterativeDeconvolutionImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
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  * http://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 
22 #include "itkProgressAccumulator.h"
23 
24 namespace itk
25 {
50 template< typename TInputImage, typename TKernelImage=TInputImage, typename TOutputImage=TInputImage, typename TInternalPrecision=double >
51 class ITK_TEMPLATE_EXPORT IterativeDeconvolutionImageFilter :
52  public FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision >
53 {
54 public:
55  ITK_DISALLOW_COPY_AND_ASSIGN(IterativeDeconvolutionImageFilter);
56 
59  using Superclass = FFTConvolutionImageFilter< TInputImage,
60  TKernelImage,
61  TOutputImage,
62  TInternalPrecision >;
65 
67  using InputImageType = TInputImage;
68  using KernelImageType = TKernelImage;
69  using OutputImageType = TOutputImage;
70 
72  using InternalImageType = typename Superclass::InternalImageType;
73  using InternalImagePointerType = typename Superclass::InternalImagePointerType;
74  using InternalComplexType = typename Superclass::InternalComplexType;
75  using InternalComplexImageType = typename Superclass::InternalComplexImageType;
76  using InternalComplexImagePointerType = typename Superclass::InternalComplexImagePointerType;
77 
80 
82  itkSetMacro(NumberOfIterations, unsigned int);
83  itkGetMacro(NumberOfIterations, unsigned int);
85 
87  itkGetModifiableObjectMacro(CurrentEstimate, InternalImageType);
88 
91  void SetStopIteration(bool stop)
92  {
93  // Don't call Modified() to avoid triggering a new update.
94  m_StopIteration = stop;
95  }
96  itkGetConstMacro(StopIteration, bool);
98 
100  itkGetConstMacro(Iteration, unsigned int);
101 
102 protected:
105 
107  virtual void Initialize(ProgressAccumulator * progress,
108  float progressWeight,
109  float iterationProgressWeight);
110 
112  virtual void Iteration(ProgressAccumulator * itkNotUsed(progress),
113  float itkNotUsed(iterationProgressWeight)) = 0;
114 
116  virtual void Finish(ProgressAccumulator * progress,
117  float progressWeight);
118 
126  void GenerateInputRequestedRegion() override;
127 
130  void GenerateData() override;
131 
134 
137 
138  using FFTFilterType = typename Superclass::FFTFilterType;
139  using IFFTFilterType = typename Superclass::IFFTFilterType;
140 
141  void PrintSelf(std::ostream & os, Indent indent) const override;
142 
143 private:
145  unsigned int m_NumberOfIterations;
146 
148  unsigned int m_Iteration;
149 
152 
156 
157 };
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkIterativeDeconvolutionImageFilter.hxx"
162 #endif
163 
164 #endif
Abstract base class for the convolution image filters.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Base class for all process objects that output image data.
Convolve a given image with an arbitrary image kernel using multiplication in the Fourier domain...
Base class for specialized complex-to-real inverse Fast Fourier Transform.
TOutputImage OutputImageType
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:104
Facilitates progress reporting for filters that wrap around multiple other filters.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Abstract base class for filters that implement iterative deconvolution algorithms.
Base class for specialized real-to-complex forward Fast Fourier Transform.
Templated n-dimensional image class.
Definition: itkImage.h:75