Basic Image AlgorithmS Library
2.8.0
|
Transformation between affine and spherical coordinates. More...
#include <Geometry/SphericalCoordinates.hh>
Public Member Functions | |
const CoordinateTransform3D & | GetAffineBase () 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... | |
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]
Definition at line 55 of file SphericalCoordinates.hh.
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].
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().
|
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.