![]() |
anatomist
5.1.2
3D neuroimaging data viewer
|
Transformation between two referentials. More...
#include <anatomist/reference/Transformation.h>
Public Member Functions | |
Transformation (Referential *, Referential *, bool regist=false, bool generated=false) | |
Transformation (Referential *, Referential *, const Transformation &trans) | |
Transformation () | |
virtual | ~Transformation () |
Unregister from the TransformSet and other objects. More... | |
Transformation & | operator= (const Transformation &trans) |
Operator = doesn't copy source / dest references. More... | |
Transformation & | operator*= (const Transformation &trans) |
Transformation | operator- () const |
Motion & | motion () |
const Motion & | motion () const |
void | setRotation (float **r) |
void | setTranslation (float *t) |
void | setMatrix (float **m) |
4x4 matrix More... | |
void | setMatrixT (float m[4][3]) |
4x3 matrix in Vip/Aims file form (1st line:translation) More... | |
void | SetRotation (int, int, float) |
Set the rotation. More... | |
void | SetTranslation (int, float) |
Set the translation. More... | |
float | Rotation (int, int) |
Get the rotation. More... | |
aims::Quaternion | quaternion () const |
void | setQuaternion (const aims::Quaternion &q) |
float | Translation (int) |
Get the translation. More... | |
Point3df | translation () const |
Referential * | source () const |
Referential * | destination () const |
void | invert () |
Inverts the transformation matrix. More... | |
void | invertReferentials () |
Inverts source and destination referentials. More... | |
bool | isDirect () const |
true if the transformation is direct, false if it changes orientation More... | |
Point3df | transform (const Point3df &pos) const |
Transforms a point. More... | |
void | transformBoundingBox (const Point3df &pmin1, const Point3df &pmax1, Point3df &pmin2, Point3df &pmax2) |
void | registerTrans () |
Registers the transformation to the TransformSet. More... | |
void | unregisterTrans () |
bool | isGenerated () const |
void | setGenerated (bool x) |
void | addMotionToHistory (const Motion &) |
Adds a new motion to motion history. More... | |
void | undo () |
Undoes last motion. More... | |
void | redo () |
Redoes last motion. More... | |
std::size_t | motionHistorySize () const |
Returns the motion history size. More... | |
int | motionHistoryIndex () const |
Returns the current motion history index. More... | |
void | notifyChange () |
Static Public Member Functions | |
static Point3df | transform (const Point3df &pos, const Transformation *tra, const Point3df &voxSizeOrg, const Point3df &voxSizeDst) |
Static transform function: with transformation, org and dest geometries. More... | |
static Point3df | transform (const Point3df &pos, const Referential *orgRef, const Referential *dstRef, const Point3df &voxSizeOrg, const Point3df &voxSizeDst) |
slower than above: must find the transformation (not inline) More... | |
static Point3df | transform (const Point3df &pos, const Point3df &voxSizeOrg, const Point3df &voxSizeDst) |
no transformation, only geometries More... | |
static Point3df | transform (const Point3df &pos, const Transformation *tra, const Point3df &voxSizeDst) |
transformation, dest geometry but no org geometry More... | |
static Point3df | transform (const Point3df &pos, const Point3df &voxSizeOrg, const Transformation *tra) |
transformation, org geometry but no dest geometry More... | |
static Point3df | transform (const Point3df &pos, const Point3df &voxSizeOrg) |
no transformation, no dest geometry but org geometry More... | |
static Point3df | transformDG (const Point3df &pos, const Point3df &voxSizeDst) |
no transformation, no org geometry but dest geometry. More... | |
Protected Attributes | |
Motion | _motion |
Referential * | _source |
Referential * | _dest |
bool | _generated |
std::vector< Motion > | _motionHistory |
int | _motionHistoryIndex |
Transformation between two referentials.
Actually linear transformations up to now, but could be extended. All transformations are registered and stored into the TransformSet singleton object
Definition at line 61 of file Transformation.h.
anatomist::Transformation::Transformation | ( | Referential * | , |
Referential * | , | ||
bool | regist = false , |
||
bool | generated = false |
||
) |
anatomist::Transformation::Transformation | ( | Referential * | , |
Referential * | , | ||
const Transformation & | trans | ||
) |
anatomist::Transformation::Transformation | ( | ) |
|
virtual |
Unregister from the TransformSet and other objects.
void anatomist::Transformation::addMotionToHistory | ( | const Motion & | ) |
Adds a new motion to motion history.
|
inline |
Definition at line 98 of file Transformation.h.
References _dest.
void anatomist::Transformation::invert | ( | ) |
Inverts the transformation matrix.
void anatomist::Transformation::invertReferentials | ( | ) |
Inverts source and destination referentials.
bool anatomist::Transformation::isDirect | ( | ) | const |
true if the transformation is direct, false if it changes orientation
|
inline |
Definition at line 116 of file Transformation.h.
References _generated.
|
inline |
Definition at line 77 of file Transformation.h.
References _motion.
|
inline |
Definition at line 78 of file Transformation.h.
References _motion.
|
inline |
Returns the current motion history index.
Definition at line 131 of file Transformation.h.
References _motionHistoryIndex.
|
inline |
Returns the motion history size.
Definition at line 126 of file Transformation.h.
References _motionHistory.
void anatomist::Transformation::notifyChange | ( | ) |
Transformation& anatomist::Transformation::operator*= | ( | const Transformation & | trans | ) |
Transformation anatomist::Transformation::operator- | ( | ) | const |
Transformation& anatomist::Transformation::operator= | ( | const Transformation & | trans | ) |
Operator = doesn't copy source / dest references.
aims::Quaternion anatomist::Transformation::quaternion | ( | ) | const |
void anatomist::Transformation::redo | ( | ) |
Redoes last motion.
void anatomist::Transformation::registerTrans | ( | ) |
Registers the transformation to the TransformSet.
float anatomist::Transformation::Rotation | ( | int | , |
int | |||
) |
Get the rotation.
|
inline |
Definition at line 117 of file Transformation.h.
References _generated.
void anatomist::Transformation::setMatrix | ( | float ** | m | ) |
4x4 matrix
void anatomist::Transformation::setMatrixT | ( | float | m[4][3] | ) |
4x3 matrix in Vip/Aims file form (1st line:translation)
void anatomist::Transformation::setQuaternion | ( | const aims::Quaternion & | q | ) |
void anatomist::Transformation::setRotation | ( | float ** | r | ) |
void anatomist::Transformation::SetRotation | ( | int | , |
int | , | ||
float | |||
) |
Set the rotation.
void anatomist::Transformation::setTranslation | ( | float * | t | ) |
void anatomist::Transformation::SetTranslation | ( | int | , |
float | |||
) |
Set the translation.
|
inline |
Definition at line 97 of file Transformation.h.
References _source.
Transforms a point.
Referenced by transform().
|
inlinestatic |
no transformation, no dest geometry but org geometry
Definition at line 228 of file Transformation.h.
|
inlinestatic |
no transformation, only geometries
Definition at line 197 of file Transformation.h.
|
inlinestatic |
transformation, org geometry but no dest geometry
Definition at line 208 of file Transformation.h.
References transform().
|
static |
slower than above: must find the transformation (not inline)
|
inlinestatic |
transformation, dest geometry but no org geometry
Definition at line 218 of file Transformation.h.
References transform().
|
inlinestatic |
Static transform function: with transformation, org and dest geometries.
These functions are designed to help various situations of transformations and geometry changes. They are as fast as possible (inline, direct, with the fewest required data copying and temporary variables)
Definition at line 184 of file Transformation.h.
References transform().
void anatomist::Transformation::transformBoundingBox | ( | const Point3df & | pmin1, |
const Point3df & | pmax1, | ||
Point3df & | pmin2, | ||
Point3df & | pmax2 | ||
) |
|
inlinestatic |
no transformation, no org geometry but dest geometry.
The function name changes here to differ from the one above
Definition at line 237 of file Transformation.h.
|
inline |
Definition at line 245 of file Transformation.h.
References _motion, and aims::AffineTransformation3d::translation().
float anatomist::Transformation::Translation | ( | int | ) |
Get the translation.
void anatomist::Transformation::undo | ( | ) |
Undoes last motion.
void anatomist::Transformation::unregisterTrans | ( | ) |
|
protected |
Definition at line 173 of file Transformation.h.
Referenced by destination().
|
protected |
Definition at line 174 of file Transformation.h.
Referenced by isGenerated(), and setGenerated().
|
protected |
Definition at line 171 of file Transformation.h.
Referenced by motion(), and translation().
|
protected |
Definition at line 175 of file Transformation.h.
Referenced by motionHistorySize().
|
protected |
Definition at line 176 of file Transformation.h.
Referenced by motionHistoryIndex().
|
protected |
Definition at line 172 of file Transformation.h.
Referenced by source().