RTK  2.7.0
Reconstruction Toolkit
rtkMotionCompensatedFourDConjugateGradientConeBeamReconstructionFilter.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 rtkMotionCompensatedFourDConjugateGradientConeBeamReconstructionFilter_h
20 #define rtkMotionCompensatedFourDConjugateGradientConeBeamReconstructionFilter_h
21 
25 #ifdef RTK_USE_CUDA
28 #endif
29 
30 namespace rtk
31 {
67 template <typename VolumeSeriesType, typename ProjectionStackType>
69  : public rtk::FourDConjugateGradientConeBeamReconstructionFilter<VolumeSeriesType, ProjectionStackType>
70 {
71 public:
73 
79 
81  using InputImageType = VolumeSeriesType;
82  using OutputImageType = VolumeSeriesType;
83  using VolumeType = ProjectionStackType;
84  using VectorForDVF = itk::CovariantVector<typename VolumeSeriesType::ValueType, VolumeSeriesType::ImageDimension - 1>;
85 
86  using ForwardProjectionType = typename Superclass::ForwardProjectionType;
87  using BackProjectionType = typename Superclass::BackProjectionType;
88  using DVFSequenceImageType =
89  typename VolumeSeriesType::template RebindImageType<VectorForDVF, VolumeSeriesType::ImageDimension>;
90  using DVFImageType =
91  typename VolumeSeriesType::template RebindImageType<VectorForDVF, VolumeSeriesType::ImageDimension - 1>;
92 
96  itkNewMacro(Self);
97 
100 
102  void
103  SetDisplacementField(const DVFSequenceImageType * DisplacementField);
104  void
105  SetInverseDisplacementField(const DVFSequenceImageType * InverseDisplacementField);
106  typename DVFSequenceImageType::ConstPointer
107  GetDisplacementField();
108  typename DVFSequenceImageType::ConstPointer
109  GetInverseDisplacementField();
111 
113  void
114  SetSignal(const std::vector<double> signal) override;
115 
116  // Sub filters type alias
118  using MCCGOperatorType =
120 
122  itkSetMacro(UseCudaCyclicDeformation, bool);
123  itkGetMacro(UseCudaCyclicDeformation, bool);
125 
127  virtual void
128  SetForwardProjectionFilter(ForwardProjectionType fwtype) override;
129 
131  virtual void
132  SetBackProjectionFilter(BackProjectionType bptype) override;
133 
134 protected:
137 
138  void
139  GenerateOutputInformation() override;
140  void
141  GenerateInputRequestedRegion() override;
142 
144 
145 }; // end of class
146 
147 } // end namespace rtk
148 
149 #ifndef ITK_MANUAL_INSTANTIATION
150 # include "rtkMotionCompensatedFourDConjugateGradientConeBeamReconstructionFilter.hxx"
151 #endif
152 
153 #endif
typename VolumeSeriesType::template RebindImageType< VectorForDVF, VolumeSeriesType::ImageDimension - 1 > DVFImageType
#define itkSetMacro(name, type)
Back projection part for motion compensated iterative 4D reconstruction.
Implements part of the 4D reconstruction by conjugate gradient.
typename VolumeSeriesType::template RebindImageType< VectorForDVF, VolumeSeriesType::ImageDimension > DVFSequenceImageType