RTK  1.4.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  * 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:
48  typedef rtk::FFTProjectionsConvolutionImageFilter< TInputImage,
49  TOutputImage,
50  TFFTPrecision> Superclass;
53 
55  typedef TInputImage InputImageType;
56  typedef TOutputImage OutputImageType;
57  typedef TFFTPrecision FFTPrecisionType;
58  typedef typename InputImageType::IndexType IndexType;
59  typedef typename InputImageType::SizeType SizeType;
60 
61  typedef typename Superclass::FFTInputImageType FFTInputImageType;
62  typedef typename FFTInputImageType::Pointer FFTInputImagePointer;
63  typedef typename Superclass::FFTOutputImageType FFTOutputImageType;
64  typedef typename FFTOutputImageType::Pointer FFTOutputImagePointer;
65 
66  typedef typename std::vector<float> CoefficientVectorType;
67 
69  itkNewMacro(Self);
70 
73 
74  itkGetConstMacro(Coefficients, CoefficientVectorType);
75  virtual void SetCoefficients(const CoefficientVectorType coefficients)
76  {
77  if (this->m_Coefficients != coefficients)
78  {
79  this->m_Coefficients = coefficients;
80  this->Modified();
81  }
82  }
83 
84 protected:
86  virtual ~ScatterGlareCorrectionImageFilter() ITK_OVERRIDE {}
87 
90  void UpdateFFTProjectionsConvolutionKernel(const SizeType size) ITK_OVERRIDE;
91 
92 private:
93  ScatterGlareCorrectionImageFilter(const Self&); //purposely not implemented
94  void operator=(const Self&); //purposely not implemented
95 
96  CoefficientVectorType m_Coefficients;
97  CoefficientVectorType m_PreviousCoefficients;
98 }; // end of class
99 
100 } // end namespace rtk
101 
102 #ifndef ITK_MANUAL_INSTANTIATION
103 #include "rtkScatterGlareCorrectionImageFilter.hxx"
104 #endif
105 
106 #endif
Implements the scatter glare correction as described in [Poludniowski, PMB 2011]. ...
Base class for 1D or 2D FFT based convolution of projections.
rtk::FFTProjectionsConvolutionImageFilter< TInputImage, TOutputImage, TFFTPrecision > Superclass
virtual void SetCoefficients(const CoefficientVectorType coefficients)