RTK  1.4.0
Reconstruction Toolkit
rtkFFTRampImageFilter.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 rtkFFTRampImageFilter_h
20 #define rtkFFTRampImageFilter_h
21 
22 #include <itkConceptChecking.h>
23 #include "rtkConfiguration.h"
25 #include "rtkMacro.h"
26 
27 // The Set macro is redefined to clear the current FFT kernel when a parameter
28 // is modified.
29 #undef itkSetMacro
30 #define itkSetMacro(name, type) \
31  virtual void Set##name (const type _arg) \
32  { \
33  itkDebugMacro("setting " #name " to " << _arg); \
34 CLANG_PRAGMA_PUSH \
35 CLANG_SUPPRESS_Wfloat_equal \
36  if ( this->m_##name != _arg ) \
37  { \
38  this->m_##name = _arg; \
39  this->Modified(); \
40  this->m_KernelFFT = ITK_NULLPTR; \
41  } \
42 CLANG_PRAGMA_POP \
43  }
44 
45 namespace rtk
46 {
47 
61 template<class TInputImage, class TOutputImage=TInputImage, class TFFTPrecision=double>
62 class ITK_EXPORT FFTRampImageFilter :
63  public rtk::FFTProjectionsConvolutionImageFilter<TInputImage, TOutputImage, TFFTPrecision>
64 {
65 public:
68  typedef rtk::FFTProjectionsConvolutionImageFilter< TInputImage,
69  TOutputImage,
70  TFFTPrecision> Superclass;
73 
75  typedef TInputImage InputImageType;
76  typedef TOutputImage OutputImageType;
77  typedef TFFTPrecision FFTPrecisionType;
78  typedef typename InputImageType::IndexType IndexType;
79  typedef typename InputImageType::SizeType SizeType;
80 
81  typedef typename Superclass::FFTInputImageType FFTInputImageType;
82  typedef typename FFTInputImageType::Pointer FFTInputImagePointer;
83  typedef typename Superclass::FFTOutputImageType FFTOutputImageType;
84  typedef typename FFTOutputImageType::Pointer FFTOutputImagePointer;
85 
87  itkNewMacro(Self);
88 
91 
93  itkGetConstMacro(HannCutFrequency, double);
94  itkSetMacro(HannCutFrequency, double);
96 
98  itkGetConstMacro(CosineCutFrequency, double);
99  itkSetMacro(CosineCutFrequency, double);
101 
103  itkGetConstMacro(HammingFrequency, double);
104  itkSetMacro(HammingFrequency, double);
106 
108  itkGetConstMacro(HannCutFrequencyY, double);
109  itkSetMacro(HannCutFrequencyY, double);
111 
119  itkGetConstMacro(RamLakCutFrequency, double);
120  itkSetMacro(RamLakCutFrequency, double);
122 
130  itkGetConstMacro(SheppLoganCutFrequency, double);
131  itkSetMacro(SheppLoganCutFrequency, double);
133 
134 protected:
136  virtual ~FFTRampImageFilter() ITK_OVERRIDE {}
137 
138  void GenerateInputRequestedRegion() ITK_OVERRIDE;
139 
142  void UpdateFFTProjectionsConvolutionKernel(const SizeType size) ITK_OVERRIDE;
143 
144 private:
145  FFTRampImageFilter(const Self&); //purposely not implemented
146  void operator=(const Self&); //purposely not implemented
147 
156 
161 
163 }; // end of class
164 
165 } // end namespace rtk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 #include "rtkFFTRampImageFilter.hxx"
169 #endif
170 
171 // Rollback to the original definition of the Set macro
172 #undef itkSetMacro
173 #define itkSetMacro(name, type) \
174  virtual void Set##name (const type _arg) \
175  { \
176  itkDebugMacro("setting " #name " to " << _arg); \
177 CLANG_PRAGMA_PUSH \
178 CLANG_SUPPRESS_Wfloat_equal \
179  if ( this->m_##name != _arg ) \
180  { \
181  this->m_##name = _arg; \
182  this->Modified(); \
183  } \
184 CLANG_PRAGMA_POP \
185  }
186 
187 #endif
Base class for 1D or 2D FFT based convolution of projections.
itk::SmartPointer< const Self > ConstPointer
Superclass::FFTOutputImageType FFTOutputImageType
InputImageType::IndexType IndexType
InputImageType::SizeType SizeType
virtual ~FFTRampImageFilter() override
itk::SmartPointer< Self > Pointer
FFTInputImageType::Pointer FFTInputImagePointer
Superclass::FFTInputImageType FFTInputImageType
rtk::FFTProjectionsConvolutionImageFilter< TInputImage, TOutputImage, TFFTPrecision > Superclass
Implements the ramp image filter of the filtered backprojection algorithm.
FFTOutputImageType::Pointer FFTOutputImagePointer
#define itkSetMacro(name, type)