ITK  6.0.0
Insight Toolkit
itkParametricBlindLeastSquaresDeconvolutionImageFilter.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 itkParametricBlindLeastSquaresDeconvolutionImageFilter_h
19 #define itkParametricBlindLeastSquaresDeconvolutionImageFilter_h
20 
22 
25 
26 namespace itk
27 {
58 template <typename TInputImage, typename TKernelSource, typename TOutputImage = TInputImage>
60  : public IterativeDeconvolutionImageFilter<TInputImage, typename TKernelSource::OutputImageType, TOutputImage>
61 {
62 public:
63  ITK_DISALLOW_COPY_AND_MOVE(ParametricBlindLeastSquaresDeconvolutionImageFilter);
64 
67  using Superclass =
71 
73  using InputImageType = TInputImage;
74  using OutputImageType = TOutputImage;
75 
77  using typename Superclass::InternalImageType;
78  using typename Superclass::InternalImagePointerType;
79  using typename Superclass::InternalComplexType;
80  using typename Superclass::InternalComplexImageType;
81  using typename Superclass::InternalComplexImagePointerType;
82 
84  using KernelSourceType = TKernelSource;
86 
88  itkNewMacro(Self);
89 
91  itkOverrideGetNameOfClassMacro(ParametricBlindLeastSquaresDeconvolutionImageFilter);
92 
94  void
95  SetKernelSource(KernelSourceType * kernelSource);
96  itkGetModifiableObjectMacro(KernelSource, KernelSourceType);
101  itkSetMacro(Alpha, double);
102  itkGetMacro(Alpha, double);
107  itkSetMacro(Beta, double);
108  itkGetMacro(Beta, double);
111 protected:
114 
115  void
116  Initialize(ProgressAccumulator * progress, float progressWeight, float iterationProgressWeight) override;
117 
118  void
119  Iteration(ProgressAccumulator * progress, float iterationProgressWeight) override;
120 
121  void
122  Finish(ProgressAccumulator * progress, float progressWeight) override;
123 
124  void
125  PrintSelf(std::ostream & os, Indent indent) const override;
126 
127 private:
128  KernelSourcePointer m_KernelSource{};
129 
133  double m_Alpha{};
134  double m_Beta{};
135 
137  InternalComplexImagePointerType m_TransformedInput{};
138  InternalComplexImagePointerType m_TransformedCurrentEstimate{};
139 
142  using DifferenceFilterType = TernaryGeneratorImageFilter<InternalComplexImageType,
143  InternalComplexImageType,
144  InternalComplexImageType,
146  typename DifferenceFilterType::Pointer m_DifferenceFilter{};
147 
148  using ImageUpdateFilterType = TernaryGeneratorImageFilter<InternalComplexImageType,
149  InternalComplexImageType,
150  InternalComplexImageType,
152  typename ImageUpdateFilterType::Pointer m_ImageUpdateFilter{};
153 };
154 
155 } // end namespace itk
156 
157 #ifndef ITK_MANUAL_INSTANTIATION
158 # include "itkParametricBlindLeastSquaresDeconvolutionImageFilter.hxx"
159 #endif
160 
161 
162 #endif
Pointer
SmartPointer< Self > Pointer
Definition: itkAddImageFilter.h:93
KernelSource
itk::ParametricBlindLeastSquaresDeconvolutionImageFilter::KernelSourceType
TKernelSource KernelSourceType
Definition: itkParametricBlindLeastSquaresDeconvolutionImageFilter.h:84
itk::SmartPointer< Self >
itk::Indent
Control indentation during Print() invocation.
Definition: itkIndent.h:49
itk::FFTConvolutionImageFilter< TInputImage, TKernelSource::OutputImageType, TOutputImage, double >::InternalComplexImagePointerType
typename InternalComplexImageType::Pointer InternalComplexImagePointerType
Definition: itkFFTConvolutionImageFilter.h:106
itk::ImageSource
Base class for all process objects that output image data.
Definition: itkImageSource.h:67
itk::TernaryGeneratorImageFilter
Implements pixel-wise generic operation of three images or images with constants.
Definition: itkTernaryGeneratorImageFilter.h:54
itk::ImageToImageFilter::InputImageType
TInputImage InputImageType
Definition: itkImageToImageFilter.h:129
itk::ParametricBlindLeastSquaresDeconvolutionImageFilter
Least-squares blind deconvolution filter that also estimates the parameters of a user-supplied parame...
Definition: itkParametricBlindLeastSquaresDeconvolutionImageFilter.h:59
itk::ParametricBlindLeastSquaresDeconvolutionImageFilter::KernelSourcePointer
typename KernelSourceType::Pointer KernelSourcePointer
Definition: itkParametricBlindLeastSquaresDeconvolutionImageFilter.h:85
itk::ProgressAccumulator
Facilitates progress reporting for filters that wrap around multiple other filters.
Definition: itkProgressAccumulator.h:40
itkIterativeDeconvolutionImageFilter.h
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: itkAnatomicalOrientation.h:29
itk::ProcessObject
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Definition: itkProcessObject.h:139
itkParametricImageSource.h
itk::Image
Templated n-dimensional image class.
Definition: itkImage.h:88
itk::ImageSource::OutputImageType
TOutputImage OutputImageType
Definition: itkImageSource.h:90
itkTernaryGeneratorImageFilter.h