RTK  2.7.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 
25 #include "rtkConstantImageSource.h"
29 
30 #include <itkExtractImageFilter.h>
31 #include <itkMultiplyImageFilter.h>
32 #include <itkSubtractImageFilter.h>
33 #include <itkAddImageAdaptor.h>
34 #include <itkAddImageFilter.h>
37 
38 namespace rtk
39 {
40 
140 template <class TVolumeImage, class TProjectionImage = TVolumeImage>
141 class ITK_TEMPLATE_EXPORT SARTConeBeamReconstructionFilter
142  : public rtk::IterativeConeBeamReconstructionFilter<TVolumeImage, TProjectionImage>
143 {
144 public:
145  ITK_DISALLOW_COPY_AND_MOVE(SARTConeBeamReconstructionFilter);
146 
152 
154  using VolumeType = TVolumeImage;
155  using ProjectionType = TProjectionImage;
156  using ProjectionPixelType = typename ProjectionType::PixelType;
157 
174 
175  using ForwardProjectionType = typename Superclass::ForwardProjectionType;
176  using BackProjectionType = typename Superclass::BackProjectionType;
177 
179  itkNewMacro(Self);
180 
182  itkOverrideGetNameOfClassMacro(SARTConeBeamReconstructionFilter);
183 
185  itkGetModifiableObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
186  itkSetObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
188 
190  itkGetMacro(NumberOfIterations, unsigned int);
191  itkSetMacro(NumberOfIterations, unsigned int);
193 
195  itkGetMacro(NumberOfProjectionsPerSubset, unsigned int);
196  itkSetMacro(NumberOfProjectionsPerSubset, unsigned int);
198 
200  itkGetMacro(Lambda, double);
201  itkSetMacro(Lambda, double);
203 
205  itkGetMacro(EnforcePositivity, bool);
206  itkSetMacro(EnforcePositivity, bool);
208 
210  void
211  SetGatingWeights(std::vector<float> weights);
212 
214  itkSetMacro(DisableDisplacedDetectorFilter, bool);
215  itkGetMacro(DisableDisplacedDetectorFilter, bool);
217 
222  itkSetMacro(DivisionThreshold, ProjectionPixelType);
223  itkGetMacro(DivisionThreshold, ProjectionPixelType);
225 
229  itkSetMacro(ResetNesterovEvery, int);
230  itkGetMacro(ResetNesterovEvery, int);
232 
233 protected:
235  ~SARTConeBeamReconstructionFilter() override = default;
236 
238  void
239  VerifyPreconditions() const override;
240 
241  void
242  GenerateInputRequestedRegion() override;
243 
244  void
245  GenerateOutputInformation() override;
246 
247  void
248  GenerateData() override;
249 
252  void
253  VerifyInputInformation() const override
254  {}
255 
276 
278 
280  bool m_DisableDisplacedDetectorFilter{};
281 
282 private:
285  unsigned int m_NumberOfProjectionsPerSubset{ 1 };
286 
289 
291  unsigned int m_NumberOfIterations;
292 
295  double m_Lambda;
296 
299  bool m_IsGated{};
300  std::vector<float> m_GatingWeights;
301 
303  int m_ResetNesterovEvery{ 1 };
304 }; // end of class
305 
306 } // end namespace rtk
307 
308 #ifndef ITK_MANUAL_INSTANTIATION
309 # include "rtkSARTConeBeamReconstructionFilter.hxx"
310 #endif
311 
312 #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
Applies Nesterov&#39;s momentum technique.
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