ITK  5.2.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  * 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 {
51 template <typename TInputImage,
52  typename TKernelImage = TInputImage,
53  typename TOutputImage = TInputImage,
54  typename TInternalPrecision = double>
55 class ITK_TEMPLATE_EXPORT IterativeDeconvolutionImageFilter
56  : public FFTConvolutionImageFilter<TInputImage, TKernelImage, TOutputImage, TInternalPrecision>
57 {
58 public:
59  ITK_DISALLOW_COPY_AND_MOVE(IterativeDeconvolutionImageFilter);
60 
66 
68  using InputImageType = TInputImage;
69  using KernelImageType = TKernelImage;
70  using OutputImageType = TOutputImage;
71 
73  using InternalImageType = typename Superclass::InternalImageType;
74  using InternalImagePointerType = typename Superclass::InternalImagePointerType;
75  using InternalComplexType = typename Superclass::InternalComplexType;
76  using InternalComplexImageType = typename Superclass::InternalComplexImageType;
77  using InternalComplexImagePointerType = typename Superclass::InternalComplexImagePointerType;
78 
81 
83  itkSetMacro(NumberOfIterations, unsigned int);
84  itkGetMacro(NumberOfIterations, unsigned int);
86 
88  itkGetModifiableObjectMacro(CurrentEstimate, InternalImageType);
89 
92  void
93  SetStopIteration(bool stop)
94  {
95  // Don't call Modified() to avoid triggering a new update.
96  m_StopIteration = stop;
97  }
98  itkGetConstMacro(StopIteration, bool);
100 
102  itkGetConstMacro(Iteration, unsigned int);
103 
104 protected:
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
128  GenerateInputRequestedRegion() override;
129 
132  void
133  GenerateData() override;
134 
137 
140 
141  using FFTFilterType = typename Superclass::FFTFilterType;
142  using IFFTFilterType = typename Superclass::IFFTFilterType;
143 
144  void
145  PrintSelf(std::ostream & os, Indent indent) const override;
146 
147 private:
149  unsigned int m_NumberOfIterations;
150 
152  unsigned int m_Iteration;
153 
156 
160 };
161 } // end namespace itk
162 
163 #ifndef ITK_MANUAL_INSTANTIATION
164 # include "itkIterativeDeconvolutionImageFilter.hxx"
165 #endif
166 
167 #endif
itk::FFTConvolutionImageFilter
Convolve a given image with an arbitrary image kernel using multiplication in the Fourier domain.
Definition: itkFFTConvolutionImageFilter.h:58
itk::ConvolutionImageFilterBase< TInputImage, TKernelSource::OutputImageType, TOutputImage >::KernelImageType
TKernelSource::OutputImageType KernelImageType
Definition: itkConvolutionImageFilterBase.h:76
itk::ModifiedTimeType
SizeValueType ModifiedTimeType
Definition: itkIntTypes.h:102
itk::IterativeDeconvolutionImageFilter::m_StopIteration
bool m_StopIteration
Definition: itkIterativeDeconvolutionImageFilter.h:155
itk::IterativeDeconvolutionImageFilter::m_TransferFunction
InternalComplexImagePointerType m_TransferFunction
Definition: itkIterativeDeconvolutionImageFilter.h:136
itkFFTConvolutionImageFilter.h
itk::RealToHalfHermitianForwardFFTImageFilter
Base class for specialized real-to-complex forward Fast Fourier Transform.
Definition: itkRealToHalfHermitianForwardFFTImageFilter.h:56
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::IterativeDeconvolutionImageFilter::m_InputMTime
ModifiedTimeType m_InputMTime
Definition: itkIterativeDeconvolutionImageFilter.h:158
itk::IterativeDeconvolutionImageFilter::m_Iteration
unsigned int m_Iteration
Definition: itkIterativeDeconvolutionImageFilter.h:152
itk::IterativeDeconvolutionImageFilter::SetStopIteration
void SetStopIteration(bool stop)
Definition: itkIterativeDeconvolutionImageFilter.h:93
itk::IterativeDeconvolutionImageFilter::m_CurrentEstimate
InternalImagePointerType m_CurrentEstimate
Definition: itkIterativeDeconvolutionImageFilter.h:139
itk::FFTConvolutionImageFilter< TInputImage, TKernelSource::OutputImageType, TOutputImage, double >::InternalComplexImagePointerType
typename InternalComplexImageType::Pointer InternalComplexImagePointerType
Definition: itkFFTConvolutionImageFilter.h:101
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::FFTConvolutionImageFilter< TInputImage, TKernelSource::OutputImageType, TOutputImage, double >::InternalComplexType
std::complex< double > InternalComplexType
Definition: itkFFTConvolutionImageFilter.h:99
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ProgressAccumulator
Facilitates progress reporting for filters that wrap around multiple other filters.
Definition: itkProgressAccumulator.h:40
itk::IterativeDeconvolutionImageFilter
Abstract base class for filters that implement iterative deconvolution algorithms.
Definition: itkIterativeDeconvolutionImageFilter.h:55
itk
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Definition: itkAnnulusOperator.h:24
itkProgressAccumulator.h
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:138
itk::IterativeDeconvolutionImageFilter::m_KernelMTime
ModifiedTimeType m_KernelMTime
Definition: itkIterativeDeconvolutionImageFilter.h:159
itk::IterativeDeconvolutionImageFilter::m_NumberOfIterations
unsigned int m_NumberOfIterations
Definition: itkIterativeDeconvolutionImageFilter.h:149
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:86
itk::HalfHermitianToRealInverseFFTImageFilter
Base class for specialized complex-to-real inverse Fast Fourier Transform.
Definition: itkHalfHermitianToRealInverseFFTImageFilter.h:56
itk::ConvolutionImageFilterBase
Abstract base class for the convolution image filters.
Definition: itkConvolutionImageFilterBase.h:58
itk::FFTConvolutionImageFilter< TInputImage, TKernelSource::OutputImageType, TOutputImage, double >::InternalImagePointerType
typename InternalImageType::Pointer InternalImagePointerType
Definition: itkFFTConvolutionImageFilter.h:98
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90