RTK  1.4.0
Reconstruction Toolkit
rtkFourDConjugateGradientConeBeamReconstructionFilter.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 rtkFourDConjugateGradientConeBeamReconstructionFilter_h
20 #define rtkFourDConjugateGradientConeBeamReconstructionFilter_h
21 
29 
30 #include <itkExtractImageFilter.h>
31 #include <itkSubtractImageFilter.h>
32 #include <itkMultiplyImageFilter.h>
33 #ifdef RTK_USE_CUDA
35 #endif
36 
37 namespace rtk
38 {
39 
94 template<typename VolumeSeriesType, typename ProjectionStackType>
96  public rtk::IterativeConeBeamReconstructionFilter<VolumeSeriesType, ProjectionStackType>
97 {
98 public:
104 
106  typedef VolumeSeriesType InputImageType;
107  typedef VolumeSeriesType OutputImageType;
108  typedef ProjectionStackType VolumeType;
109 
117 
120 
122  itkNewMacro(Self)
123 
124 
126 
128  itkGetConstObjectMacro(Geometry, ThreeDCircularProjectionGeometry)
129  itkSetConstObjectMacro(Geometry, ThreeDCircularProjectionGeometry)
130 
132  itkGetMacro(NumberOfIterations, unsigned int)
133  itkSetMacro(NumberOfIterations, unsigned int)
134 
136  itkGetMacro(CudaConjugateGradient, bool)
137  itkSetMacro(CudaConjugateGradient, bool)
138 
140  void SetInputVolumeSeries(const VolumeSeriesType* VolumeSeries);
141  typename VolumeSeriesType::ConstPointer GetInputVolumeSeries();
143 
145  void SetInputProjectionStack(const ProjectionStackType* Projections);
146  typename ProjectionStackType::ConstPointer GetInputProjectionStack();
148 
150  virtual void SetForwardProjectionFilter (ForwardProjectionType _arg) ITK_OVERRIDE;
151 
153  virtual void SetBackProjectionFilter (BackProjectionType _arg) ITK_OVERRIDE;
154 
156  void SetWeights(const itk::Array2D<float> _arg);
157 
159  virtual void SetSignal(const std::vector<double> signal);
160 
162  itkSetMacro(DisableDisplacedDetectorFilter, bool)
163  itkGetMacro(DisableDisplacedDetectorFilter, bool)
164 protected:
165  FourDConjugateGradientConeBeamReconstructionFilter();
166  virtual ~FourDConjugateGradientConeBeamReconstructionFilter() ITK_OVERRIDE {}
167 
168  void GenerateOutputInformation() ITK_OVERRIDE;
169 
170  void GenerateInputRequestedRegion() ITK_OVERRIDE;
171 
172  void GenerateData() ITK_OVERRIDE;
173 
176 #if ITK_VERSION_MAJOR<5
177  void VerifyInputInformation() ITK_OVERRIDE {}
178 #else
179  void VerifyInputInformation() const ITK_OVERRIDE {}
180 #endif
181 
182 
191 
193  std::vector<double> m_Signal;
195 
196 private:
197  //purposely not implemented
199  void operator=(const Self&);
200 
203 
205  unsigned int m_NumberOfIterations;
206 
207 }; // end of class
208 
209 } // end namespace rtk
210 
211 #ifndef ITK_MANUAL_INSTANTIATION
212 #include "rtkFourDConjugateGradientConeBeamReconstructionFilter.hxx"
213 #endif
214 
215 #endif
Base class for forward projection, i.e. accumulation along x-ray lines.
rtk::FourDReconstructionConjugateGradientOperator< VolumeSeriesType, ProjectionStackType > CGOperatorFilterType
Weigting for displaced detectors.
STL namespace.
IterativeConeBeamReconstructionFilter< VolumeSeriesType, ProjectionStackType > Superclass
rtk::ProjectionStackToFourDImageFilter< VolumeSeriesType, ProjectionStackType > ProjStackToFourDFilterType
Projection geometry for a source and a 2-D flat panel.
rtk::BackProjectionImageFilter< ProjectionStackType, VolumeType > BackProjectionFilterType
Implements part of the 4D reconstruction by conjugate gradient.
rtk::ForwardProjectionImageFilter< VolumeType, ProjectionStackType > ForwardProjectionFilterType
rtk::DisplacedDetectorImageFilter< ProjectionStackType > DisplacedDetectorFilterType
Mother class for cone beam reconstruction filters which need runtime selection of their forward and b...
Solves AX = B by conjugate gradient.
Implements part of the 4D reconstruction by conjugate gradient.
#define itkSetMacro(name, type)