#include <vimt3d_transform_3d.h>
The transform which can be up to an affine transformation. In order of complexity the transform can be
One useful special case of Affine involves anisotropic scaling, followed by rotation, then translation.
The transform types Translation, ZoomOnly, RigidBody and Similarity have a defined order in which scaling, rotation and translation components are applied, and the components are thus separable. Other transformations (e.g. translation followed by rotation) can be obtained by composing multiple transforms. The resulting transform will in general be termed affine.
The transformation can be represented by a 4x4 matrix of homogeneous co-ordinates.
( xx xy xz xt ) ( yx yy yz yt ) ( zx zy zz zt ) ( tx ty tz tt )
Definition at line 46 of file vimt3d_transform_3d.h.
Public Types | |
| enum | Form { Identity, Translation, ZoomOnly, RigidBody, Similarity, Affine } |
| Defines form of transformation. More... | |
Public Member Functions | |
| vimt3d_transform_3d () | |
| Construct as identity transform. | |
| ~vimt3d_transform_3d () | |
| Destructor. | |
| bool | is_identity () const |
| True if identity. | |
| Form | form () const |
| Form of transformation. | |
| vnl_matrix< double > | matrix () const |
| Gets 4x4 Matrix representing transformation. | |
| void | matrix (vnl_matrix< double > &M) const |
| Gets 4x4 Matrix representing transformation. | |
| void | params (vnl_vector< double > &v) const |
| Fills v with parameters. | |
| void | set (const vnl_vector< double > &v, Form) |
| Sets transform using v. | |
| void | set_identity () |
| Sets transform to identity. | |
| void | set_translation (double t_x, double t_y, double t_z) |
| Sets the transformation to be a translation. | |
| void | set_zoom_only (double s_x, double s_y, double s_z, double t_x, double t_y, double t_z) |
| Sets the transformation to be anisotropic scaling, followed by translation. | |
| void | set_zoom_only (double s, double t_x, double t_y, double t_z) |
| Sets the transformation to be isotropic scaling, followed by translation. | |
| void | set_rigid_body (double r_x, double r_y, double r_z, double t_x, double t_y, double t_z) |
| Sets the transformation to be rotation, followed by translation. | |
| void | set_similarity (double s, double r_x, double r_y, double r_z, double t_x, double t_y, double t_z) |
| Sets the transformation to be isotropic scaling, followed by rotation, then translation. | |
| void | set_affine (double s_x, double s_y, double s_z, double r_x, double r_y, double r_z, double t_x, double t_y, double t_z) |
| Sets the transformation to be a special case of Affine: anisotropic scaling, followed by rotation, then translation. | |
| void | set_affine (const vgl_point_3d< double > &p, const vgl_vector_3d< double > &u, const vgl_vector_3d< double > &v, const vgl_vector_3d< double > &w) |
| Sets the transformation to be a special case of Affine. | |
| vgl_point_3d< double > | origin () const |
| Returns the coordinates of the origin. | |
| void | set_origin (const vgl_point_3d< double > &) |
| Modifies the transformation so that origin == p. | |
| vgl_point_3d< double > | operator() (double x, double y, double z) const |
| Applies transformation to (x,y,z). | |
| vgl_point_3d< double > | operator() (vgl_point_3d< double > p) const |
| Applies transformation to point p. | |
| vimt3d_transform_3d | inverse () const |
| Returns the inverse of the current transform. | |
| vgl_vector_3d< double > | delta (vgl_point_3d< double >, vgl_vector_3d< double > dp) const |
| Returns change in transformed point when original point moved by dp. | |
| void | print_summary (vcl_ostream &os) const |
| Print class to os. | |
| void | print_all (vcl_ostream &os) const |
| Print class to os. | |
| void | config (vcl_istream &is) |
| Set transformation from stream;. | |
| void | b_write (vsl_b_ostream &bfs) const |
| Save class to binary file stream. | |
| void | b_read (vsl_b_istream &bfs) |
| Load class from binary file stream. | |
| bool | operator== (const vimt3d_transform_3d &) const |
| True if t is the same as this. | |
Protected Member Functions | |
| void | calcInverse () const |
| void | setCheck (int n1, int n2, const char *str) const |
| void | angles (double &phi_x, double &phi_y, double &phi_z) const |
| void | setRotMat (double r_x, double r_y, double r_z) |
Protected Attributes | |
| double | xx_ |
| double | xy_ |
| double | xz_ |
| double | xt_ |
| double | yx_ |
| double | yy_ |
| double | yz_ |
| double | yt_ |
| double | zx_ |
| double | zy_ |
| double | zz_ |
| double | zt_ |
| double | tx_ |
| double | ty_ |
| double | tz_ |
| double | tt_ |
| Form | form_ |
| double | xx2_ |
| double | xy2_ |
| double | xz2_ |
| double | xt2_ |
| double | yx2_ |
| double | yy2_ |
| double | yz2_ |
| double | yt2_ |
| double | zx2_ |
| double | zy2_ |
| double | zz2_ |
| double | zt2_ |
| double | tx2_ |
| double | ty2_ |
| double | tz2_ |
| double | tt2_ |
| bool | inv_uptodate_ |
Friends | |
| vimt3d_transform_3d | operator * (const vimt3d_transform_3d &L, const vimt3d_transform_3d &R) |
| Calculates the product LR. | |
|
|
Defines form of transformation.
Definition at line 51 of file vimt3d_transform_3d.h. |
|
|
Construct as identity transform.
Definition at line 59 of file vimt3d_transform_3d.h. |
|
|
Destructor.
Definition at line 70 of file vimt3d_transform_3d.h. |
|
||||||||||||||||
|
Definition at line 47 of file vimt3d_transform_3d.cxx. |
|
|
Load class from binary file stream.
Definition at line 898 of file vimt3d_transform_3d.cxx. |
|
|
Save class to binary file stream.
Definition at line 885 of file vimt3d_transform_3d.cxx. |
|
|
Definition at line 505 of file vimt3d_transform_3d.cxx. |
|
|
Set transformation from stream;. You can specify the vector as used in the set() operation. form: rigidbody
vector: { 0.1 0.1 0.1 2 2 2 }
form: rigidbody r_x: 0.1 r_y: 0.1 r_z: 0.1 t_x: 2 t_y: 2 t_z: 2 Definition at line 791 of file vimt3d_transform_3d.cxx. |
|
||||||||||||
|
Returns change in transformed point when original point moved by dp.
Definition at line 230 of file vimt3d_transform_3d.h. |
|
|
Form of transformation.
Definition at line 76 of file vimt3d_transform_3d.h. |
|
|
Returns the inverse of the current transform.
Definition at line 481 of file vimt3d_transform_3d.cxx. |
|
|
True if identity.
Definition at line 73 of file vimt3d_transform_3d.h. |
|
|
Gets 4x4 Matrix representing transformation.
Definition at line 32 of file vimt3d_transform_3d.cxx. |
|
|
Gets 4x4 Matrix representing transformation.
Definition at line 23 of file vimt3d_transform_3d.cxx. |
|
|
Applies transformation to point p.
Definition at line 219 of file vimt3d_transform_3d.h. |
|
||||||||||||||||
|
Applies transformation to (x,y,z).
Definition at line 194 of file vimt3d_transform_3d.h. |
|
|
True if t is the same as this.
Definition at line 578 of file vimt3d_transform_3d.cxx. |
|
|
Returns the coordinates of the origin.
Definition at line 178 of file vimt3d_transform_3d.h. |
|
|
Fills v with parameters.
Definition at line 130 of file vimt3d_transform_3d.cxx. |
|
|
Print class to os. This function prints the actual parameters xx_,xy_,xz_,xt_, yx_,yy_,yz_,yt_, zx_,zy_,zz_,zt_, tx_,ty_,tz_,tt_ Definition at line 750 of file vimt3d_transform_3d.cxx. |
|
|
Print class to os. This function prints the extracted params. Definition at line 689 of file vimt3d_transform_3d.cxx. |
|
||||||||||||
|
Sets transform using v.
Definition at line 191 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||||||
|
Sets the transformation to be a special case of Affine. T(x,y,z) = p +x.u +y.v + z.w
Definition at line 441 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||||||||||||||||||||||||||
|
Sets the transformation to be a special case of Affine: anisotropic scaling, followed by rotation, then translation.
Definition at line 414 of file vimt3d_transform_3d.cxx. |
|
|
Sets transform to identity.
Definition at line 278 of file vimt3d_transform_3d.cxx. |
|
|
Modifies the transformation so that origin == p. Modifies the transformation so that operator()(vgl_point_3d<double> (0,0)) == p. The rest of the transformation is unaffected. If the transformation was previously the identity, it becomes a translation. Definition at line 265 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||||||||||||||
|
Sets the transformation to be rotation, followed by translation. The transformation is separable affine.
Definition at line 342 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||||||||||||||||||
|
Sets the transformation to be isotropic scaling, followed by rotation, then translation. The transformation is separable affine.
Definition at line 370 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||
|
Sets the transformation to be a translation.
Definition at line 293 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||||||
|
Sets the transformation to be isotropic scaling, followed by translation. The transformation is separable affine. x' = s.x + t_x, y' = s.y + t_y, z' = s.z + t_z
Definition at line 119 of file vimt3d_transform_3d.h. |
|
||||||||||||||||||||||||||||
|
Sets the transformation to be anisotropic scaling, followed by translation. The transformation is separable affine. x' = s_x.x + t_x, y' = s_y.y + t_y, z' = s_z.z + t_z
Definition at line 317 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||
|
Definition at line 180 of file vimt3d_transform_3d.cxx. |
|
||||||||||||||||
|
Definition at line 242 of file vimt3d_transform_3d.cxx. |
|
||||||||||||
|
Calculates the product LR.
Definition at line 604 of file vimt3d_transform_3d.cxx. |
|
|
Definition at line 300 of file vimt3d_transform_3d.h. |
|
|
Definition at line 305 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
|
|
Definition at line 304 of file vimt3d_transform_3d.h. |
|
|
Definition at line 299 of file vimt3d_transform_3d.h. |
1.4.4