ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkFourDReconstructionConjugateGradientOperator.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#ifndef rtkFourDReconstructionConjugateGradientOperator_h
19#define rtkFourDReconstructionConjugateGradientOperator_h
20
22
23#include <itkArray2D.h>
25
33
34#ifdef RTK_USE_CUDA
40#endif
41
42namespace rtk
43{
128
129template <typename VolumeSeriesType, typename ProjectionStackType>
131 : public ConjugateGradientOperator<VolumeSeriesType>
132{
133public:
134 ITK_DISALLOW_COPY_AND_MOVE(FourDReconstructionConjugateGradientOperator);
135
140
142 using VolumeType = ProjectionStackType;
143
145 itkNewMacro(Self);
146
148 itkOverrideGetNameOfClassMacro(FourDReconstructionConjugateGradientOperator);
149
151 void
152 SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
153 typename VolumeSeriesType::ConstPointer
155
157 void
158 SetInputProjectionStack(const ProjectionStackType * Projections);
159 typename ProjectionStackType::ConstPointer
161
169
173#ifdef RTK_USE_CUDA
175 typename std::conditional_t<std::is_same_v<ProjectionStackType, CPUProjectionStackType>,
177 CudaDisplacedDetectorImageFilter>;
179 typename std::conditional_t<std::is_same_v<ProjectionStackType, CPUProjectionStackType>,
181 CudaInterpolateImageFilter>;
182 using CudaSplatImageFilterType = typename std::
183 conditional_t<std::is_same_v<ProjectionStackType, CPUProjectionStackType>, SplatFilterType, CudaSplatImageFilter>;
185 typename std::conditional_t<std::is_same_v<ProjectionStackType, CPUProjectionStackType>,
187 CudaConstantVolumeSource>;
189 typename std::conditional_t<std::is_same_v<ProjectionStackType, CPUProjectionStackType>,
191 CudaConstantVolumeSeriesSource>;
192#else
198#endif
199
201 void
203
205 void
207
209 itkSetConstObjectMacro(Geometry, ThreeDCircularProjectionGeometry);
210
212 itkSetMacro(UseCudaInterpolation, bool);
213 itkGetMacro(UseCudaInterpolation, bool);
214 itkSetMacro(UseCudaSplat, bool);
215 itkGetMacro(UseCudaSplat, bool);
216 itkSetMacro(UseCudaSources, bool);
217 itkGetMacro(UseCudaSources, bool);
218
220 itkGetMacro(Weights, itk::Array2D<float>);
222
224 virtual void
225 SetSignal(const std::vector<double> & signal);
226
228 itkSetMacro(DisableDisplacedDetectorFilter, bool);
229 itkGetMacro(DisableDisplacedDetectorFilter, bool);
230
231protected:
234
236 void
237 VerifyPreconditions() const override;
238
240 void
242
244 void
246
248 void
249 GenerateData() override;
250
252 void
254
265
271 std::vector<double> m_Signal;
273};
274} // namespace rtk
275
276
277#ifndef ITK_MANUAL_INSTANTIATION
278# include "rtkFourDReconstructionConjugateGradientOperator.hxx"
279#endif
280
281#endif
Array2D class representing a 2D array.
Definition itkArray2D.h:43
Templated n-dimensional image class.
Definition itkImage.h:89
Implements transparent reference counting.
Generate an n-dimensional image with constant pixel values.
Base class for forward projection, i.e. accumulation along x-ray lines.
typename itk::Image< typename ProjectionStackType::PixelType, ProjectionStackType::ImageDimension > CPUProjectionStackType
void SetForwardProjectionFilter(ForwardProjectionFilterType *_arg)
VolumeSeriesType::ConstPointer GetInputVolumeSeries()
void SetInputProjectionStack(const ProjectionStackType *Projections)
~FourDReconstructionConjugateGradientOperator() override=default
virtual void SetSignal(const std::vector< double > &signal)
InterpolatorWithKnownWeightsImageFilter< VolumeType, VolumeSeriesType > InterpolationFilterType
DisplacedDetectorImageFilter< ProjectionStackType > DisplacedDetectorFilterType
void SetInputVolumeSeries(const VolumeSeriesType *VolumeSeries)
BackProjectionImageFilter< ProjectionStackType, ProjectionStackType > BackProjectionFilterType
ProjectionStackType::ConstPointer GetInputProjectionStack()
void SetBackProjectionFilter(BackProjectionFilterType *_arg)
ForwardProjectionImageFilter< ProjectionStackType, ProjectionStackType > ForwardProjectionFilterType
SplatWithKnownWeightsImageFilter< VolumeSeriesType, VolumeType > SplatFilterType
Interpolates (linearly) in a 3D+t sequence of volumes to get a 3D volume.
Splats (linearly) a 3D volume into a 3D+t sequence of volumes.
Projection geometry for a source and a 2-D flat panel.
#define itkSetMacro(name, type)