Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
mitk::ToFProcessingCommon Class Reference

Helper class providing functions which are useful for multiple usage. More...

#include <mitkToFProcessingCommon.h>

Public Types

typedef double ToFScalarType
 
typedef itk::Point< ToFScalarType, 2 > ToFPoint2D
 
typedef itk::Point< ToFScalarType, 3 > ToFPoint3D
 
typedef itk::Vector< ToFScalarType, 2 > ToFVector2D
 
typedef itk::Vector< ToFScalarType, 3 > ToFVector3D
 

Static Public Member Functions

static ToFPoint3D IndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinates (itk::Index< 3 > index, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength[2], ToFScalarType principalPoint[2])
 Convenience method to convert index based distances to cartesian coordinates using array as input. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength, ToFScalarType interPixelDistanceX, ToFScalarType interPixelDistanceY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength, ToFPoint2D interPixelDistance, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (itk::Index< 3 > index, ToFScalarType distance, ToFScalarType focalLength, ToFPoint2D interPixelDistance, ToFPoint2D principalPoint)
 Convert index based distances to cartesian coordinates. More...
 
static ToFPoint3D IndexToCartesianCoordinatesWithInterpixdist (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength, ToFScalarType interPixelDistance[2], ToFScalarType principalPoint[2])
 Convenience method to convert index based distances to cartesian coordinates using array as input. More...
 
