ITK  4.3.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< class TInputImage, class TKernelImage=TInputImage, class TOutputImage=TInputImage, class TInternalPrecision=double >
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  itkGetConstObjectMacro(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:
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();
125 
128  virtual void GenerateData();
129 
132 
135 
136  typedef typename Superclass::FFTFilterType FFTFilterType;
137  typedef typename Superclass::IFFTFilterType IFFTFilterType;
138 
139  virtual void PrintSelf(std::ostream & os, Indent indent) const;
140 
141 private:
142  IterativeDeconvolutionImageFilter(const Self &); // purposely not implemented
143  void operator=(const Self &); // purposely not implemented
144 
146  unsigned int m_NumberOfIterations;
147 
149  unsigned int m_Iteration;
150 
153 
157 
158 };
159 } // end namespace itk
160 
161 #ifndef ITK_MANUAL_INSTANTIATION
162 #include "itkIterativeDeconvolutionImageFilter.hxx"
163 #endif
164 
165 #endif
166