RTK  2.6.0
Reconstruction Toolkit
rtkProjectionsRegionConstIteratorRayBased.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 rtkProjectionsRegionConstIteratorRayBased_h
20 #define rtkProjectionsRegionConstIteratorRayBased_h
21 
23 
25 
26 namespace rtk
27 {
46 template <typename TImage>
48 template <typename TImage>
50 template <typename TImage>
52 
53 template <typename TImage>
55 {
56 public:
60 
71 
74 
80  ProjectionsRegionConstIteratorRayBased(const TImage * ptr,
81  const RegionType & region,
82  const ThreeDCircularProjectionGeometry * geometry,
83  const MatrixType & postMat);
84 
85  static Self *
86  New(const TImage * ptr,
87  const RegionType & region,
88  const ThreeDCircularProjectionGeometry * geometry,
89  const MatrixType & postMat);
90 
91  static Self *
92  New(const TImage * ptr,
93  const RegionType & region,
94  const ThreeDCircularProjectionGeometry * geometry,
95  const HomogeneousMatrixType & postMat);
96 
97  static Self *
98  New(const TImage * ptr, const RegionType & region, const ThreeDCircularProjectionGeometry * geometry);
99 
107  Self &
108  operator++();
109 
114  void
116  {
117  ++*this;
118  }
119 
124  const PointType &
126  {
127  return this->m_SourcePosition;
128  }
129  const PointType &
131  {
132  return this->m_PixelPosition;
133  }
134  const PointType &
136  {
137  return this->m_SourceToPixel;
138  }
140 
143  const PointType
145  {
146  return m_SourceToPixel / m_SourceToPixel.GetNorm();
147  }
148 
149 protected:
151  virtual void
152  NewProjection() = 0;
153 
156  virtual void
157  NewPixel() = 0;
158 
164 };
165 } // namespace rtk
166 
167 #ifndef ITK_MANUAL_INSTANTIATION
168 # include "rtkProjectionsRegionConstIteratorRayBased.hxx"
169 #endif
170 
171 #endif
typename IndexType::IndexValueType IndexValueType
typename OffsetType::OffsetValueType OffsetValueType
Projection geometry for a source and a 2-D flat panel.
typename TImage::RegionType RegionType
Implements a ray-based iterator for a point source and a flat panel.
Implements a ray-based iterator for a parallel beam and a flat panel.
Implements a ray-based iterator for a point source and a cylindrical panel.
ThreeDCircularProjectionGeometry::ConstPointer m_Geometry
Iterate over a projection stack with corresponding ray information.