ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
rtkProjectionGeometry.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 rtkProjectionGeometry_h
20#define rtkProjectionGeometry_h
21
22#include <itkImageBase.h>
23
24#include <vector>
25
26#include "rtkMacro.h"
27
28namespace rtk
29{
30
43template <unsigned int TDimension = 3>
44class ITK_TEMPLATE_EXPORT ProjectionGeometry : public itk::DataObject
45{
46public:
47 ITK_DISALLOW_COPY_AND_MOVE(ProjectionGeometry);
48
53
55 itkNewMacro(Self);
56
61
63
70 const std::vector<MatrixType> &
72 {
73 return this->m_Matrices;
74 }
75
77 MatrixType
78 GetMatrix(const unsigned int i) const
79 {
80 if (i >= this->m_Matrices.size())
81 {
82 itkExceptionMacro(<< "Requested matrix index " << i << " is out of bound.");
83 }
84 return this->m_Matrices[i];
85 }
86
88 virtual void
90
91protected:
92 ProjectionGeometry() = default;
93 ~ProjectionGeometry() override = default;
94
95 void
96 PrintSelf(std::ostream & os, itk::Indent indent) const override;
97
99 virtual void
101 {
102 this->m_Matrices.push_back(m);
103 this->Modified();
104 }
105
106private:
108 std::vector<MatrixType> m_Matrices;
109};
110} // namespace rtk
111
112#include "rtkProjectionGeometry.hxx"
113
114#endif // rtkProjectionGeometry_h
Base class for all data objects in ITK.
Vector< SpacingValueType, VImageDimension > SpacingType
Size< VImageDimension > SizeType
Point< PointValueType, VImageDimension > PointType
Control indentation during Print() invocation.
Definition itkIndent.h:53
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:71
virtual void Modified() const
Implements transparent reference counting.
typename itk::Matrix< double, TDimension, TDimension+1 > MatrixType
virtual void AddMatrix(const MatrixType &m)
typename itk::ImageBase< TDimension >::PointType PointType
typename itk::ImageBase< TDimension >::SpacingType SpacingType
void PrintSelf(std::ostream &os, itk::Indent indent) const override
typename itk::ImageBase< TDimension >::SizeType SizeType
virtual void Clear()
~ProjectionGeometry() override=default
MatrixType GetMatrix(const unsigned int i) const
const std::vector< MatrixType > & GetMatrices() const