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 #ifdef itkOverrideGetNameOfClassMacro
176  itkOverrideGetNameOfClassMacro(SARTConeBeamReconstructionFilter);
177 #else
179 #endif
180 
181 
183  itkGetModifiableObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
184  itkSetObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
186 
188  itkGetMacro(NumberOfIterations, unsigned int);
189  itkSetMacro(NumberOfIterations, unsigned int);
191 
193  itkGetMacro(NumberOfProjectionsPerSubset, unsigned int);
194  itkSetMacro(NumberOfProjectionsPerSubset, unsigned int);
196 
198  itkGetMacro(Lambda, double);
199  itkSetMacro(Lambda, double);
201 
203  itkGetMacro(EnforcePositivity, bool);
204  itkSetMacro(EnforcePositivity, bool);
206 
208  void
209  SetGatingWeights(std::vector<float> weights);
210 
212  itkSetMacro(DisableDisplacedDetectorFilter, bool);
213  itkGetMacro(DisableDisplacedDetectorFilter, bool);
215 
220  itkSetMacro(DivisionThreshold, ProjectionPixelType);
221  itkGetMacro(DivisionThreshold, ProjectionPixelType);
223 
224 protected:
226  ~SARTConeBeamReconstructionFilter() override = default;
227 
229  void
230  VerifyPreconditions() const override;
231 
232  void
233  GenerateInputRequestedRegion() override;
234 
235  void
236  GenerateOutputInformation() override;
237 
238  void
239  GenerateData() override;
240 
243  void
244  VerifyInputInformation() const override
245  {}
246 
253  typename AddFilterType::Pointer m_AddFilter;
266 
268 
271 
272 private:
276 
279 
281  unsigned int m_NumberOfIterations;
282 
285  double m_Lambda;
286 
289  bool m_IsGated;
290  std::vector<float> m_GatingWeights;
291 }; // end of class
292 
293 } // end namespace rtk
294 
295 #ifndef ITK_MANUAL_INSTANTIATION
296 # include "rtkSARTConeBeamReconstructionFilter.hxx"
297 #endif
298 
299 #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