Isis 3.0 Object Programmers' Reference |
Home |
#include <Affine.h>
Collaboration diagram for Isis::Affine:
An affine transform in two-dimensional space is defined as
This routine allows the programmer to define three or more mappings from (x,y) to (x',y') and will solve for A,B,C,D,E,F.
If the above coefficients can be computed then the inverse of the affine transform exists and will be computed such that
Alternatively (or in combination), translations and rotations can be applied to create a transform.
For internal use only.
Definition at line 73 of file Affine.h.
Public Member Functions | |
Affine () | |
Constructs an Affine transform. | |
~Affine () | |
Destroys the Affine object. | |
void | Solve (const double x[], const double y[], const double xp[], const double yp[], int n) |
Given a set of coordinate pairs (n >= 3), compute the affine transform that best fits the points. | |
void | Identity () |
Set the forward and inverse affine transform to the identity. | |
void | Translate (double tx, double ty) |
Apply a translation to the current affine transform. | |
void | Rotate (double rot) |
Apply a translation to the current affine transform. | |
void | Scale (double scaleFactor) |
Apply a scale to the current affine transform. | |
void | Compute (double x, double y) |
Compute (xp,yp) given (x,y). | |
double | xp () const |
Returns the computed x'. | |
double | yp () const |
Returns the computed y'. | |
void | ComputeInverse (double xp, double yp) |
Compute (x,y) given (xp,yp). | |
double | x () const |
Returns the computed x. | |
double | y () const |
Returns the computed y. | |
std::vector< double > | Coefficients (int var) |
Return the affine coeffients for the entered variable (1 or 2). | |
std::vector< double > | InverseCoefficients (int var) |
Return the inverse affine coeffients for the entered variable (1 or 2). | |
Private Attributes | |
TNT::Array2D< double > | p_matrix |
Affine forward matrix. | |
TNT::Array2D< double > | p_invmat |
Affine inverse matrix. | |
double | p_x |
x value of the (x,y) coordinate | |
double | p_y |
y value of the (x,y) coordinate | |
double | p_xp |
x' value of the (x',y') coordinate | |
double | p_yp |
y' value of the (x',y') coordinate |
|
Constructs an Affine transform. The default transform is the identity. Definition at line 41 of file Affine.cpp. References Identity(). |
|
Destroys the Affine object.
Definition at line 46 of file Affine.cpp. |
|
Return the affine coeffients for the entered variable (1 or 2). The coefficients are returned in a 3-dimensional vector
Definition at line 254 of file Affine.cpp. References p_matrix. Referenced by Isis::Lo::LoCameraFiducialMap::CreateTrans(). |
|
Compute (xp,yp) given (x,y). Use the methods xp() and yp() to obtain the results.
Definition at line 227 of file Affine.cpp. References p_matrix, p_x, p_xp, p_y, and p_yp. Referenced by Isis::Chip::SetChipPosition(). |
|
Compute (x,y) given (xp,yp). Use the methods x() and y() to obtain the results.
Definition at line 241 of file Affine.cpp. References p_invmat, p_x, p_xp, p_y, and p_yp. Referenced by Isis::Chip::SetCubePosition(). |
|
Set the forward and inverse affine transform to the identity. That is, xp = x and yp = y for all (x,y). Definition at line 52 of file Affine.cpp. Referenced by Affine(), Isis::Chip::Load(), and Isis::Chip::TackCube(). |
|
Return the inverse affine coeffients for the entered variable (1 or 2). The coefficients are returned in a 3-dimensional vector
Definition at line 269 of file Affine.cpp. References p_invmat. |
|
Apply a translation to the current affine transform.
Definition at line 174 of file Affine.cpp. Referenced by Isis::Chip::Load(). |
|
Apply a scale to the current affine transform.
Definition at line 203 of file Affine.cpp. Referenced by Isis::Chip::Load(). |
|
Given a set of coordinate pairs (n >= 3), compute the affine transform that best fits the points. If given exactly three coordinates that are not colinear, the fit will be guarenteed to be exact through the points.
Definition at line 79 of file Affine.cpp. References Isis::LeastSquares::AddKnown(). Referenced by Isis::Lo::LoCameraFiducialMap::CreateTrans(). |
|
Apply a translation to the current affine transform.
Definition at line 152 of file Affine.cpp. Referenced by Isis::Chip::Load(), and Isis::Chip::TackCube(). |
|
Returns the computed x.
Definition at line 95 of file Affine.h. References p_x. Referenced by Isis::Chip::SetCubePosition(). |
|
Returns the computed x'.
Definition at line 87 of file Affine.h. References p_xp. Referenced by Isis::Chip::SetChipPosition(). |
|
Returns the computed y.
Definition at line 98 of file Affine.h. References p_y. Referenced by Isis::Chip::SetCubePosition(). |
|
Returns the computed y'.
Definition at line 90 of file Affine.h. References p_yp. Referenced by Isis::Chip::SetChipPosition(). |
|
Affine inverse matrix.
Definition at line 105 of file Affine.h. Referenced by ComputeInverse(), and InverseCoefficients(). |
|
Affine forward matrix.
Definition at line 104 of file Affine.h. Referenced by Coefficients(), and Compute(). |
|
x value of the (x,y) coordinate
Definition at line 107 of file Affine.h. Referenced by Compute(), ComputeInverse(), and x(). |
|
x' value of the (x',y') coordinate
Definition at line 109 of file Affine.h. Referenced by Compute(), ComputeInverse(), and xp(). |
|
y value of the (x,y) coordinate
Definition at line 108 of file Affine.h. Referenced by Compute(), ComputeInverse(), and y(). |
|
y' value of the (x',y') coordinate
Definition at line 110 of file Affine.h. Referenced by Compute(), ComputeInverse(), and yp(). |