A.I.M.S


aims::AffineTransformation3d Class Reference

Affine 3D transformation. More...

#include <aims/transformation/affinetransformation3d.h>

Inheritance diagram for aims::AffineTransformation3d:
Collaboration diagram for aims::AffineTransformation3d:

Public Member Functions

 AffineTransformation3d ()
 Create an identity transformation. More...
 
 AffineTransformation3d (const AffineTransformation3d &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 AffineTransformation3doperator= (const AffineTransformation3d &other)
 
virtual AffineTransformation3doperator= (const std::vector< float > &mat)
 
virtual AffineTransformation3doperator= (const carto::Object mat)
 
virtual AffineTransformation3doperator= (const aims::Quaternion &quat)
 
virtual bool operator== (const AffineTransformation3d &)
 
AffineTransformation3doperator*= (const AffineTransformation3d &trans)
 
virtual AffineTransformation3d operator- () const
 
aims::PythonHeaderheader ()
 
const aims::PythonHeaderheader () const
 
void setHeader (aims::PythonHeader *ph)
 
Point3dftranslation ()
 
const Point3dftranslation () const
 
AimsData< float > & rotation ()
 
const AimsData< float > & rotation () const
 
virtual bool isIdentity () const
 
virtual void setToIdentity ()
 
AffineTransformation3d inverse () const
 
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)
 
virtual void setRotationAffine (float rx, float ry, float rz, const Point3df &cg=Point3df(0.0))
 
std::vector< float > toVector () const
 transform AffineTransformation3d to a vector (useful for conversions and IO) More...
 
- Public Member Functions inherited from aims::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
 
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
 
- Public Member Functions inherited from aims::Transformation
virtual ~Transformation ()
 

Static Public Member Functions

static AimsData< float > rotationaroundx (float rx)
 
static AimsData< float > rotationaroundy (float ry)
 
static AimsData< float > rotationaroundz (float rz)
 

Protected Member Functions

virtual Point3dd transformDouble (double x, double y, double z) const
 
virtual Point3df transformFloat (float x, float y, float z) const
 
virtual Point3dd transformVectorDouble (double x, double y, double z) const
 
virtual Point3df transformVectorFloat (float x, float y, float z) const
 
- Protected Member Functions inherited from aims::Transformation3d
 Transformation3d ()
 
virtual Point3dd transformPoint3dd (const Point3dd &pos) const
 
virtual Point3df transformPoint3df (const Point3df &dir) const
 
virtual Point3d transformPoint3d (const Point3d &p) const
 
virtual Point3dd transformVectorPoint3dd (const Point3dd &vec) const
 
virtual Point3df transformVectorPoint3df (const Point3df &dir) 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 aims::Transformation
 Transformation ()
 

Protected Attributes

Point3df _translation
 
AimsData< float > _rotation
 
aims::PythonHeader_header
 

Detailed Description

Affine 3D transformation.

WARNING: this is the old Motion class of Aims 3.x, which has been renamed and changed in Aims 4.0.

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 declatations 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:
    class Motion;
    by:
    namespace aims { class AffineTransformation3d; }
    but of course it is better to use directly the AffineTransformation3d class under its real name.
  • the Motion::transform_normal() method is now transformUnitNormal()
  • there are now 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 aims::Transformation class introduces a name ambiguity with anatomist anatomist::Transformation class, so it now requires to handle namespaces carefully.
  • the Motion DataTypeCode has also changed to AffineTransformation3d.

Definition at line 105 of file affinetransformation3d.h.

Constructor & Destructor Documentation

aims::AffineTransformation3d::AffineTransformation3d ( )

Create an identity transformation.

aims::AffineTransformation3d::AffineTransformation3d ( const AffineTransformation3d other)
aims::AffineTransformation3d::AffineTransformation3d ( const std::vector< float > &  mat)

Create a AffineTransformation3d from a 4x4 matrix given as a line vector.

aims::AffineTransformation3d::AffineTransformation3d ( const carto::Object  mat)

Create a AffineTransformation3d from a 4x4 matrix given as a line vector in an Object.

aims::AffineTransformation3d::AffineTransformation3d ( const aims::Quaternion quat)
virtual aims::AffineTransformation3d::~AffineTransformation3d ( )
virtual

Member Function Documentation

