ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkSiddonJacobsRayCastInterpolateImageFunction.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software 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  * http://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 Calculate DRR from a CT dataset using incremental ray-tracing algorithm
20 The algorithm was initially proposed by Robert Siddon and improved by
21 Filip Jacobs etc.
22 
23 -------------------------------------------------------------------------
24 References:
25 
26 R. L. Siddon, "Fast calculation of the exact radiological path for a
27 threedimensional CT array," Medical Physics 12, 252-55 (1985).
28 
29 F. Jacobs, E. Sundermann, B. De Sutter, M. Christiaens, and I. Lemahieu,
30 "A fast algorithm to calculate the exact radiological path through a pixel
31 or voxel space," Journal of Computing and Information Technology ?
32 CIT 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 
43 namespace itk
44 {
45 
56 template <typename TInputImage, typename TCoordRep = float >
58  public InterpolateImageFunction<TInputImage,TCoordRep>
59 {
60 public:
66 
68  itkStaticConstMacro(InputImageDimension, unsigned int,
69  TInputImage::ImageDimension);
70 
71 
73 
79 
81 
82  typedef typename TInputImage::SizeType SizeType;
83 
85 
88 
90 
91 
94 
96  itkNewMacro(Self);
97 
99  typedef typename Superclass::OutputType OutputType;
100 
103 
106 
108  typedef typename Superclass::RealType RealType;
109 
111  itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
112 
115 
118 
121 
122 
133  virtual OutputType Evaluate( const PointType& point ) const;
134 
147  const ContinuousIndexType &index ) const;
148 
149  virtual void Initialize(void);
150 
152  itkSetObjectMacro( Transform, TransformType );
153 
156 
158  itkSetMacro(FocalPointToIsocenterDistance, double);
159  itkGetMacro(FocalPointToIsocenterDistance, double);
161 
163  itkSetMacro(ProjectionAngle, double);
164  itkGetMacro(ProjectionAngle, double);
166 
168  itkSetMacro(Threshold, double);
169  itkGetMacro(Threshold, double);
171 
175  inline bool IsInsideBuffer( const PointType & ) const
176  {
177  return true;
178  }
179  bool IsInsideBuffer( const ContinuousIndexType & ) const
180  {
181  return true;
182  }
183  bool IsInsideBuffer( const IndexType & ) const
184  {
185  return true;
186  }
188 
189 protected:
191 
193 
194  virtual void PrintSelf(std::ostream& os, Indent indent) const ITK_OVERRIDE;
195 
197  TransformPointer m_Transform; // Displacement of the volume
198  // Overall inverse transform used to calculate the ray position in the input space
200 
201  // The threshold above which voxels along the ray path are integrated
202  double m_Threshold;
203  double m_FocalPointToIsocenterDistance; // Focal point to isocenter distance
204  double m_ProjectionAngle; // Linac gantry rotation angle in radians
205 
206 private:
207  SiddonJacobsRayCastInterpolateImageFunction( const Self& ); //purposely not implemented
208  void operator=( const Self& ); //purposely not implemented
209  void ComputeInverseTransform( void ) const;
210  TransformPointer m_GantryRotTransform; // Gantry rotation transform
211  TransformPointer m_CamShiftTransform; // Camera shift transform camRotTransform
212  TransformPointer m_CamRotTransform; // Camera rotation transform
213  TransformPointer m_ComposedTransform; // Composed transform
214  PointType m_SourcePoint; // Coordinate of the source in the standard Z projection geometry
215  PointType m_SourceWorld; // Coordinate of the source in the world coordinate system
216 };
217 
218 } // namespace itk
219 
220 #ifndef ITK_MANUAL_INSTANTIATION
221 #include "itkSiddonJacobsRayCastInterpolateImageFunction.hxx"
222 #endif
223 
224 #endif
Light weight base class for most itk classes.
Superclass::OutputPointType OutputPointType
virtual OutputType EvaluateAtContinuousIndex(const ContinuousIndexType &index) const
static const unsigned int ImageDimension
Transform points and vectors from an input space to an output space.
Definition: itkTransform.h:82
A templated class holding a n-Dimensional vector.
Definition: itkVector.h:62
InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType
virtual void PrintSelf(std::ostream &os, Indent indent) const override
Superclass::InputImageType InputImageType
Projective interpolation of an image at specified positions.
Superclass::ParametersType ParametersType
Superclass::ContinuousIndexType ContinuousIndexType
Base class for all image interpolaters.
Euler3DTransform of a vector space (e.g. space coordinates)
virtual OutputType Evaluate(const PointType &point) const
Interpolate the image at a point position.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
Superclass::JacobianType JacobianType
TransformPointer m_Transform
Transformation used to calculate the new focal point position.
NumericTraits< typename TInputImage::PixelType >::RealType RealType
Superclass::InputPointType InputPointType