RTK  2.0.1
Reconstruction Toolkit
rtkSARTConeBeamReconstructionFilter.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 rtkSARTConeBeamReconstructionFilter_h
20 #define rtkSARTConeBeamReconstructionFilter_h
21 
24 
25 #include <itkExtractImageFilter.h>
26 #include <itkMultiplyImageFilter.h>
27 #include <itkSubtractImageFilter.h>
28 #include <itkAddImageAdaptor.h>
29 #include <itkAddImageFilter.h>
32 
34 #include "rtkConstantImageSource.h"
37 
38 namespace rtk
39 {
40 
133 template<class TVolumeImage, class TProjectionImage=TVolumeImage>
135  public rtk::IterativeConeBeamReconstructionFilter<TVolumeImage, TProjectionImage>
136 {
137 public:
138  ITK_DISALLOW_COPY_AND_ASSIGN(SARTConeBeamReconstructionFilter);
139 
145 
147  using VolumeType = TVolumeImage;
148  using ProjectionType = TProjectionImage;
149 
165 
168 
170  itkNewMacro(Self);
171 
174 
176  itkGetModifiableObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
177  itkSetObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
179 
181  itkGetMacro(NumberOfIterations, unsigned int);
182  itkSetMacro(NumberOfIterations, unsigned int);
184 
186  itkGetMacro(NumberOfProjectionsPerSubset, unsigned int);
187  itkSetMacro(NumberOfProjectionsPerSubset, unsigned int);
189 
191  itkGetMacro(Lambda, double);
192  itkSetMacro(Lambda, double);
194 
196  itkGetMacro(EnforcePositivity, bool);
197  itkSetMacro(EnforcePositivity, bool);
199 
201  void SetForwardProjectionFilter (ForwardProjectionType _arg) override;
202 
204  void SetBackProjectionFilter (BackProjectionType _arg) override;
205 
207  void SetGatingWeights(std::vector<float> weights);
208 
210  itkSetMacro(DisableDisplacedDetectorFilter, bool)
211  itkGetMacro(DisableDisplacedDetectorFilter, bool)
212 
213 protected:
215  ~SARTConeBeamReconstructionFilter() override = default;
216 
217  void GenerateInputRequestedRegion() override;
218 
219  void GenerateOutputInformation() override;
220 
221  void GenerateData() override;
222 
225 #if ITK_VERSION_MAJOR<5
226  void VerifyInputInformation() override {}
227 #else
228  void VerifyInputInformation() const override {}
229 #endif
230 
231 
233  typename ExtractFilterType::Pointer m_ExtractFilter;
234  typename ExtractFilterType::Pointer m_ExtractFilterRayBox;
251 
254 
255 private:
259 
262 
264  unsigned int m_NumberOfIterations;
265 
268  double m_Lambda;
269 
272  bool m_IsGated;
273  std::vector<float> m_GatingWeights;
274 }; // end of class
275 
276 } // end namespace rtk
277 
278 #ifndef ITK_MANUAL_INSTANTIATION
279 #include "rtkSARTConeBeamReconstructionFilter.hxx"
280 #endif
281 
282 #endif
DisplacedDetectorFilterType::Pointer m_DisplacedDetectorFilter
RayBoxIntersectionFilterType::Pointer m_RayBoxFilter
Base class for forward projection, i.e. accumulation along x-ray lines.
BackProjectionFilterType::Pointer m_BackProjectionNormalizationFilter
ThreeDCircularProjectionGeometry::Pointer m_Geometry
ForwardProjectionFilterType::Pointer m_ForwardProjectionFilter
Generate an n-dimensional image with constant pixel values.
typename Superclass::BackProjectionType BackProjectionType
Weigting for displaced detectors.
ConstantProjectionSourceType::Pointer m_ConstantProjectionStackSource
Analytical projection of a BoxShape.
ConstantProjectionSourceType::Pointer m_OneConstantProjectionStackSource
Projection geometry for a source and a 2-D flat panel.
BackProjectionFilterType::Pointer m_BackProjectionFilter
Implements the Simultaneous Algebraic Reconstruction Technique [Andersen, 1984].
typename Superclass::ForwardProjectionType ForwardProjectionType
DivideProjectionFilterType::Pointer m_DivideProjectionFilter
Mother class for cone beam reconstruction filters which need runtime selection of their forward and b...
ConstantVolumeSourceType::Pointer m_ConstantVolumeSource
#define itkSetMacro(name, type)