ITK  4.13.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:
57  typedef FFTConvolutionImageFilter< TInputImage,
58  TKernelImage,
59  TOutputImage,
60  TInternalPrecision > Superclass;
63 
65  typedef TInputImage InputImageType;
66  typedef TKernelImage KernelImageType;
67  typedef TOutputImage OutputImageType;
68 
70  typedef typename Superclass::InternalImageType InternalImageType;
71  typedef typename Superclass::InternalImagePointerType InternalImagePointerType;
72  typedef typename Superclass::InternalComplexType InternalComplexType;
73  typedef typename Superclass::InternalComplexImageType InternalComplexImageType;
74  typedef typename Superclass::InternalComplexImagePointerType InternalComplexImagePointerType;
75 
78 
80  itkSetMacro(NumberOfIterations, unsigned int);
81  itkGetMacro(NumberOfIterations, unsigned int);
83 
85  itkGetModifiableObjectMacro(CurrentEstimate, InternalImageType);
86 
89  void SetStopIteration(bool stop)
90  {
91  // Don't call Modified() to avoid triggering a new update.
92  m_StopIteration = stop;
93  }
94  itkGetConstMacro(StopIteration, bool);
96 
98  itkGetConstMacro(Iteration, unsigned int);
99 
100 protected:
102  virtual ~IterativeDeconvolutionImageFilter() ITK_OVERRIDE;
103 
105  virtual void Initialize(ProgressAccumulator * progress,
106  float progressWeight,
107  float iterationProgressWeight);
108 
110  virtual void Iteration(ProgressAccumulator * itkNotUsed(progress),
111  float itkNotUsed(iterationProgressWeight)) = 0;
112 
114  virtual void Finish(ProgressAccumulator * progress,
115  float progressWeight);
116 
124  virtual void GenerateInputRequestedRegion() ITK_OVERRIDE;
125 
128  virtual void GenerateData() ITK_OVERRIDE;
129 
132 
134  InternalImagePointerType m_CurrentEstimate;
135 
138 
139  virtual void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
140 
141 private:
142  ITK_DISALLOW_COPY_AND_ASSIGN(IterativeDeconvolutionImageFilter);
143 
145  unsigned int m_NumberOfIterations;
146 
148  unsigned int m_Iteration;
149 
151  bool m_StopIteration;
152 
154  ModifiedTimeType m_InputMTime;
155  ModifiedTimeType m_KernelMTime;
156 
157 };
158 } // end namespace itk
159 
160 #ifndef ITK_MANUAL_INSTANTIATION
161 #include "itkIterativeDeconvolutionImageFilter.hxx"
162 #endif
163 
164 #endif
unsigned long ModifiedTimeType
Definition: itkIntTypes.h:164
Abstract base class for the convolution image filters.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
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.
FFTConvolutionImageFilter< TInputImage, TKernelImage, TOutputImage, TInternalPrecision > Superclass
Superclass::InternalComplexImageType InternalComplexImageType
Superclass::InternalImagePointerType InternalImagePointerType
Facilitates progress reporting for filters that wrap around multiple other filters.
Superclass::InternalComplexImagePointerType InternalComplexImagePointerType
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