NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
itkInvRayCastInterpolateImageFunction.h
Go to the documentation of this file.
1 /*=============================================================================
2 
3  NifTK: A software platform for medical image computing.
4 
5  Copyright (c) University College London (UCL). All rights reserved.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE.
10 
11  See LICENSE.txt in the top level directory for details.
12 
13 =============================================================================*/
14 
15 #ifndef itkInvRayCastInterpolateImageFunction_h
16 #define itkInvRayCastInterpolateImageFunction_h
17 
18 #include <itkInterpolateImageFunction.h>
19 #include <itkTransform.h>
20 #include <itkVector.h>
21 #include <itkImage.h>
22 
23 namespace itk
24 {
25 
37 template <class TInputImage, class TCoordRep = double>
39  public InterpolateImageFunction<TInputImage,TCoordRep>
40 {
41 public:
44  typedef InterpolateImageFunction<TInputImage,TCoordRep> Superclass;
45  typedef SmartPointer<Self> Pointer;
46  typedef SmartPointer<const Self> ConstPointer;
47 
49  itkStaticConstMacro(InputImageDimension, unsigned int,
50  TInputImage::ImageDimension);
51 
56  typedef Transform<TCoordRep,3,3> TransformType;
57 
63 
65 
66  typedef typename TInputImage::SizeType SizeType;
67 
68  typedef Vector<TCoordRep, 3> DirectionType;
69 
71  typedef InterpolateImageFunction<TInputImage,TCoordRep> InterpolatorType;
72 
73  typedef typename InterpolatorType::Pointer InterpolatorPointer;
74 
75 
77  itkTypeMacro(InvRayCastInterpolateImageFunction, InterpolateImageFunction);
78 
80  itkNewMacro(Self);
81 
83  typedef typename Superclass::OutputType OutputType;
84 
86  typedef typename Superclass::InputImageType InputImageType;
87 
89  typedef typename Superclass::RealType RealType;
90 
92  itkStaticConstMacro(ImageDimension, unsigned int,Superclass::ImageDimension);
93 
95  typedef typename Superclass::PointType PointType;
96 
98  typedef typename Superclass::IndexType IndexType;
99 
101  typedef typename Superclass::ContinuousIndexType ContinuousIndexType;
102 
113  virtual OutputType Evaluate( const PointType& point ) const;
114 
126  virtual OutputType EvaluateAtContinuousIndex(
127  const ContinuousIndexType &index ) const;
128 
129 
131  itkSetObjectMacro( Transform, TransformType );
133  itkGetObjectMacro( Transform, TransformType );
134 
136  itkSetObjectMacro( Interpolator, InterpolatorType );
138  itkGetObjectMacro( Interpolator, InterpolatorType );
139 
141  itkSetMacro( FocalPoint, InputPointType );
143  itkGetConstMacro( FocalPoint, InputPointType );
144 
146  itkSetMacro( Threshold, double );
148  itkGetConstMacro( Threshold, double );
149 
153  inline bool IsInsideBuffer( const PointType & ) const
154  {
155  return true;
156  }
157  bool IsInsideBuffer( const ContinuousIndexType & ) const
158  {
159  return true;
160  }
161  bool IsInsideBuffer( const IndexType & ) const
162  {
163  return true;
164  }
165 
166 protected:
167 
170 
173 
175  void PrintSelf(std::ostream& os, Indent indent) const;
176 
178  TransformPointer m_Transform;
179 
181  InputPointType m_FocalPoint;
182 
184  double m_Threshold;
185 
187  InterpolatorPointer m_Interpolator;
188 
189 
190 private:
191  InvRayCastInterpolateImageFunction( const Self& ); //purposely not implemented
192  void operator=( const Self& ); //purposely not implemented
193 
194 
195 };
196 
197 } // namespace itk
198 
199 #ifndef ITK_MANUAL_INSTANTIATION
200 #include "itkInvRayCastInterpolateImageFunction.txx"
201 #endif
202 
203 #endif
InputPointType m_FocalPoint
The focal point or position of the ray source.
Definition: itkInvRayCastInterpolateImageFunction.h:181
Superclass::ContinuousIndexType ContinuousIndexType
Definition: itkInvRayCastInterpolateImageFunction.h:101
Transform< TCoordRep, 3, 3 > TransformType
Definition: itkInvRayCastInterpolateImageFunction.h:56
Superclass::InputPixelType PixelType
Definition: itkInvRayCastInterpolateImageFunction.h:64
TransformPointer m_Transform
Transformation used to calculate the new focal point position.
Definition: itkInvRayCastInterpolateImageFunction.h:178
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
TInputImage::SizeType SizeType
Definition: itkInvRayCastInterpolateImageFunction.h:66
InterpolateImageFunction< TInputImage, TCoordRep > InterpolatorType
Definition: itkInvRayCastInterpolateImageFunction.h:71
InterpolatorPointer m_Interpolator
Pointer to the interpolator.
Definition: itkInvRayCastInterpolateImageFunction.h:187
Definition: niftkITKAffineResampleImage.cxx:74
bool IsInsideBuffer(const ContinuousIndexType &) const
Definition: itkInvRayCastInterpolateImageFunction.h:157
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
Superclass::ParametersType ParametersType
Definition: itkEulerAffineTransform.h:66
TransformType::Pointer TransformPointer
Definition: itkInvRayCastInterpolateImageFunction.h:58
float InputPixelType
Definition: niftkCTEPrepareVolumes.cxx:33
Superclass::RealType RealType
Definition: itkInvRayCastInterpolateImageFunction.h:89
Superclass::OutputType OutputType
Definition: itkInvRayCastInterpolateImageFunction.h:80
InterpolateImageFunction< TInputImage, TCoordRep > Superclass
Definition: itkInvRayCastInterpolateImageFunction.h:44
TransformType::ParametersType TransformParametersType
Definition: itkInvRayCastInterpolateImageFunction.h:61
bool IsInsideBuffer(const IndexType &) const
Definition: itkInvRayCastInterpolateImageFunction.h:161
TransformType::JacobianType TransformJacobianType
Definition: itkInvRayCastInterpolateImageFunction.h:62
TransformType::InputPointType InputPointType
Definition: itkInvRayCastInterpolateImageFunction.h:59
SmartPointer< Self > Pointer
Definition: itkInvRayCastInterpolateImageFunction.h:45
Superclass::InputImageType InputImageType
Definition: itkInvRayCastInterpolateImageFunction.h:86
InterpolatorType::Pointer InterpolatorPointer
Definition: itkInvRayCastInterpolateImageFunction.h:73
GLuint index
Definition: glew.h:1798
Superclass::PointType PointType
Definition: itkInvRayCastInterpolateImageFunction.h:95
~InvRayCastInterpolateImageFunction()
Destructor.
Definition: itkInvRayCastInterpolateImageFunction.h:172
double m_Threshold
The threshold above which voxels along the ray path are integrated.
Definition: itkInvRayCastInterpolateImageFunction.h:184
Superclass::OutputPointType OutputPointType
Definition: itkEulerAffineTransform.h:89
TransformType::OutputPointType OutputPointType
Definition: itkInvRayCastInterpolateImageFunction.h:60
Vector< TCoordRep, 3 > DirectionType
Definition: itkInvRayCastInterpolateImageFunction.h:68
Superclass::IndexType IndexType
Definition: itkInvRayCastInterpolateImageFunction.h:98
SmartPointer< const Self > ConstPointer
Definition: itkInvRayCastInterpolateImageFunction.h:46
Superclass::JacobianType JacobianType
Definition: itkEulerAffineTransform.h:69
SmartPointer< Self > Pointer
Definition: itkEulerAffineTransform.h:49
Definition: itkInvRayCastInterpolateImageFunction.h:38
Superclass::InputPointType InputPointType
Definition: itkEulerAffineTransform.h:87
InvRayCastInterpolateImageFunction Self
Definition: itkInvRayCastInterpolateImageFunction.h:43
bool IsInsideBuffer(const PointType &) const
Definition: itkInvRayCastInterpolateImageFunction.h:153