RTK  2.6.0
Reconstruction Toolkit
rtkScatterGlareCorrectionImageFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright RTK 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  * 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 
19 #ifndef rtkScatterGlareCorrectionImageFilter_h
20 #define rtkScatterGlareCorrectionImageFilter_h
21 
22 #include "rtkConfiguration.h"
24 
25 namespace rtk
26 {
27 
41 template <class TInputImage, class TOutputImage = TInputImage, class TFFTPrecision = double>
42 class ITK_TEMPLATE_EXPORT ScatterGlareCorrectionImageFilter
43  : public rtk::FFTProjectionsConvolutionImageFilter<TInputImage, TOutputImage, TFFTPrecision>
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_MOVE(ScatterGlareCorrectionImageFilter);
47 
53 
55  using InputImageType = TInputImage;
56  using OutputImageType = TOutputImage;
57  using FFTPrecisionType = TFFTPrecision;
58  using IndexType = typename InputImageType::IndexType;
59  using SizeType = typename InputImageType::SizeType;
60 
61  using FFTInputImageType = typename Superclass::FFTInputImageType;
62  using FFTInputImagePointer = typename FFTInputImageType::Pointer;
63  using FFTOutputImageType = typename Superclass::FFTOutputImageType;
64  using FFTOutputImagePointer = typename FFTOutputImageType::Pointer;
65 
66  using CoefficientVectorType = typename std::vector<float>;
67 
69  itkNewMacro(Self);
70 
72 #ifdef itkOverrideGetNameOfClassMacro
73  itkOverrideGetNameOfClassMacro(ScatterGlareCorrectionImageFilter);
74 #else
76 #endif
77 
78 
79  itkGetConstMacro(Coefficients, CoefficientVectorType);
80  virtual void
82  {
83  if (this->m_Coefficients != coefficients)
84  {
85  this->m_Coefficients = coefficients;
86  this->Modified();
87  }
88  }
89 
90 protected:
92  ~ScatterGlareCorrectionImageFilter() override = default;
93 
96  void
97  UpdateFFTProjectionsConvolutionKernel(const SizeType size) override;
98 
99 private:
102 }; // end of class
103 
104 } // end namespace rtk
105 
106 #ifndef ITK_MANUAL_INSTANTIATION
107 # include "rtkScatterGlareCorrectionImageFilter.hxx"
108 #endif
109 
110 #endif
Implements the scatter glare correction as described in [Poludniowski, PMB 2011]. ...
Base class for 1D or 2D FFT based convolution of projections.
TInputImage InputImageType
TOutputImage OutputImageType
typename itk::Image< TFFTPrecision, TInputImage::ImageDimension > FFTInputImageType
virtual void SetCoefficients(const CoefficientVectorType coefficients)
typename itk::Image< std::complex< TFFTPrecision >, TInputImage::ImageDimension > FFTOutputImageType