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  itkOverrideGetNameOfClassMacro(ScatterGlareCorrectionImageFilter);
73 
74  itkGetConstMacro(Coefficients, CoefficientVectorType);
75  virtual void
77  {
78  if (this->m_Coefficients != coefficients)
79  {
80  this->m_Coefficients = coefficients;
81  this->Modified();
82  }
83  }
84 
85 protected:
87  ~ScatterGlareCorrectionImageFilter() override = default;
88 
91  void
92  UpdateFFTProjectionsConvolutionKernel(const SizeType size) override;
93 
94 private:
97 }; // end of class
98 
99 } // end namespace rtk
100 
101 #ifndef ITK_MANUAL_INSTANTIATION
102 # include "rtkScatterGlareCorrectionImageFilter.hxx"
103 #endif
104 
105 #endif
Implements the scatter glare correction as described in [Poludniowski, PMB 2011]. ...
Base class for 1D or 2D FFT based convolution of projections.
TOutputImage OutputImageType
typename itk::Image< TFFTPrecision, TInputImage::ImageDimension > FFTInputImageType
virtual void SetCoefficients(const CoefficientVectorType coefficients)
typename itk::Image< std::complex< TFFTPrecision >, TInputImage::ImageDimension > FFTOutputImageType