MeVisLab Scripting Reference
MLAbstractTransformationWrapper Class Reference

Inherits MLRefCountedBaseWrapper.

Public Slots

Access methods


bool isAffineTransformation () const
 
QVariant getAffineTransformation () const
 
QVariant transformPoint (const QVariant &point3D) const
 
bool hasInverse () const
 
MLAbstractTransformationWrappergetInverse () const
 

Detailed Description

This class wraps the class ml::AbstractTransformation.

This abstract class maps 3D points from one coordinate system to another.

This is just an abstract interface. You can create instances of this class from scripting by calling

MLAB.createMLBaseObject("IdentityTransformation")
Access to all global functions and objects of MLAB.
Definition: mlabGlobalScriptAccess.h:81
QObject * createMLBaseObject(const QString &baseClassName, const QVariantList &arguments=QVariantList())
Creates a new reference-counted ml::Base object, conveniently wrapped for scripting; which arguments ...

to create special identity transformation or

MLAB.createMLBaseObject("AffineTransformation", [matrix])

to create an affine transformation. matrix must be a 4x4 matrix (i.e. a list of four lists of four numbers each).

Member Function Documentation

◆ getAffineTransformation

QVariant MLAbstractTransformationWrapper::getAffineTransformation ( ) const
slot

Returns the 4x4 matrix that represents this transformation.

◆ getInverse

MLAbstractTransformationWrapper* MLAbstractTransformationWrapper::getInverse ( ) const
slot

Returns a back-transformation if it exists, None otherwise.

◆ hasInverse

bool MLAbstractTransformationWrapper::hasInverse ( ) const
slot

Returns whether there exists a back-transformation.

Note that it may be equally expensive to just ask for back-transformation itself, depending on the implementation.

◆ isAffineTransformation

bool MLAbstractTransformationWrapper::isAffineTransformation ( ) const
slot

Returns whether the transformation can be represented by a 4x4 matrix.

◆ transformPoint

QVariant MLAbstractTransformationWrapper::transformPoint ( const QVariant &  point3D) const
slot

Maps a 3D point into the target coordinate system.

This routine expects a list of 3 numbers as argument.