|
| AffineTransformation3d () |
| Create an identity transformation. More...
|
|
| AffineTransformation3d (const AffineTransformation3d &other) |
|
| AffineTransformation3d (const AffineTransformation3dBase &other) |
|
| AffineTransformation3d (const std::vector< float > &mat) |
| Create a AffineTransformation3d from a 4x4 matrix given as a line vector. More...
|
|
| AffineTransformation3d (const carto::Object mat) |
| Create a AffineTransformation3d from a 4x4 matrix given as a line vector in an Object. More...
|
|
| AffineTransformation3d (const aims::Quaternion &quat) |
|
virtual | ~AffineTransformation3d () |
|
virtual AffineTransformation3d & | operator= (const AffineTransformation3d &other) |
|
virtual AffineTransformation3d & | operator= (const std::vector< float > &mat) |
|
virtual AffineTransformation3d & | operator= (const carto::Object mat) |
|
virtual AffineTransformation3d & | operator= (const aims::Quaternion &quat) |
|
virtual bool | operator== (const AffineTransformation3d &) const |
|
virtual bool | operator!= (const AffineTransformation3d &) const |
|
AffineTransformation3d & | operator*= (const AffineTransformation3dBase &trans) |
|
virtual AffineTransformation3d | operator- () const |
|
AffineTransformation3d | inverse () const |
|
std::unique_ptr< Transformation3d > | getInverse () const CARTO_OVERRIDE |
|
aims::PythonHeader * | header () |
|
const aims::PythonHeader * | header () const |
|
void | setHeader (aims::PythonHeader *ph) |
|
Point3df | translation () |
|
Point3df | translation () const |
|
AimsData< float > | rotation () |
|
const AimsData< float > | rotation () const |
|
carto::VolumeRef< float > | affine () |
|
const carto::VolumeRef< float > | affine () const |
|
virtual void | setMatrix (const carto::VolumeRef< float > &mat) |
|
virtual void | setMatrix (const AimsData< float > &mat) |
|
virtual void | setRotationAffine (float rx, float ry, float rz, const Point3df &cg=Point3df(0.0)) |
|
| AffineTransformation3dBase () |
|
| AffineTransformation3dBase (const AffineTransformation3dBase &other) |
|
| AffineTransformation3dBase (const std::vector< float > &mat) |
|
| AffineTransformation3dBase (const carto::Object mat) |
|
virtual | ~AffineTransformation3dBase () |
|
virtual AffineTransformation3dBase & | operator= (const AffineTransformation3dBase &other) |
|
virtual bool | operator== (const AffineTransformation3dBase &) const |
|
AffineTransformation3dBase & | operator*= (const AffineTransformation3dBase &trans) |
|
AffineTransformation3dBase | operator- () const |
|
Point3dd | transformVector (const Point3dd &vec) const |
|
Point3df | transformVector (const Point3df &dir) const |
|
Point3dd | transformVector (double x, double y, double z) const |
|
Point3df | transformVector (float x, float y, float z) const |
|
Point3dd | transformNormal (const Point3dd &dir) const |
|
Point3df | transformNormal (const Point3df &dir) const |
|
Point3dd | transformNormal (double x, double y, double z) const |
|
Point3df | transformNormal (float x, float y, float z) const |
|
Point3dd | transformUnitNormal (const Point3dd &dir) const |
|
Point3df | transformUnitNormal (const Point3df &dir) const |
|
Point3dd | transformUnitNormal (double x, double y, double z) const |
|
Point3df | transformUnitNormal (float x, float y, float z) const |
|
bool | isIdentity () const CARTO_OVERRIDE |
|
virtual void | setToIdentity () |
|
AffineTransformation3dBase | inverse () const |
|
bool | invertible () const CARTO_OVERRIDE |
|
virtual void | scale (const Point3df &sizeFrom, const Point3df &sizeTo) |
|
bool | isDirect () const |
|
void | setTranslation (Point3df trans) |
|
std::vector< float > | toVector () const |
|
std::vector< float > | toColumnVector () const |
|
void | fromColumnVector (const std::vector< float > &vec) |
|
void | fromColumnVector (const float *vec) |
|
Table< float > & | matrix () |
|
const Table< float > & | matrix () const |
|
virtual | ~Transformation3d () |
|
Point3dd | transform (double x, double y, double z) const |
|
Point3dd | transform (const Point3dd &pos) const |
|
Point3df | transform (const Point3df &dir) const |
|
Point3df | transform (float x, float y, float z) const |
|
Point3d | transform (const Point3d &p) const |
|
virtual | ~Transformation () |
|
| RCObject () |
|
| RCObject (const RCObject &) |
|
RCObject & | operator= (const RCObject &) |
|
virtual | ~RCObject () |
|
|
typedef int | RefCounterType |
|
Point3dd | transformDouble (double x, double y, double z) const CARTO_OVERRIDE |
|
Point3df | transformFloat (float x, float y, float z) const CARTO_OVERRIDE |
|
virtual Point3dd | transformVectorPoint3dd (const Point3dd &vec) const |
|
virtual Point3df | transformVectorPoint3df (const Point3df &dir) const |
|
virtual Point3dd | transformVectorDouble (double x, double y, double z) const |
|
virtual Point3df | transformVectorFloat (float x, float y, float z) const |
|
virtual Point3dd | transformNormalPoint3dd (const Point3dd &dir) const |
|
virtual Point3df | transformNormalPoint3df (const Point3df &dir) const |
|
virtual Point3dd | transformNormalDouble (double x, double y, double z) const |
|
virtual Point3df | transformNormalFloat (float x, float y, float z) const |
|
| Transformation3d () |
|
virtual Point3dd | transformPoint3dd (const Point3dd &pos) const |
|
virtual Point3df | transformPoint3df (const Point3df &dir) const |
|
virtual Point3d | transformPoint3d (const Point3d &p) const |
|
| Transformation () |
|
Affine 3D transformation.
WARNING: this is the old Motion class of Aims 3.x, which has been renamed and changed in Aims 4.0. Since Aims 4.7, most of the code is in soma-io where it is used to transform voxels coordinates in IO code. This additional layer mainly adds compatibility with older code which uses AimsData for rotation() and Point3df for translation(), and the header.
A new transformation classes tree has been setup to allow non-linear transformations: see Transformation and Transformation3d. AffineTransformation3d now inherits Transformation3d.
A typedef is still provided for backward compatibility, in aims/resampling/motion.h (the former location of the Motion class) and should minimize inconvenience when compiling old code which used Motion. However a few API differences may cause compilation problems:
- forward declarations for the Motion class will not work any longer, since Motion is not a class anymore but a typedef. It is still possible to replace: by: but of course it is better to use directly the AffineTransformation3d class under its real name.
- there are several overloaded transform() methods taking double, or float numbers, or Point3df or Point3dd arguments. As there were formerly only float and Point3df arguments, ambiguities may raise from calling them with mixed double/float arguments
- the base soma::Transformation class and its typedef in aims namespace introduces a name ambiguity with anatomist anatomist::Transformation class, so it now requires to handle namespaces carefully.
Changes in AIMS 4.7
In Aims and Soma-IO 4.7, it was needed to move transformations to Soma-IO, because they are used in IO code that is moving to soma-io. To do to, we also had to move AimsVector and typedefs Point3df etc. Then several changes had to be done:
- Transformation and Transformation3d are now in the namespace soma. They are still typedef'd in aims for compatibility, but programmers should use them in soma now.
- The AffineTransformation3d has been split in two parts, soma::AffineTransformation3dBase which allready does pretty much everything, which is in soma-io and used this way there, and AffineTransformation3d which is still here in aims, and merely adds compatibility methods converting with aims types (AimsData, Volume, Quaternion).
- AffineTransformation3d::rotation does not return a reference any longer. Code using it as a reference should be modified. As the returned AimsData object is itself a reference to the transformation array, changging this is normally merely a matter of removing the "&", the object will still be usable to modify the transformation.
- AffineTransformation3d::translation does not return a reference any longer. Code using it as a reference should be modified. This modification however requires a bit more changes than for rotation() because the returned Point3df cannot be used to modity the transformation itself. Instead you can use AffineTransformation3d::setTranslation(), or AffineTransformation3dBase::matrix()(i, 3) to modify the translation in place.
- AffineTransformation3d::rotation() and AffineTransformation3d::translation are left for partial compatibility with older code, but should be considered deprecated. They are less efficient as they used to be, because the returned objects are built on-the-fly and are not the native storage for the transform anymore. Instead, AffineTransformation3dBase::matrix() should be used, it has the same functionalities and allows to address the full 4x4 matrix, with same convention as rotation(): accessors are (line, column), thus the translation is (line, 3).
- AffineTransformation3d::setTranslation() has changed behavior: it used to add the coordinates to the current translation in the matrix, which was wrong or at least unclear. It was almost never used anyway. The behavior is now what is expected: it sets the translation part of the matrix, and may be used to replace the former expressions trans.translation() = Point3df(..) which do not work any longer.
Definition at line 147 of file affinetransformation3d.h.