RTK  2.1.0
Reconstruction Toolkit
rtkFourDSARTConeBeamReconstructionFilter.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 rtkFourDSARTConeBeamReconstructionFilter_h
20 #define rtkFourDSARTConeBeamReconstructionFilter_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"
39 
40 namespace rtk
41 {
42 
121 template <class VolumeSeriesType, class ProjectionStackType>
123  : public rtk::IterativeConeBeamReconstructionFilter<VolumeSeriesType, ProjectionStackType>
124 {
125 public:
126  ITK_DISALLOW_COPY_AND_ASSIGN(FourDSARTConeBeamReconstructionFilter);
127 
133 
135  using InputImageType = VolumeSeriesType;
136  using OutputImageType = VolumeSeriesType;
137  using VolumeType = ProjectionStackType;
138 
139  using ForwardProjectionType = typename Superclass::ForwardProjectionType;
140  using BackProjectionType = typename Superclass::BackProjectionType;
141 
154  using DivideFilterType =
160 
162  itkNewMacro(Self);
163 
166 
168  void
169  SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
170  typename VolumeSeriesType::ConstPointer
171  GetInputVolumeSeries();
173 
175  void
176  SetInputProjectionStack(const ProjectionStackType * Projection);
177  typename ProjectionStackType::Pointer
178  GetInputProjectionStack();
180 
182  itkGetModifiableObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
183  itkSetObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
185 
187  itkGetMacro(NumberOfIterations, unsigned int);
188  itkSetMacro(NumberOfIterations, unsigned int);
190 
192  itkGetMacro(NumberOfProjectionsPerSubset, unsigned int);
193  itkSetMacro(NumberOfProjectionsPerSubset, unsigned int);
195 
197  itkGetMacro(Lambda, double);
198  itkSetMacro(Lambda, double);
200 
202  itkGetMacro(EnforcePositivity, bool);
203  itkSetMacro(EnforcePositivity, bool);
205 
207  void
208  SetWeights(const itk::Array2D<float> _arg);
209 
211  virtual void
212  SetSignal(const std::vector<double> signal);
213 
215  itkSetMacro(DisableDisplacedDetectorFilter, bool);
216  itkGetMacro(DisableDisplacedDetectorFilter, bool);
218 
219 protected:
221  ~FourDSARTConeBeamReconstructionFilter() override = default;
222 
224  void
225  VerifyPreconditions() ITKv5_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 
260 
262  std::vector<unsigned int> m_ProjectionsOrder;
265  std::vector<double> m_Signal;
267 
268 private:
272 
275 
277  unsigned int m_NumberOfIterations;
278 
281  double m_Lambda;
282 }; // end of class
283 
284 } // end namespace rtk
285 
286 #ifndef ITK_MANUAL_INSTANTIATION
287 # include "rtkFourDSARTConeBeamReconstructionFilter.hxx"
288 #endif
289 
290 #endif
Base class for forward projection, i.e. accumulation along x-ray lines.
FourDToProjectionStackFilterType::Pointer m_FourDToProjectionStackFilter
ProjectionStackToFourDFilterType::Pointer m_ProjectionStackToFourDFilter
Generate an n-dimensional image with constant pixel values.
Weigting for displaced detectors.
Analytical projection of a BoxShape.
Projection geometry for a source and a 2-D flat panel.
#define itkSetMacro(name, type)
TOutputImage OutputImageType
Implements the 4D Simultaneous Algebraic Reconstruction Technique.
ConstantVolumeSeriesSourceType::Pointer m_ConstantVolumeSeriesSource
ConstantProjectionStackSourceType::Pointer m_ConstantProjectionStackSource
Mother class for cone beam reconstruction filters which need runtime selection of their forward and b...
typename Superclass::ForwardProjectionType ForwardProjectionType
Implements part of the 4D reconstruction by conjugate gradient.