static ToFPoint3D CartesianToIndexCoordinates (ToFScalarType cartesianPointX, ToFScalarType cartesianPointY, ToFScalarType cartesianPointZ, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFPoint3D CartesianToIndexCoordinates (ToFScalarType cartesianPoint[3], ToFScalarType focalLength[2], ToFScalarType principalPoint[2], bool calculateDistance=true)
 Convenience method to convert cartesian coordinates to index based distances using arrays. More...
 
static ToFPoint3D CartesianToIndexCoordinates (ToFPoint3D cartesianPoint, ToFPoint2D focalLength, ToFPoint2D principalPoint, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFPoint3D CartesianToIndexCoordinatesWithInterpixdist (ToFScalarType cartesianPointX, ToFScalarType cartesianPointY, ToFScalarType cartesianPointZ, ToFScalarType focalLength, ToFScalarType interPixelDistanceX, ToFScalarType interPixelDistanceY, ToFScalarType principalPointX, ToFScalarType principalPointY, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFPoint3D CartesianToIndexCoordinatesWithInterpixdist (ToFScalarType cartesianPoint[3], ToFScalarType focalLength, ToFScalarType interPixelDistance[2], ToFScalarType principalPoint[2], bool calculateDistance=true)
 Convenience method to convert cartesian coordinates to index based distances using arrays. More...
 
static ToFPoint3D CartesianToIndexCoordinatesWithInterpixdist (ToFPoint3D cartesianPoint, ToFScalarType focalLength, ToFPoint2D interPixelDistance, ToFPoint2D principalPoint, bool calculateDistance=true)
 Convert cartesian coordinates to index based distances. More...
 
static ToFProcessingCommon::ToFPoint3D ContinuousKinectIndexToCartesianCoordinates (mitk::Point2D continuousIndex, ToFScalarType distance, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 ContinuousKinectIndexToCartesianCoordinates This method is escpially meant for reconstructing a Kinect point with continuous index coordinates (i.e. not exactly a pixel position, but a point interpolated between two pixels). The only difference to KinectIndexToCartesianCoordinates() is that ContinuousKinectIndexToCartesianCoordinates does not cast to unsigned int for the index. More...
 
static ToFScalarType CalculateViewAngle (mitk::CameraIntrinsics::Pointer intrinsics, unsigned int dimX)
 Calculates the horizontal view angle of the camera with the given intrinsics. More...
 
static ToFProcessingCommon::ToFPoint3D KinectIndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY)
 KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud. More...
 
static ToFPoint3D KinectIndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFScalarType focalLength[2], ToFScalarType principalPoint[2])
 KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud. More...
 
static ToFPoint3D KinectIndexToCartesianCoordinates (unsigned int i, unsigned int j, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud. More...
 
static ToFPoint3D KinectIndexToCartesianCoordinates (itk::Index< 3 > index, ToFScalarType distance, ToFPoint2D focalLength, ToFPoint2D principalPoint)
 KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud. More...
 
static ToFPoint3D CartesianToKinectIndexCoordinates (ToFScalarType cartesianPointX, ToFScalarType cartesianPointY, ToFScalarType cartesianPointZ, ToFScalarType focalLengthX, ToFScalarType focalLengthY, ToFScalarType principalPointX, ToFScalarType principalPointY, bool calculateDistance=true)
 CartesianCoordinatesToKinectIndexCoordinates Transform a 3D world point back to distance image pixel coordinates. More...
 
static ToFProcessingCommon::ToFPoint3D CartesianToKinectIndexCoordinates (ToFPoint3D cartesianPoint, ToFPoint2D focalLength, ToFPoint2D principalPoint, bool calculateDistance=true)
 CartesianCoordinatesToKinectIndexCoordinates Transform a 3D world point back to distance image pixel coordinates. More...
 

Detailed Description

Helper class providing functions which are useful for multiple usage.

Currently the following methods are provided:

The coordinate conversion follows the model of a common pinhole camera where the origin of the camera coordinate system (world coordinates) is at the pinhole

PinholeCameraModel.png

The definition of the image plane and its coordinate systems (pixel and mm) is depicted in the following image

ImagePlane.png

Definition at line 42 of file mitkToFProcessingCommon.h.

Member Typedef Documentation

Definition at line 46 of file mitkToFProcessingCommon.h.

Definition at line 47 of file mitkToFProcessingCommon.h.

Definition at line 45 of file mitkToFProcessingCommon.h.

Definition at line 48 of file mitkToFProcessingCommon.h.

Definition at line 49 of file mitkToFProcessingCommon.h.

Member Function Documentation

ToFProcessingCommon::ToFScalarType mitk::ToFProcessingCommon::CalculateViewAngle ( mitk::CameraIntrinsics::Pointer  intrinsics,
unsigned int  dimX 
)
static

Calculates the horizontal view angle of the camera with the given intrinsics.

Parameters
intrinsicsintrinsic parameters of the camera
dimXdimension of the image in horizontal direction

angle = atan(principalPoint[0]/focalLength[0]) + atan((dimX-principalPoint[0]/focalLength[0]))

Definition at line 164 of file mitkToFProcessingCommon.cpp.

Referenced by QmitkToFSurfaceGenerationWidget::OnCompute3DDataCheckboxChecked().

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinates ( ToFScalarType  cartesianPointX,
ToFScalarType  cartesianPointY,
ToFScalarType  cartesianPointZ,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY,
bool  calculateDistance = true 
)
static

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointXx coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointYy coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointZz coordinate of point (of a surface or point set) to convert in 3D coordinates
focalLengthXfocal length of optical system in pixel units in x-direction (mostly obtained from camera calibration)
focalLengthYfocal length of optical system in pixel units in y-direction (mostly obtained from camera calibration)
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 96 of file mitkToFProcessingCommon.cpp.

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinates ( ToFScalarType  cartesianPoint[3],
ToFScalarType  focalLength[2],
ToFScalarType  principalPoint[2],
bool  calculateDistance = true 
)
inlinestatic

Convenience method to convert cartesian coordinates to index based distances using arrays.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 194 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinates ( ToFPoint3D  cartesianPoint,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint,
bool  calculateDistance = true 
)
inlinestatic

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 208 of file mitkToFProcessingCommon.h.

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinatesWithInterpixdist ( ToFScalarType  cartesianPointX,
ToFScalarType  cartesianPointY,
ToFScalarType  cartesianPointZ,
ToFScalarType  focalLength,
ToFScalarType  interPixelDistanceX,
ToFScalarType  interPixelDistanceY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY,
bool  calculateDistance = true 
)
static

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointXx coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointYy coordinate of point (of a surface or point set) to convert in 3D coordinates
cartesianPointZz coordinate of point (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistanceXdistance in x direction between adjacent pixels in mm
interPixelDistanceYdistance in y direction between adjacent pixels in mm
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 128 of file mitkToFProcessingCommon.cpp.

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinatesWithInterpixdist ( ToFScalarType  cartesianPoint[3],
ToFScalarType  focalLength,
ToFScalarType  interPixelDistance[2],
ToFScalarType  principalPoint[2],
bool  calculateDistance = true 
)
inlinestatic

Convenience method to convert cartesian coordinates to index based distances using arrays.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm for x and y direction
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 242 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::CartesianToIndexCoordinatesWithInterpixdist ( ToFPoint3D  cartesianPoint,
ToFScalarType  focalLength,
ToFPoint2D  interPixelDistance,
ToFPoint2D  principalPoint,
bool  calculateDistance = true 
)
inlinestatic

Convert cartesian coordinates to index based distances.

Parameters
cartesianPointpoint (of a surface or point set) to convert in 3D coordinates
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm for x and y direction
principalPointcoordinates of principal point on image plane in pixel
calculateDistanceif this flag is set, the distance value is stored in the z position of the output otherwise z=0
Returns
a ToFPoint3D. (int)ToFPoint3D[0]+0.5 and (int)ToFPoint3D[0]+0.5 will return the x and y index coordinates. ToFPoint3D[2] contains the distance value

Definition at line 258 of file mitkToFProcessingCommon.h.

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::CartesianToKinectIndexCoordinates ( ToFScalarType  cartesianPointX,
ToFScalarType  cartesianPointY,
ToFScalarType  cartesianPointZ,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY,
bool  calculateDistance = true 
)
static

CartesianCoordinatesToKinectIndexCoordinates Transform a 3D world point back to distance image pixel coordinates.

Parameters
cartesianPointXx value of the cartesian point.
cartesianPointYy value of the cartesian point.
cartesianPointZz value of the cartesian point.
focalLengthXx value of the focal length (from calibration).
focalLengthYy value of the focal length (from calibration).
principalPointXx value of the principal point (from calibration).
principalPointYy value of the principal point (from calibration).
calculateDistanceDo you want to compute also the distance of the distance image? For Kinect, this value is always the same in cartesian and index coordinates.
Returns
A ToFPoint3D containing the pixel indices (i,j) in [0] and [1] and (optionally) the distance value in 2.

Definition at line 57 of file mitkToFProcessingCommon.cpp.

static ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::CartesianToKinectIndexCoordinates ( ToFPoint3D  cartesianPoint,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint,
bool  calculateDistance = true 
)
inlinestatic

CartesianCoordinatesToKinectIndexCoordinates Transform a 3D world point back to distance image pixel coordinates.

Parameters
cartesianPointXx value of the cartesian point.
cartesianPointYy value of the cartesian point.
cartesianPointZz value of the cartesian point.
focalLengthXx value of the focal length (from calibration).
focalLengthYy value of the focal length (from calibration).
principalPointXx value of the principal point (from calibration).
principalPointYy value of the principal point (from calibration).
calculateDistanceDo you want to compute also the distance of the distance image? For Kinect, this value is always the same in cartesian and index coordinates.
Returns
A ToFPoint3D containing the pixel indices (i,j) in [0] and [1] and (optionally) the distance value in 2.

Definition at line 315 of file mitkToFProcessingCommon.h.

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::ContinuousKinectIndexToCartesianCoordinates ( mitk::Point2D  continuousIndex,
ToFScalarType  distance,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

ContinuousKinectIndexToCartesianCoordinates This method is escpially meant for reconstructing a Kinect point with continuous index coordinates (i.e. not exactly a pixel position, but a point interpolated between two pixels). The only difference to KinectIndexToCartesianCoordinates() is that ContinuousKinectIndexToCartesianCoordinates does not cast to unsigned int for the index.

Parameters
continuousIndexThe continuous coordinates (e.g. 0.5; 0.5).
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXx value of the focal length (from calibration).
focalLengthYy value of the focal length (from calibration)
principalPointXx value of the principal point (from calibration).
principalPointYy value of the principal point (from calibration).
Returns
a ToFPoint3D. The point in world coordinates (mm).

Definition at line 153 of file mitkToFProcessingCommon.cpp.

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthXfocal length of optical system in pixel units in x-direction (mostly obtained from camera calibration)
focalLengthYfocal length of optical system in pixel units in y-direction (mostly obtained from camera calibration)
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 20 of file mitkToFProcessingCommon.cpp.

Referenced by mitk::ToFDistanceImageToPointSetFilter::GenerateData(), and mitk::ToFDistanceImageToSurfaceFilter::GenerateData().

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 74 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( itk::Index< 3 >  index,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
indexindex coordinates
distancedistance value at given index in mm
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 88 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength[2],
ToFScalarType  principalPoint[2] 
)
inlinestatic

Convenience method to convert index based distances to cartesian coordinates using array as input.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in pixel units (mostly obtained from camera calibration)
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 102 of file mitkToFProcessingCommon.h.

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFScalarType  interPixelDistanceX,
ToFScalarType  interPixelDistanceY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistanceXdistance in x direction between adjacent pixels in mm
interPixelDistanceYdistance in y direction between adjacent pixels in mm
principalPointXx coordinate of principal point on image plane in pixel
principalPointYy coordinate of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 74 of file mitkToFProcessingCommon.cpp.

Referenced by mitk::ToFDistanceImageToPointSetFilter::GenerateData(), and mitk::ToFDistanceImageToSurfaceFilter::GenerateData().

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFPoint2D  interPixelDistance,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 134 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( itk::Index< 3 >  index,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFPoint2D  interPixelDistance,
ToFPoint2D  principalPoint 
)
inlinestatic

Convert index based distances to cartesian coordinates.

Parameters
indexindex coordinates
distancedistance value at given index in mm
focalLengthfocal length of optical system (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm for x and y direction
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 148 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::IndexToCartesianCoordinatesWithInterpixdist ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength,
ToFScalarType  interPixelDistance[2],
ToFScalarType  principalPoint[2] 
)
inlinestatic

Convenience method to convert index based distances to cartesian coordinates using array as input.

Parameters
iindex in x direction of image plane
jindex in y direction of image plane
distancedistance value at given index in mm
focalLengthfocal length of optical system in mm (mostly obtained from camera calibration)
interPixelDistancedistance between adjacent pixels in mm
principalPointcoordinates of principal point on image plane in pixel
Returns
cartesian coordinates for current index will be written here

Definition at line 163 of file mitkToFProcessingCommon.h.

ToFProcessingCommon::ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLengthX,
ToFScalarType  focalLengthY,
ToFScalarType  principalPointX,
ToFScalarType  principalPointY 
)
static

KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud.

Parameters
iPixel index i.
jPixel index j.
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXFocallength from calibration.
focalLengthYFocallength from calibration.
principalPointXPrincipal point from calibration.
principalPointYPrincipal point from calibration.
Returns
a ToFPoint3D. The point in world coordinates (mm).

Definition at line 45 of file mitkToFProcessingCommon.cpp.

Referenced by mitk::ToFDistanceImageToSurfaceFilter::GenerateData().

static ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFScalarType  focalLength[2],
ToFScalarType  principalPoint[2] 
)
inlinestatic

KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud.

Parameters
iPixel index i.
jPixel index j.
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXFocallength from calibration.
focalLengthYFocallength from calibration.
principalPointXPrincipal point from calibration.
principalPointYPrincipal point from calibration.
Returns
a ToFPoint3D. The point in world coordinates (mm).

Definition at line 280 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( unsigned int  i,
unsigned int  j,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud.

Parameters
iPixel index i.
jPixel index j.
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXFocallength from calibration.
focalLengthYFocallength from calibration.
principalPointXPrincipal point from calibration.
principalPointYPrincipal point from calibration.
Returns
a ToFPoint3D. The point in world coordinates (mm).

Definition at line 286 of file mitkToFProcessingCommon.h.

static ToFPoint3D mitk::ToFProcessingCommon::KinectIndexToCartesianCoordinates ( itk::Index< 3 >  index,
ToFScalarType  distance,
ToFPoint2D  focalLength,
ToFPoint2D  principalPoint 
)
inlinestatic

KinectIndexToCartesianCoordinates Convert a pixel (i,j) with value d to a 3D world point. This conversion is meant for Kinect and slightly different then ToF reconstruction. See also "Hacking the Kinect" - Jeff Kramer, Matt Parker, Daniel Herrera C., Nicolas Burrus, Florian Echtler, Chapter 7, Part 1 "Moving from Depth Map to Point Cloud.

Parameters
iPixel index i.
jPixel index j.
distanceDistance value d in mm as obtained from OpenNI.
focalLengthXFocallength from calibration.
focalLengthYFocallength from calibration.
principalPointXPrincipal point from calibration.
principalPointYPrincipal point from calibration.
Returns
a ToFPoint3D. The point in world coordinates (mm).

Definition at line 292 of file mitkToFProcessingCommon.h.


The documentation for this class was generated from the following files: