18 #include <itkMatrix.h>
25 template <
class TInputImage,
class TCoordRep =
double>
70 bool SetRay(OutputPointType RayPosn);
77 m_ProjectionResolution2Dmm[0] = xRes;
78 m_ProjectionResolution2Dmm[1] = yRes;
82 double GetCurrentIntensity(
void)
const;
86 typename InputImageType::SpacingType spacing=this->m_Image->GetSpacing();
89 return vcl_sqrt(m_VoxelIncrement[0]*spacing[0]*m_VoxelIncrement[0]*spacing[0]
90 + m_VoxelIncrement[1]*spacing[1]*m_VoxelIncrement[1]*spacing[1]
91 + m_VoxelIncrement[2]*spacing[2]*m_VoxelIncrement[2]*spacing[2] );
100 void GetBilinearCoefficients(
double &
y,
double &
z)
const;
125 return IntegrateAboveThreshold(integral, 0);
143 bool IntegrateAboveThreshold(
double &integral,
double threshold);
151 bool IncrementRayVoxelIntensities(
double increment);
159 void IncrementIntensities(
double increment);
165 void IncrementIntensities(
void);
179 bool NextPoint(
void);
188 void Initialise(
void);
191 void EndPointsInVoxels(
void);
197 void CalcDirnVector(
void);
205 bool AdjustRayLength(
void);
211 void InitialiseVoxelPointers(
void);
214 void IncrementVoxelPointers(
void);
217 void RecordVolumeDimensions(
void);
220 void DefineCorners(
void);
233 void CalcPlanesAndCorners(
void);
244 bool CalcRayIntercepts(
void);
247 void Line3D(
double x2D,
double y2D,
double r[3],
double u[3]);
257 UNDEFINED_DIRECTION=0,
262 } TraversalDirection;
273 double m_RayPosition2Dmm[2];
276 double m_ProjectionResolution2Dmm[2];
286 double m_RayVoxelStartPosition[3];
296 double m_RayVoxelEndPosition[3];
307 double m_Position3Dvox[3];
310 double m_VoxelIncrement[3];
322 PixelType *m_RayIntersectionVoxels[4];
328 int m_RayIntersectionVoxelIndex[3];
345 double m_RayStartCoordInMM[3];
347 double m_RayEndCoordInMM[3];
353 double m_BoundingPlane[6][4];
355 double m_BoundingCorner[8][3];
358 double m_CurrentRayPositionInMM[3];
361 double m_RayDirectionInMM[3];
369 #ifndef ITK_MANUAL_INSTANTIATION
370 #include "itkRay.txx"
GLdouble GLdouble z
Definition: glew.h:1543
double m_VoxelDimensionInX
Voxel dimension in x.
Definition: itkRay.h:338
ImageType::SizeType SizeType
Definition: niftkMakeLapUSProbeBasicModel.cxx:31
z
Definition: itkRay.h:260
GLenum GLenum GLenum input
Definition: glew.h:12016
int m_NumberOfVoxelsInY
The dimension in voxels of the 3D volume in along the y axis.
Definition: itkRay.h:333
void SetProjectionMatrix(const ProjectionMatrixType input)
Set the combined affine and projection matrix.
Definition: itkRay.h:51
virtual ~Ray()
Destructor.
Definition: itkRay.h:34
GLint GLint GLint GLint GLint GLint y
Definition: glew.h:1236
Definition: niftkITKAffineResampleImage.cxx:74
double m_VoxelDimensionInZ
Voxel dimension in z.
Definition: itkRay.h:342
ImageType::IndexType IndexType
Definition: niftkMakeLapUSProbeBasicModel.cxx:32
itk::Point< double, 2 > InputPointType
Definition: EulerAffine2DJacobianTest.cxx:34
TInputImage InputImageType
Definition: itkRay.h:39
int m_NumberOfVoxelsInZ
The dimension in voxels of the 3D volume in along the z axis.
Definition: itkRay.h:335
int m_NumVoxelPlanesTraversed
The current number of planes of voxels traversed by the ray.
Definition: itkRay.h:319
InputImageType::SizeType SizeType
Definition: itkRay.h:42
InputImageType::IndexType IndexType
Definition: itkRay.h:41
double GetRayPointSpacing(void) const
Return the ray point spacing in mm.
Definition: itkRay.h:85
Class to project a ray through a 3D volume.
Definition: itkRay.h:26
int GetNumberOfRayPoints(void)
Return the number of points on the ray.
Definition: itkRay.h:97
double m_VoxelDimensionInY
Voxel dimension in y.
Definition: itkRay.h:340
float PixelType
Definition: niftkBreastDCEandADC.cxx:88
const InputImageType * m_Image
Definition: itkRay.h:267
itk::Matrix< double, 4, 4 > ProjectionMatrixType
Definition: itkRay.h:48
int GetTraversalDirection(void)
Get the traversal direction.
Definition: itkRay.h:108
InputImageType::PixelType PixelType
Definition: itkRay.h:40
itk::Point< TCoordRep, 2 > OutputPointType
Definition: itkRay.h:37
y
Definition: itkRay.h:259
InputImageType::OffsetValueType OffsetValueType
Definition: itkRay.h:43
bool Integrate(double &integral)
Integrate the interpolated intensities along the ray and return the result.
Definition: itkRay.h:123
GLdouble GLdouble GLdouble r
Definition: glew.h:1390
void SetImage(const InputImageType *input)
Definition: itkRay.h:57
PixelType ** GetRayIntersectionVoxels(void)
Definition: itkRay.h:102
int m_NumberOfVoxelsInX
The dimension in voxels of the 3D volume in along the x axis.
Definition: itkRay.h:331
void SetProjectionResolution2Dmm(double xRes, double yRes)
Definition: itkRay.h:76
TraversalDirection m_TraversalDirection
The direction in which the ray is incremented thorough the volume (x, y or z).
Definition: itkRay.h:313
ProjectionMatrixType m_ProjectionMatrix
The combined affine and perspective transformation.
Definition: itkRay.h:364
x
Definition: itkRay.h:258
const int * GetRayIntersectionVoxelIndex(void) const
Get the voxel index of the intersection.
Definition: itkRay.h:105
bool m_ValidRay
Flag indicating whether the current ray is valid.
Definition: itkRay.h:270
TraversalDirection
Definition: itkRay.h:256
int m_TotalRayVoxelPlanes
The total number of planes of voxels traversed by the ray.
Definition: itkRay.h:316