RTK  2.6.0
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  * https://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 
134 template <class TVolumeImage, class TProjectionImage = TVolumeImage>
135 class ITK_TEMPLATE_EXPORT SARTConeBeamReconstructionFilter
136  : public rtk::IterativeConeBeamReconstructionFilter<TVolumeImage, TProjectionImage>
137 {
138 public:
139  ITK_DISALLOW_COPY_AND_MOVE(SARTConeBeamReconstructionFilter);
140 
146 
148  using VolumeType = TVolumeImage;
149  using ProjectionType = TProjectionImage;
150  using ProjectionPixelType = typename ProjectionType::PixelType;
151 
157  using AddFilterType = itk::AddImageFilter<VolumeType, VolumeType>;
167 
168  using ForwardProjectionType = typename Superclass::ForwardProjectionType;
169  using BackProjectionType = typename Superclass::BackProjectionType;
170 
172  itkNewMacro(Self);
173 
175  itkOverrideGetNameOfClassMacro(SARTConeBeamReconstructionFilter);
176 
178  itkGetModifiableObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
179  itkSetObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
181 
183  itkGetMacro(NumberOfIterations, unsigned int);
184  itkSetMacro(NumberOfIterations, unsigned int);
186 
188  itkGetMacro(NumberOfProjectionsPerSubset, unsigned int);
189  itkSetMacro(NumberOfProjectionsPerSubset, unsigned int);
191 
193  itkGetMacro(Lambda, double);
194  itkSetMacro(Lambda, double);
196 
198  itkGetMacro(EnforcePositivity, bool);
199  itkSetMacro(EnforcePositivity, bool);
201 
203  void
204  SetGatingWeights(std::vector<float> weights);
205 
207  itkSetMacro(DisableDisplacedDetectorFilter, bool);
208  itkGetMacro(DisableDisplacedDetectorFilter, bool);
210 
215  itkSetMacro(DivisionThreshold, ProjectionPixelType);
216  itkGetMacro(DivisionThreshold, ProjectionPixelType);
218 
219 protected:
221  ~SARTConeBeamReconstructionFilter() override = default;
222 
224  void
225  VerifyPreconditions() const override;
226 
227  void
228  GenerateInputRequestedRegion() override;
229 
230  void
231  GenerateOutputInformation() override;
232 
233  void
234  GenerateData() override;
235 
238  void
239  VerifyInputInformation() const override
240  {}
241 
248  typename AddFilterType::Pointer m_AddFilter;
261 
263 
266 
267 private:
271 
274 
276  unsigned int m_NumberOfIterations;
277 
280  double m_Lambda;
281 
284  bool m_IsGated;
285  std::vector<float> m_GatingWeights;
286 }; // end of class
287 
288 } // end namespace rtk
289 
290 #ifndef ITK_MANUAL_INSTANTIATION
291 # include "rtkSARTConeBeamReconstructionFilter.hxx"
292 #endif
293 
294 #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
itk::AddImageFilter< VolumeType, VolumeType > AddFilterType
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.
#define itkSetMacro(name, type)
BackProjectionFilterType::Pointer m_BackProjectionFilter
typename ProjectionType::PixelType ProjectionPixelType
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