RTK  2.6.0
Reconstruction Toolkit
rtkZengForwardProjectionImageFilter.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 rtkZengForwardProjectionImageFilter_h
20 #define rtkZengForwardProjectionImageFilter_h
21 
22 #include "rtkConfiguration.h"
24 #include "rtkMacro.h"
25 #include <itkPixelTraits.h>
26 
27 #include <itkMultiplyImageFilter.h>
28 #include <itkAddImageFilter.h>
30 #include <itkPasteImageFilter.h>
31 #include <itkResampleImageFilter.h>
32 #include <itkVector.h>
38 
39 #include <itkVectorImage.h>
40 namespace rtk
41 {
42 
60 template <class TInputImage, class TOutputImage>
61 class ITK_TEMPLATE_EXPORT ZengForwardProjectionImageFilter
62  : public ForwardProjectionImageFilter<TInputImage, TOutputImage>
63 {
64 public:
67  using InputPixelType = typename TInputImage::PixelType;
68  using OutputPixelType = typename TOutputImage::PixelType;
69  using OutputImageRegionType = typename TOutputImage::RegionType;
73 
78  using AddImageFilterType = itk::AddImageFilter<OuputCPUImageType, OuputCPUImageType>;
79  using AddImageFilterPointerType = typename AddImageFilterType::Pointer;
96 
98  static constexpr unsigned int InputImageDimension = TOutputImage::ImageDimension;
99 
102 
104  itkNewMacro(Self);
105 
107 #ifdef itkOverrideGetNameOfClassMacro
108  itkOverrideGetNameOfClassMacro(ZengForwardProjectionImageFilter);
109 #else
111 #endif
112 
113 
115  itkGetMacro(SigmaZero, double);
116  itkSetMacro(SigmaZero, double);
118 
120  itkGetMacro(Alpha, double);
121  itkSetMacro(Alpha, double);
123 
124 protected:
126  ~ZengForwardProjectionImageFilter() override = default;
127 
128  void
129  GenerateInputRequestedRegion() override;
130 
131  void
132  GenerateOutputInformation() override;
133 
134  void
135  GenerateData() override;
136 
139  void
140  VerifyInputInformation() const override;
141 
156 
157 
158 private:
159  ZengForwardProjectionImageFilter(const Self &) = delete; // purposely not implemented
160  void
161  operator=(const Self &) = delete; // purposely not implemented
162 
163  double m_SigmaZero{ 1.5417233052142099 };
164  double m_Alpha{ 0.016241189545787734 };
165  VectorType m_VectorOrthogonalDetector{ 0. };
166  PointType m_centerVolume{ 0 };
167 };
168 
169 } // end namespace rtk
170 
171 #ifndef ITK_MANUAL_INSTANTIATION
172 # include "rtkZengForwardProjectionImageFilter.hxx"
173 #endif
174 
175 #endif
Base class for forward projection, i.e. accumulation along x-ray lines.
typename ResampleImageFilterType::Pointer ResampleImageFilterPointerType
typename PasteImageFilterType::Pointer PasteImageFilterPointerType
typename DiscreteGaussianFilterType::Pointer DiscreteGaussianFilterPointeurType
ResampleImageFilterPointerType m_AttenuationMapResampleImageFilter
typename MultiplyImageFilterType::Pointer MultpiplyImageFilterPointerType
#define itkSetMacro(name, type)
typename CustomUnaryFilterType::Pointer CustomUnaryFilterPointerType
typename AddImageFilterType::Pointer AddImageFilterPointerType
typename OutputImageType::RegionType OutputImageRegionType
DiscreteGaussianFilterPointeurType m_DiscreteGaussianFilter
typename ChangeInformationFilterType::Pointer ChangeInformationPointerType
MultpiplyImageFilterPointerType m_AttenuationMapMultiplyImageFilter
typename RegionOfInterestFilterType::Pointer RegionOfInterestPointerType
typename InputCPUImageType::PointType PointType
itk::AddImageFilter< OuputCPUImageType, OuputCPUImageType > AddImageFilterType