ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkSiddonJacobsRayCastInterpolateImageFunction.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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/*=========================================================================
19Calculate DRR from a CT dataset using incremental ray-tracing algorithm
20The algorithm was initially proposed by Robert Siddon and improved by
21Filip Jacobs etc.
22
23-------------------------------------------------------------------------
24References:
25
26R. L. Siddon, "Fast calculation of the exact radiological path for a
27threedimensional CT array," Medical Physics 12, 252-55 (1985).
28
29F. Jacobs, E. Sundermann, B. De Sutter, M. Christiaens, and I. Lemahieu,
30"A fast algorithm to calculate the exact radiological path through a pixel
31or voxel space," Journal of Computing and Information Technology ?
32CIT 6, 89-94 (1998).
33
34=========================================================================*/
35#ifndef itkSiddonJacobsRayCastInterpolateImageFunction_h
36#define itkSiddonJacobsRayCastInterpolateImageFunction_h
37
39#include "itkTransform.h"
40#include "itkVector.h"
41#include "itkEuler3DTransform.h"
42
43namespace itk
44{
45
56template <typename TInputImage, typename TCoordRep = float>
58{
59public:
60 ITK_DISALLOW_COPY_AND_MOVE(SiddonJacobsRayCastInterpolateImageFunction);
61
67
69 static constexpr unsigned int InputImageDimension = TInputImage::ImageDimension;
70
71
73
79
81
82 using SizeType = typename TInputImage::SizeType;
83
85
88
90
91
93 itkOverrideGetNameOfClassMacro(SiddonJacobsRayCastInterpolateImageFunction);
94
96 itkNewMacro(Self);
97
100
103
106
109
111 static constexpr unsigned int ImageDimension = Superclass::ImageDimension;
112
115
118
121
122
134 Evaluate(const PointType & point) const override;
135
148 EvaluateAtContinuousIndex(const ContinuousIndexType & index) const override;
149
150 virtual void
152
154 itkSetObjectMacro(Transform, TransformType);
156 itkGetConstObjectMacro(Transform, TransformType);
157
159 itkSetMacro(FocalPointToIsocenterDistance, double);
160 itkGetMacro(FocalPointToIsocenterDistance, double);
161
163 itkSetMacro(ProjectionAngle, double);
164 itkGetMacro(ProjectionAngle, double);
165
167 itkSetMacro(Threshold, double);
168 itkGetMacro(Threshold, double);
169
173 bool
174 IsInsideBuffer(const PointType &) const override
175 {
176 return true;
177 }
178 bool
179 IsInsideBuffer(const ContinuousIndexType &) const override
180 {
181 return true;
182 }
183 bool
184 IsInsideBuffer(const IndexType &) const override
185 {
186 return true;
187 }
188
189#if !defined(ITKV4_COMPATIBILITY)
191 GetRadius() const override
192 {
193 const InputImageType * input = this->GetInputImage();
194 if (!input)
195 {
196 itkExceptionMacro("Input image required!");
197 }
198 return input->GetLargestPossibleRegion().GetSize();
199 }
200#endif
201
202protected:
204
206
207 void
208 PrintSelf(std::ostream & os, Indent indent) const override;
209
211 TransformPointer m_Transform; // Displacement of the volume
212 // Overall inverse transform used to calculate the ray position in the input space
214
215 // The threshold above which voxels along the ray path are integrated
217 double m_FocalPointToIsocenterDistance; // Focal point to isocenter distance
218 double m_ProjectionAngle; // Linac gantry rotation angle in radians
219
220private:
221 void
223 TransformPointer m_GantryRotTransform; // Gantry rotation transform
224 TransformPointer m_CamShiftTransform; // Camera shift transform camRotTransform
225 TransformPointer m_CamRotTransform; // Camera rotation transform
227 PointType m_SourcePoint; // Coordinate of the source in the standard Z projection geometry
228 PointType m_SourceWorld; // Coordinate of the source in the world coordinate system
229};
230
231} // namespace itk
232
233#ifndef ITK_MANUAL_INSTANTIATION
234# include "itkSiddonJacobsRayCastInterpolateImageFunction.hxx"
235#endif
236
237#endif
Euler3DTransform of a vector space (e.g. space coordinates)
typename InputImageType::PixelType InputPixelType
typename InputImageType::ConstPointer InputImageConstPointer
Control indentation during Print() invocation.
Definition itkIndent.h:53
typename NumericTraits< typename TInputImage::PixelType >::RealType RealType
typename InputImageType::IndexType IndexType
Point< TCoordRep, Self::ImageDimension > PointType
ContinuousIndex< TCoordRep, Self::ImageDimension > ContinuousIndexType
Point< double, Self::InputSpaceDimension > InputPointType
Array2D< ParametersValueType > JacobianType
Point< double, Self::OutputSpaceDimension > OutputPointType
void PrintSelf(std::ostream &os, Indent indent) const override
~SiddonJacobsRayCastInterpolateImageFunction() override=default
InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType
TransformPointer m_Transform
Transformation used to calculate the new focal point position.
OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const override
OutputType Evaluate(const PointType &point) const override
Interpolate the image at a point position.
Implements transparent reference counting.
Transform points and vectors from an input space to an output space.
OptimizerParameters< ParametersValueType > ParametersType
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
#define itkSetMacro(name, type)