aims::PythonHeader* aims::AffineTransformation3d::header ( )
inline

Definition at line 129 of file affinetransformation3d.h.

References _header.

const aims::PythonHeader* aims::AffineTransformation3d::header ( ) const
inline

Definition at line 130 of file affinetransformation3d.h.

References _header.

AffineTransformation3d aims::AffineTransformation3d::inverse ( ) const
bool aims::AffineTransformation3d::isDirect ( ) const

true if the transformation is direct, false if it changes orientation

Referenced by aims::SurfaceManip::meshTransform().

virtual bool aims::AffineTransformation3d::isIdentity ( ) const
virtual

Reimplemented from aims::Transformation.

AffineTransformation3d& aims::AffineTransformation3d::operator*= ( const AffineTransformation3d trans)
virtual AffineTransformation3d aims::AffineTransformation3d::operator- ( ) const
virtual
virtual AffineTransformation3d& aims::AffineTransformation3d::operator= ( const AffineTransformation3d other)
virtual
virtual AffineTransformation3d& aims::AffineTransformation3d::operator= ( const std::vector< float > &  mat)
virtual
virtual AffineTransformation3d& aims::AffineTransformation3d::operator= ( const carto::Object  mat)
virtual
virtual AffineTransformation3d& aims::AffineTransformation3d::operator= ( const aims::Quaternion quat)
virtual
virtual bool aims::AffineTransformation3d::operator== ( const AffineTransformation3d )
virtual
AimsData<float>& aims::AffineTransformation3d::rotation ( )
inline

Definition at line 136 of file affinetransformation3d.h.

References _rotation.

Referenced by aims::SpmReader< T >::read(), and aims::SpmWriter< T >::write().

const AimsData<float>& aims::AffineTransformation3d::rotation ( ) const
inline

Definition at line 137 of file affinetransformation3d.h.

References _rotation.

static AimsData<float> aims::AffineTransformation3d::rotationaroundx ( float  rx)
static
static AimsData<float> aims::AffineTransformation3d::rotationaroundy ( float  ry)
static
static AimsData<float> aims::AffineTransformation3d::rotationaroundz ( float  rz)
static
virtual void aims::AffineTransformation3d::scale ( const Point3df sizeFrom,
const Point3df sizeTo 
)
virtual
void aims::AffineTransformation3d::setHeader ( aims::PythonHeader ph)
virtual void aims::AffineTransformation3d::setRotationAffine ( float  rx,
float  ry,
float  rz,
const Point3df cg = Point3df(0.0) 
)
virtual
virtual void aims::AffineTransformation3d::setToIdentity ( )
virtual

Reimplemented from aims::Transformation.

Reimplemented in aims::DecomposedAffineTransformation3d.

void aims::AffineTransformation3d::setTranslation ( Point3df  trans)
std::vector<float> aims::AffineTransformation3d::toVector ( ) const

transform AffineTransformation3d to a vector (useful for conversions and IO)

virtual Point3dd aims::AffineTransformation3d::transformDouble ( double  x,
double  y,
double  z 
) const
protectedvirtual
virtual Point3df aims::AffineTransformation3d::transformFloat ( float  x,
float  y,
float  z 
) const
protectedvirtual

Reimplemented from aims::Transformation3d.

virtual Point3dd aims::AffineTransformation3d::transformVectorDouble ( double  x,
double  y,
double  z 
) const
protectedvirtual

Reimplemented from aims::Transformation3d.

virtual Point3df aims::AffineTransformation3d::transformVectorFloat ( float  x,
float  y,
float  z 
) const
protectedvirtual

Reimplemented from aims::Transformation3d.

Point3df& aims::AffineTransformation3d::translation ( )
inline
const Point3df& aims::AffineTransformation3d::translation ( ) const
inline

Definition at line 134 of file affinetransformation3d.h.

References _translation.

Member Data Documentation

aims::PythonHeader* aims::AffineTransformation3d::_header
protected

Definition at line 173 of file affinetransformation3d.h.

Referenced by header().

AimsData<float> aims::AffineTransformation3d::_rotation
protected

Definition at line 172 of file affinetransformation3d.h.

Referenced by rotation().

Point3df aims::AffineTransformation3d::_translation
protected

Definition at line 170 of file affinetransformation3d.h.

Referenced by translation().


The documentation for this class was generated from the following file: