RTK  2.6.0
Reconstruction Toolkit
rtkFourDToProjectionStackImageFilter.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 rtkFourDToProjectionStackImageFilter_h
19 #define rtkFourDToProjectionStackImageFilter_h
20 
21 #include <itkExtractImageFilter.h>
22 #include <itkPasteImageFilter.h>
23 #include <itkMultiplyImageFilter.h>
24 
25 #include "rtkConstantImageSource.h"
28 
29 namespace rtk
30 {
99 template <typename ProjectionStackType, typename VolumeSeriesType>
100 class ITK_TEMPLATE_EXPORT FourDToProjectionStackImageFilter
101  : public itk::ImageToImageFilter<ProjectionStackType, ProjectionStackType>
102 {
103 public:
104  ITK_DISALLOW_COPY_AND_MOVE(FourDToProjectionStackImageFilter);
105 
110 
112  using VolumeType = ProjectionStackType;
113 
115  itkNewMacro(Self);
116 
118 #ifdef itkOverrideGetNameOfClassMacro
119  itkOverrideGetNameOfClassMacro(FourDToProjectionStackImageFilter);
120 #else
122 #endif
123 
124 
126  void
127  SetInputVolumeSeries(const VolumeSeriesType * VolumeSeries);
128 
132  void
133  SetInputProjectionStack(const ProjectionStackType * Projection);
134 
142 
144  void
145  SetForwardProjectionFilter(const typename ForwardProjectionFilterType::Pointer _arg);
146 
148  virtual void
149  SetGeometry(GeometryType::Pointer _arg);
150 
152  void
153  SetWeights(const itk::Array2D<float> _arg);
154 
156  void
157  InitializeConstantVolumeSource();
158 
160  virtual void
161  SetSignal(const std::vector<double> signal);
162 
163 protected:
165  ~FourDToProjectionStackImageFilter() override = default;
166 
167  typename VolumeSeriesType::ConstPointer
168  GetInputVolumeSeries();
169  typename ProjectionStackType::Pointer
170  GetInputProjectionStack();
171 
173  void
174  GenerateData() override;
175 
176  void
177  GenerateOutputInformation() override;
178 
179  void
180  GenerateInputRequestedRegion() override;
181 
188 
193  std::vector<double> m_Signal;
194 };
195 } // namespace rtk
196 
197 
198 #ifndef ITK_MANUAL_INSTANTIATION
199 # include "rtkFourDToProjectionStackImageFilter.hxx"
200 #endif
201 
202 #endif
Base class for forward projection, i.e. accumulation along x-ray lines.
ConstantProjectionStackSourceType::Pointer m_ConstantProjectionStackSource
Generate an n-dimensional image with constant pixel values.
Projection geometry for a source and a 2-D flat panel.
typename TOutputImage::RegionType OutputImageRegionType
Interpolates (linearly) in a 3D+t sequence of volumes to get a 3D volume.
ForwardProjectionFilterType::Pointer m_ForwardProjectionFilter
ConstantProjectionStackSourceType::OutputImageRegionType m_PasteRegion
Implements part of the 4D reconstruction by conjugate gradient.