Basic Image AlgorithmS Library  2.8.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | List of all members
BIAS::SphericalCoordinates Class Reference

Transformation between affine and spherical coordinates. More...

#include <Geometry/SphericalCoordinates.hh>

+ Collaboration diagram for BIAS::SphericalCoordinates:

Public Member Functions

const CoordinateTransform3DGetAffineBase () const
 
void GetCartesianRayFromFullPhi (const double &phi, const double &theta, HomgPoint3D &ray) const
 Calculates the Euclidean ray belonging to the passed angles in the world coordinate frame. More...
 
void GetSphericalCoordinatesFullPhi (const HomgPoint3D &point, double &rho, double &phi, double &theta) const
 Method calculates spherical coordinates, hereby phi will lie in the range (-M_PI, M_PI] while theta lies in [0, M_PI]. More...
 
void SetAffineBase (const CoordinateTransform3D &newAffineBase)
 Sets the "local" coordinate frame of the spherical coordinates. More...
 

Protected Attributes

CoordinateTransform3D affineReferenceFrame_
 Defines the reference frame (see discussion in CoordinateTransform3D). More...
 

Detailed Description

Transformation between affine and spherical coordinates.

Class is able to transform euclidean coordinates into a spherical coordinates and vice versa. Moreover a CoordinateTransform3D is applied to the passed coordinates. The CoordinateTransform3D stored internaly can be understood as the pose of the spherical frame. Meaning that passing euclidean coordinates of a point will first transform this coordinates into the local frame defined by the "pose" and then map them to spherical coordinates.

The angle references are chosen classically within the local coordinate frame defined by affineReferenceFrame_: the e_z axis is the reference for the angle Theta and the e_x axis the reference for the angle phi in the e_x and e_y plane.

Convention: In general valid angle ranges lie within (-M_PI, M_PI]

Author
bartczak 10/2007

Definition at line 55 of file SphericalCoordinates.hh.

Member Function Documentation

const CoordinateTransform3D & SphericalCoordinates::GetAffineBase ( ) const

Definition at line 40 of file SphericalCoordinates.cpp.

void SphericalCoordinates::GetCartesianRayFromFullPhi ( const double &  phi,
const double &  theta,
HomgPoint3D ray 
) const

Calculates the Euclidean ray belonging to the passed angles in the world coordinate frame.

Uses the affineReferenceFrame_ information to calculate the ray coordinates in the global frame.

Definition at line 78 of file SphericalCoordinates.cpp.

Referenced by BIAS::ProjectionParametersBase::GetSphericalViewingRange(), and BIAS::ProjectionParametersPerspective::SetIntrinsics().

void SphericalCoordinates::GetSphericalCoordinatesFullPhi ( const HomgPoint3D point,
double &  rho,
double &  phi,
double &  theta 
) const

Method calculates spherical coordinates, hereby phi will lie in the range (-M_PI, M_PI] while theta lies in [0, M_PI].

Attention
If rho drops below 1e-12 all returned values will be zero.

Definition at line 47 of file SphericalCoordinates.cpp.

References BIAS::Vector4< T >::NormL2().

Referenced by BIAS::ProjectionParametersBase::GetSphericalViewingRange().

void SphericalCoordinates::SetAffineBase ( const CoordinateTransform3D newAffineBase)

Sets the "local" coordinate frame of the spherical coordinates.

GlobalToLocal is applied when mapping to spherical coordinates. LocalToGlobal is applied when unmapping from spherical coordinates.

Definition at line 34 of file SphericalCoordinates.cpp.

Referenced by BIAS::ProjectionParametersBase::GetSphericalViewingRange(), and BIAS::ProjectionParametersPerspective::SetIntrinsics().

Member Data Documentation

CoordinateTransform3D BIAS::SphericalCoordinates::affineReferenceFrame_
protected

Defines the reference frame (see discussion in CoordinateTransform3D).

GlobalToLocal is applied when GlobalToLocal is applied when mapping to spherical coordinates. LocalToGlobal is applied when unmapping from spherical coordinates.

Definition at line 89 of file SphericalCoordinates.hh.


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