soma-io
5.0.5
|
Affine 3D transformation. More...
#include <soma-io/transformation/affinetransformation3d_base.h>
Classes | |
class | Table |
Public Member Functions | |
AffineTransformation3dBase () | |
Create an identity transformation. More... | |
AffineTransformation3dBase (const AffineTransformation3dBase &other) | |
AffineTransformation3dBase (const std::vector< float > &mat) | |
Create a AffineTransformation3d from a 4x4 matrix given as a line vector. More... | |
AffineTransformation3dBase (const carto::Object mat) | |
Create a AffineTransformation3d from a 4x4 matrix given as a line vector in an Object. More... | |
virtual | ~AffineTransformation3dBase () |
virtual AffineTransformation3dBase & | operator= (const AffineTransformation3dBase &other) |
virtual AffineTransformation3dBase & | operator= (const std::vector< float > &mat) |
virtual AffineTransformation3dBase & | operator= (const carto::Object mat) |
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 |
Test if the transformation can safely be omitted. More... | |
virtual void | setToIdentity () |
AffineTransformation3dBase | inverse () const |
bool | invertible () const CARTO_OVERRIDE |
Test if the transformation can be inverted. More... | |
std::unique_ptr< Transformation3d > | getInverse () const CARTO_OVERRIDE |
Obtain the inverse transformation. More... | |
virtual void | scale (const Point3df &sizeFrom, const Point3df &sizeTo) |
bool | isDirect () const |
true if the transformation is direct, false if it changes orientation More... | |
void | setTranslation (Point3df trans) |
std::vector< float > | toVector () const |
conversions and IO) More... | |
std::vector< float > | toColumnVector () const |
transform AffineTransformation3d to a column vector (useful for conversions to OpenGL matrices) More... | |
void | fromColumnVector (const std::vector< float > &vec) |
transform a column vector to an AffineTransformation3d (useful for conversions from OpenGL matrices) More... | |
void | fromColumnVector (const float *vec) |
transform a column vector to an AffineTransformation3d (useful for conversions from OpenGL matrices) More... | |
Table< float > & | matrix () |
const Table< float > & | matrix () const |
Public Member Functions inherited from soma::Transformation3d | |
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 |
Public Member Functions inherited from soma::Transformation | |
virtual | ~Transformation () |
Public Member Functions inherited from carto::RCObject | |
RCObject () | |
RCObject (const RCObject &) | |
RCObject & | operator= (const RCObject &) |
virtual | ~RCObject () |
Protected Member Functions | |
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 |
Protected Member Functions inherited from soma::Transformation3d | |
Transformation3d () | |
virtual Point3dd | transformPoint3dd (const Point3dd &pos) const |
virtual Point3df | transformPoint3df (const Point3df &dir) const |
virtual Point3d | transformPoint3d (const Point3d &p) const |
Protected Member Functions inherited from soma::Transformation | |
Transformation () | |
Protected Attributes | |
Table< float > | _matrix |
Additional Inherited Members | |
Public Types inherited from carto::RCObject | |
typedef int | RefCounterType |
Affine 3D transformation.
WARNING: this is the old Motion class of Aims 3.x, which has been renamed and changed in Aims 4.0. It has been partly moved to Soma-IO in soma-io/aims 4.7 since it is needed in IO systems.
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:
Definition at line 92 of file affinetransformation3d_base.h.
soma::AffineTransformation3dBase::AffineTransformation3dBase | ( | ) |
Create an identity transformation.
soma::AffineTransformation3dBase::AffineTransformation3dBase | ( | const AffineTransformation3dBase & | other | ) |
soma::AffineTransformation3dBase::AffineTransformation3dBase | ( | const std::vector< float > & | mat | ) |
Create a AffineTransformation3d from a 4x4 matrix given as a line vector.
soma::AffineTransformation3dBase::AffineTransformation3dBase | ( | const carto::Object | mat | ) |
Create a AffineTransformation3d from a 4x4 matrix given as a line vector in an Object.
|
virtual |
|
inline |
transform a column vector to an AffineTransformation3d (useful for conversions from OpenGL matrices)
Definition at line 189 of file affinetransformation3d_base.h.
void soma::AffineTransformation3dBase::fromColumnVector | ( | const float * | vec | ) |
transform a column vector to an AffineTransformation3d (useful for conversions from OpenGL matrices)
|
virtual |
Obtain the inverse transformation.
This method should only be called if invertible() returns true. Otherwise, it will throw an exception if the transformation is not actually invertible.
Reimplemented from soma::Transformation3d.
AffineTransformation3dBase soma::AffineTransformation3dBase::inverse | ( | ) | const |
|
virtual |
Test if the transformation can be inverted.
getInverse() can be called if this method returns true, in order to obtain the inverse transformation.
Reimplemented from soma::Transformation3d.
bool soma::AffineTransformation3dBase::isDirect | ( | ) | const |
true if the transformation is direct, false if it changes orientation
|
virtual |
Test if the transformation can safely be omitted.
This method returns true only if the transformation behaves exactly like an identity transformation (notably, the transform methods will always return the input coordinates unchanged).
Reimplemented from soma::Transformation.
|
inline |
Definition at line 196 of file affinetransformation3d_base.h.
References _matrix.
|
inline |
Definition at line 197 of file affinetransformation3d_base.h.
References _matrix, CARTO_OVERRIDE, transformDouble(), transformFloat(), transformNormalDouble(), transformNormalFloat(), transformNormalPoint3dd(), transformNormalPoint3df(), transformVectorDouble(), transformVectorFloat(), transformVectorPoint3dd(), and transformVectorPoint3df().
AffineTransformation3dBase& soma::AffineTransformation3dBase::operator*= | ( | const AffineTransformation3dBase & | trans | ) |
AffineTransformation3dBase soma::AffineTransformation3dBase::operator- | ( | ) | const |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
void soma::AffineTransformation3dBase::setTranslation | ( | Point3df | trans | ) |
std::vector<float> soma::AffineTransformation3dBase::toColumnVector | ( | ) | const |
transform AffineTransformation3d to a column vector (useful for conversions to OpenGL matrices)
std::vector<float> soma::AffineTransformation3dBase::toVector | ( | ) | const |
conversions and IO)
|
protectedvirtual |
Implements soma::Transformation3d.
Referenced by matrix().
|
protectedvirtual |
Reimplemented from soma::Transformation3d.
Referenced by matrix().
Definition at line 279 of file affinetransformation3d_base.h.
References transformNormalPoint3dd().
Referenced by transformNormalFloat(), transformNormalPoint3dd(), transformNormalPoint3df(), and transformUnitNormal().
Definition at line 272 of file affinetransformation3d_base.h.
References transformNormalPoint3df().
|
inline |
Definition at line 258 of file affinetransformation3d_base.h.
References transformNormalDouble().
|
inline |
Definition at line 265 of file affinetransformation3d_base.h.
References transformNormalFloat().
|
protectedvirtual |
Referenced by matrix(), and transformNormal().
|
inlineprotectedvirtual |
Definition at line 318 of file affinetransformation3d_base.h.
References transformNormal(), and transformUnitNormal().
Referenced by matrix(), transformNormal(), and transformNormalPoint3dd().
|
inlineprotectedvirtual |
Definition at line 310 of file affinetransformation3d_base.h.
References transformNormal(), and transformNormalFloat().
Referenced by matrix(), and transformNormal().
|
inlineprotectedvirtual |
Definition at line 300 of file affinetransformation3d_base.h.
References transformNormal().
Referenced by matrix(), and transformNormal().
Definition at line 347 of file affinetransformation3d_base.h.
Referenced by transformNormalFloat(), and transformUnitNormal().
Definition at line 336 of file affinetransformation3d_base.h.
References transformUnitNormal().
|
inline |
Definition at line 329 of file affinetransformation3d_base.h.
References AimsVector< T, D >::normalize(), and transformNormal().
|
inline |
Definition at line 355 of file affinetransformation3d_base.h.
References transformUnitNormal().
Definition at line 251 of file affinetransformation3d_base.h.
References transformVectorPoint3dd().
Referenced by transformVectorPoint3dd().
Definition at line 244 of file affinetransformation3d_base.h.
References transformVectorPoint3df().
|
inline |
Definition at line 230 of file affinetransformation3d_base.h.
References transformVectorDouble().
|
inline |
Definition at line 237 of file affinetransformation3d_base.h.
References transformVectorFloat().
|
protectedvirtual |
Referenced by matrix(), and transformVector().
|
protectedvirtual |
Referenced by matrix(), transformVector(), and transformVectorPoint3df().
|
inlineprotectedvirtual |
Definition at line 293 of file affinetransformation3d_base.h.
References transformVector().
Referenced by matrix(), and transformVector().
|
inlineprotectedvirtual |
Definition at line 286 of file affinetransformation3d_base.h.
References transformVectorFloat().
Referenced by matrix(), and transformVector().
|
protected |
Definition at line 214 of file affinetransformation3d_base.h.
Referenced by matrix().