ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkBackProjectionImageFilter.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 rtkBackProjectionImageFilter_h
20#define rtkBackProjectionImageFilter_h
21
22#include "rtkConfiguration.h"
23
24#include <itkConceptChecking.h>
26
28
29#include <type_traits>
30#include <typeinfo>
31
32namespace rtk
33{
34
49template <class TInputImage, class TOutputImage>
50class ITK_TEMPLATE_EXPORT BackProjectionImageFilter : public itk::InPlaceImageFilter<TInputImage, TOutputImage>
51{
52public:
53 ITK_DISALLOW_COPY_AND_MOVE(BackProjectionImageFilter);
54
60 using InputPixelType = typename TInputImage::PixelType;
61 using InternalInputPixelType = typename TInputImage::InternalPixelType;
62 using OutputImageRegionType = typename TOutputImage::RegionType;
63
67 using ProjectionImageType = itk::Image<InputPixelType, TInputImage::ImageDimension - 1>;
69
71 itkNewMacro(Self);
72
74 itkOverrideGetNameOfClassMacro(BackProjectionImageFilter);
75
77 itkGetConstObjectMacro(Geometry, GeometryType);
78 itkSetConstObjectMacro(Geometry, GeometryType);
79
81 itkGetMacro(Transpose, bool);
82 itkSetMacro(Transpose, bool);
83
84protected:
86 : m_Geometry(nullptr)
87 {
89 this->SetInPlace(true);
90 };
91 ~BackProjectionImageFilter() override = default;
92
94 void
95 VerifyPreconditions() const override;
96
98 void
100
101 void
103
104 void
105 DynamicThreadedGenerateData(const OutputImageRegionType & outputRegionForThread) override;
106
108 virtual void
110 const OutputImageRegionType & region,
111 const ProjectionMatrixType & volIndexToProjPP,
113 ProjectionImagePointer projection);
114
117 virtual void
119 const ProjectionMatrixType & matrix,
120 ProjectionImagePointer projection);
121
124 virtual void
126 const ProjectionMatrixType & matrix,
127 ProjectionImagePointer projection);
128
131 void
132 VerifyInputInformation() const override
133 {}
134
139 template <class TProjectionImage>
140 typename TProjectionImage::Pointer
141 GetProjection(unsigned int iProj);
142
147
150
153
156
157private:
160 bool m_Transpose{ false };
161};
162
163} // end namespace rtk
164
166
167#if defined(RTK_USE_CUDA) && defined(RTK_EXTERN_TEMPLATES)
168ITK_GCC_PRAGMA_DIAG_PUSH()
169ITK_GCC_PRAGMA_DIAG(ignored "-Wattributes")
170extern template class RTK_EXPORT_EXPLICIT
171 rtk::BackProjectionImageFilter<itk::CudaImage<float, 3>, itk::CudaImage<float, 3>>;
172ITK_GCC_PRAGMA_DIAG_POP()
173#endif
174
175#ifndef ITK_MANUAL_INSTANTIATION
176# include "rtkBackProjectionImageFilter.hxx"
177#endif
178
179#endif
Base class for filters that take an image as input and produce an image as output.
Templated n-dimensional image class.
Definition itkImage.h:89
SmartPointer< Self > Pointer
Definition itkImage.h:96
Base class for filters that take an image as input and overwrite that image as the output.
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:71
virtual void SetNumberOfRequiredInputs(DataObjectPointerArraySizeType)
Set the number of required indexed inputs.
Implements transparent reference counting.
itk::ImageToImageFilter< TOutputImage, TOutputImage > Superclass
TProjectionImage::Pointer GetProjection(unsigned int iProj)
void BeforeThreadedGenerateData() override
itk::Matrix< double, TInputImage::ImageDimension, TInputImage::ImageDimension > GetProjectionPhysicalPointToProjectionIndexMatrix(unsigned int iProj)
void GenerateInputRequestedRegion() override
ProjectionMatrixType GetIndexToIndexProjectionMatrix(unsigned int iProj)
virtual void CylindricalDetectorCenteredOnSourceBackprojection(const OutputImageRegionType &region, const ProjectionMatrixType &volIndexToProjPP, const itk::Matrix< double, TInputImage::ImageDimension, TInputImage::ImageDimension > &projPPToProjIndex, ProjectionImagePointer projection)
itk::Image< InputPixelType, TOutputImage::ImageDimension - 1 > ProjectionImageType
void DynamicThreadedGenerateData(const OutputImageRegionType &outputRegionForThread) override
~BackProjectionImageFilter() override=default
virtual void OptimizedBackprojectionY(const OutputImageRegionType &region, const ProjectionMatrixType &matrix, ProjectionImagePointer projection)
virtual void OptimizedBackprojectionX(const OutputImageRegionType &region, const ProjectionMatrixType &matrix, ProjectionImagePointer projection)
ProjectionMatrixType GetVolumeIndexToProjectionPhysicalPointMatrix(unsigned int iProj)
void VerifyPreconditions() const override
typename itk::Matrix< double, TDimension, TDimension+1 > MatrixType
Projection geometry for a source and a 2-D flat panel.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)