RTK  1.4.0
Reconstruction Toolkit
rtkFDKWeightProjectionFilter.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 rtkFDKWeightProjectionFilter_h
20 #define rtkFDKWeightProjectionFilter_h
21 
22 #include <itkInPlaceImageFilter.h>
24 #include "rtkConfiguration.h"
25 
26 namespace rtk
27 {
28 
50 template<class TInputImage, class TOutputImage=TInputImage>
51 class ITK_EXPORT FDKWeightProjectionFilter :
52  public itk::InPlaceImageFilter<TInputImage, TOutputImage>
53 {
54 public:
60 
62  typedef TInputImage InputImageType;
63  typedef TOutputImage OutputImageType;
64  typedef typename OutputImageType::RegionType OutputImageRegionType;
65 
67  itkNewMacro(Self);
68 
71 
73  itkGetMacro(Geometry, ThreeDCircularProjectionGeometry::Pointer);
74  itkSetObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
76 
77 protected:
79  virtual ~FDKWeightProjectionFilter() ITK_OVERRIDE {}
80 
81  void BeforeThreadedGenerateData() ITK_OVERRIDE;
82 
83 #if ITK_VERSION_MAJOR<5
84  void ThreadedGenerateData(const OutputImageRegionType& outputRegionForThread, ThreadIdType threadId) ITK_OVERRIDE;
85 #else
86  void DynamicThreadedGenerateData(const OutputImageRegionType& outputRegionForThread) ITK_OVERRIDE;
87 #endif
88 
89 private:
90  FDKWeightProjectionFilter(const Self&); //purposely not implemented
91  void operator=(const Self&); //purposely not implemented
92 
94  std::vector<double> m_ConstantProjectionFactor;
95 
97  std::vector<double> m_TiltAngles;
98 
101 }; // end of class
102 
103 } // end namespace rtk
104 
105 #ifndef ITK_MANUAL_INSTANTIATION
106 #include "rtkFDKWeightProjectionFilter.hxx"
107 #endif
108 
109 #endif
Weighting of projections to correct for the divergence in filtered backprojection reconstruction algo...
OutputImageType::RegionType OutputImageRegionType
itk::ImageToImageFilter< TInputImage, TOutputImage > Superclass
Projection geometry for a source and a 2-D flat panel.
ThreeDCircularProjectionGeometry::Pointer m_Geometry
itk::SmartPointer< const Self > ConstPointer
unsigned int ThreadIdType