RTK  2.0.1
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  * 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 
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>
43  public rtk::FFTProjectionsConvolutionImageFilter<TInputImage, TOutputImage, TFFTPrecision>
44 {
45 public:
46  ITK_DISALLOW_COPY_AND_ASSIGN(ScatterGlareCorrectionImageFilter);
47 
51  TOutputImage,
52  TFFTPrecision>;
55 
57  using InputImageType = TInputImage;
58  using OutputImageType = TOutputImage;
59  using FFTPrecisionType = TFFTPrecision;
60  using IndexType = typename InputImageType::IndexType;
61  using SizeType = typename InputImageType::SizeType;
62 
63  using FFTInputImageType = typename Superclass::FFTInputImageType;
64  using FFTInputImagePointer = typename FFTInputImageType::Pointer;
65  using FFTOutputImageType = typename Superclass::FFTOutputImageType;
66  using FFTOutputImagePointer = typename FFTOutputImageType::Pointer;
67 
68  using CoefficientVectorType = typename std::vector<float>;
69 
71  itkNewMacro(Self);
72 
75 
76  itkGetConstMacro(Coefficients, CoefficientVectorType);
77  virtual void SetCoefficients(const CoefficientVectorType coefficients)
78  {
79  if (this->m_Coefficients != coefficients)
80  {
81  this->m_Coefficients = coefficients;
82  this->Modified();
83  }
84  }
85 
86 protected:
88  ~ScatterGlareCorrectionImageFilter() override = default;
89 
92  void 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.
typename itk::Image< TFFTPrecision, TInputImage::ImageDimension > FFTInputImageType
virtual void SetCoefficients(const CoefficientVectorType coefficients)
typename itk::Image< std::complex< TFFTPrecision >, TInputImage::ImageDimension > FFTOutputImageType