RTK  1.4.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  * 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 #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 {
98 template< typename ProjectionStackType, typename VolumeSeriesType>
99 class FourDToProjectionStackImageFilter : public itk::ImageToImageFilter<ProjectionStackType, ProjectionStackType>
100 {
101 public:
106 
108  typedef ProjectionStackType VolumeType;
109 
111  itkNewMacro(Self)
112 
113 
115 
117  void SetInputVolumeSeries(const VolumeSeriesType* VolumeSeries);
118 
121  void SetInputProjectionStack(const ProjectionStackType* Projection);
122 
124  typedef rtk::ForwardProjectionImageFilter< ProjectionStackType, ProjectionStackType > ForwardProjectionFilterType;
125  typedef itk::PasteImageFilter<ProjectionStackType, ProjectionStackType> PasteFilterType;
126  typedef rtk::InterpolatorWithKnownWeightsImageFilter< VolumeType, VolumeSeriesType> InterpolatorFilterType;
130 
132  void SetForwardProjectionFilter (const typename ForwardProjectionFilterType::Pointer _arg);
133 
135  virtual void SetGeometry(GeometryType::Pointer _arg);
136 
138  void SetWeights(const itk::Array2D<float> _arg);
139 
142 
144  virtual void SetSignal(const std::vector<double> signal);
145 
146 protected:
147  FourDToProjectionStackImageFilter();
148  virtual ~FourDToProjectionStackImageFilter() ITK_OVERRIDE {}
149 
150  typename VolumeSeriesType::ConstPointer GetInputVolumeSeries();
151  typename ProjectionStackType::Pointer GetInputProjectionStack();
152 
154  void GenerateData() ITK_OVERRIDE;
155 
156  void GenerateOutputInformation() ITK_OVERRIDE;
157 
158  void GenerateInputRequestedRegion() ITK_OVERRIDE;
159 
166 
171  std::vector<double> m_Signal;
172 
173 private:
174  FourDToProjectionStackImageFilter(const Self &); //purposely not implemented
175  void operator=(const Self &); //purposely not implemented
176 
177 };
178 } //namespace ITK
179 
180 
181 #ifndef ITK_MANUAL_INSTANTIATION
182 #include "rtkFourDToProjectionStackImageFilter.hxx"
183 #endif
184 
185 #endif
itk::ImageToImageFilter< ProjectionStackType, ProjectionStackType > Superclass
Base class for forward projection, i.e. accumulation along x-ray lines.
ConstantProjectionStackSourceType::Pointer m_ConstantProjectionStackSource
TOutputImage::RegionType OutputImageRegionType
Generate an n-dimensional image with constant pixel values.
virtual void SetSignal(const std::vector< double > signal)
STL namespace.
VolumeSeriesType::ConstPointer GetInputVolumeSeries()
virtual void SetGeometry(GeometryType::Pointer _arg)
Projection geometry for a source and a 2-D flat panel.
ProjectionStackType::Pointer GetInputProjectionStack()
void SetForwardProjectionFilter(const typename ForwardProjectionFilterType::Pointer _arg)
void SetWeights(const itk::Array2D< float > _arg)
void SetInputProjectionStack(const ProjectionStackType *Projection)
Interpolates (linearly) in a 3D+t sequence of volumes to get a 3D volume.
ForwardProjectionFilterType::Pointer m_ForwardProjectionFilter
void SetInputVolumeSeries(const VolumeSeriesType *VolumeSeries)
ConstantProjectionStackSourceType::OutputImageRegionType m_PasteRegion
Implements part of the 4D reconstruction by conjugate gradient.