RTK  2.6.0
Reconstruction Toolkit
rtkZengBackProjectionImageFilter.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 rtkZengBackProjectionImageFilter_h
20 #define rtkZengBackProjectionImageFilter_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>
35 #include <itkExtractImageFilter.h>
39 
40 #include "rtkConstantImageSource.h"
41 
42 #include <itkVectorImage.h>
43 namespace rtk
44 {
45 
63 template <class TInputImage, class TOutputImage>
64 class ITK_TEMPLATE_EXPORT ZengBackProjectionImageFilter : public BackProjectionImageFilter<TInputImage, TOutputImage>
65 {
66 public:
69  using InputPixelType = typename TInputImage::PixelType;
70  using OutputPixelType = typename TOutputImage::PixelType;
71  using OutputImageRegionType = typename TOutputImage::RegionType;
75 
80  using AddImageFilterType = itk::AddImageFilter<InputCPUImageType, InputCPUImageType>;
81  using AddImageFilterPointerType = typename AddImageFilterType::Pointer;
102 
104  static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
105 
108 
110  itkNewMacro(Self);
111 
113 #ifdef itkOverrideGetNameOfClassMacro
114  itkOverrideGetNameOfClassMacro(ZengBackProjectionImageFilter);
115 #else
117 #endif
118 
119 
121  itkGetMacro(SigmaZero, double);
122  itkSetMacro(SigmaZero, double);
124 
126  itkGetMacro(Alpha, double);
127  itkSetMacro(Alpha, double);
129 
130 
131 protected:
133  ~ZengBackProjectionImageFilter() override = default;
134 
136  void
137  GenerateInputRequestedRegion() override;
138 
139  void
140  GenerateOutputInformation() override;
141 
142  void
143  GenerateData() override;
144 
147  void
148  VerifyInputInformation() const override;
149 
166 
167 private:
168  ZengBackProjectionImageFilter(const Self &) = delete; // purposely not implemented
169  void
170  operator=(const Self &) = delete; // purposely not implemented
171 
172  double m_SigmaZero{ 1.5417233052142099 };
173  double m_Alpha{ 0.016241189545787734 };
174  VectorType m_VectorOrthogonalDetector{ 0. };
175  PointType m_centerVolume{ 0 };
176 };
177 
178 } // end namespace rtk
179 
180 #ifndef ITK_MANUAL_INSTANTIATION
181 # include "rtkZengBackProjectionImageFilter.hxx"
182 #endif
183 
184 #endif
typename ExtractImageFilterType::Pointer ExtractImageFilterPointerType
ConstantVolumeSourcePointerType m_ConstantVolumeSource
typename OuputCPUImageType::PointType PointType
typename PasteImageFilterType::Pointer PasteImageFilterPointerType
Generate an n-dimensional image with constant pixel values.
itk::AddImageFilter< InputCPUImageType, InputCPUImageType > AddImageFilterType
typename CustomUnaryFilterType::Pointer CustomUnaryFilterPointerType
typename TInputImage::PixelType InputPixelType
typename TOutputImage::PixelType OutputPixelType
#define itkSetMacro(name, type)
typename ConstantVolumeSourceType::Pointer ConstantVolumeSourcePointerType
typename RegionOfInterestFilterType::Pointer RegionOfInterestPointerType
DiscreteGaussianFilterPointeurType m_DiscreteGaussianFilter
typename OutputImageType::RegionType OutputImageRegionType
ChangeInformationPointerType m_AttenuationMapChangeInformation
typename ResampleImageFilterType::Pointer ResampleImageFilterPointerType
MultpiplyImageFilterPointerType m_MultiplyImageFilter
RegionOfInterestPointerType m_AttenuationMapRegionOfInterest
typename MultiplyImageFilterType::Pointer MultpiplyImageFilterPointerType
typename DiscreteGaussianFilterType::Pointer DiscreteGaussianFilterPointeurType
ResampleImageFilterPointerType m_ResampleImageFilter
typename ChangeInformationFilterType::Pointer ChangeInformationPointerType
ResampleImageFilterPointerType m_AttenuationMapResampleImageFilter
typename TransformType::Pointer TransformPointerType
typename AddImageFilterType::Pointer AddImageFilterPointerType
MultpiplyImageFilterPointerType m_AttenuationMapMultiplyImageFilter