MeVisLab Scripting Reference
MLABMatrixField Class Reference

#include <mlabMatrixField.h>

Inherits MLABField.

Public Slots

Scripting access.
double value (int i, int j)
void setMatrixValue (const QVariantList &value)
void updateMatrixValue (const QVariantList &value)
void setValue (const QVariantList &value)
void updateValue (const QVariantList &value)
QVariantList matrixValue ()
SbMatrixd inventorValue () const
QVariant numPyValue () const
void setValue (const SbMatrixd &value)
void setValue (const SbMatrix &value)
Public Slots inherited from MLABField
bool isInventorField ()
bool isMLField ()
QString getType () const
QString getName () const
virtual QString stringValue ()
virtual QString persistentStringValue ()
virtual void setPersistentStringValue (const QString &value)
QString truncatedStringValue (int maxChars=80)
virtual QString stringValueForProfiling ()
virtual void touch ()
MLABFieldOwnerowner ()
MLABFieldconnectedField ()
MLABFieldinputField ()
bool isConnected ()
bool isConnectedToFieldInSameNetwork ()
int outputCount ()
MLABFieldoutputField (int index)
QList< MLABField * > outputFields ()
bool connectFrom (MLABField *field)
void disconnect ()
void disconnectOutputs ()
void disconnectAll ()
bool connectFromUndoable (MLABField *field)
virtual bool isConnectionPossible (MLABField *field)
bool isConnectionInSameNetworkPossible (MLABField *field)
bool isInSameNetwork (MLABField *field)
virtual QString toolTipInfo ()
void setPriority (int aPriority)
int priority ()
void setProxy (bool flag)
bool isProxy ()
void setComment (const QString &comment)
QString comment ()
void setTitle (const QString &title)
QString title ()
QString fullName () const
bool isHidden ()
void setHidden (bool flag)
bool isIgnored ()
void setIgnored (bool flag)
bool isFilePath ()
void setIsFilePath (bool flag)
bool isInterfaceField ()
bool isParameterField ()
bool isInput ()
bool isOutput ()
bool isInOut ()
QString infoString ()
bool isPersistent () const
bool isEditable () const
bool triggersLoading () const
void setTriggersLoading (bool flag)

Signals

void valueChanged ()

Public Member Functions

void setStringValue (const QString &value) override

Properties

QVariantList value

Detailed Description

A field containing a 4x4 matrix.

The 'value' property of this field is an array of four arrays containing four double values each.

The value can be accessed via the value property or the matrixValue() method:

val = ctx.field("somematrix").value
for i in range(0,4):
for j in range(0,4):
MLAB.log(val[i][j])
Access to all global functions and objects of MeVisLab (MLAB).
Definition mlabGlobalScriptAccess.h:82

or as a string value (as 16 doubles separated with spaces):

MLAB.log(ctx.field("somematrix").stringValue())
void log(const QString &text)
Logs the given text to the console.

The value can be set via the value property or the matrixValue() method.

Member Function Documentation

◆ inventorValue

SbMatrixd MLABMatrixField::inventorValue ( ) const
slot

Returns the value as Inventor matrix.

◆ matrixValue

QVariantList MLABMatrixField::matrixValue ( )
slot

Returns the matrix value as list of four vectors.

◆ numPyValue

QVariant MLABMatrixField::numPyValue ( ) const
slot

Returns the value as 2D NumPy array.

◆ setMatrixValue

void MLABMatrixField::setMatrixValue ( const QVariantList & value)
slot

Sets the matrix value as a list of four vectors with four components each.

References value.

Referenced by setValue(), and setValue().

◆ setStringValue()

void MLABMatrixField::setStringValue ( const QString & )
overridevirtual

Sets the value of the field as a string value.

Reimplemented from MLABField.

References value.

◆ setValue [1/3]

void MLABMatrixField::setValue ( const QVariantList & value)
inlineslot

Sets matrix value as a list of four vectors with four components each.

References setMatrixValue(), and value.

◆ setValue [2/3]

void MLABMatrixField::setValue ( const SbMatrix & value)
slot

Sets the value from an Inventor matrix.

References setMatrixValue(), and value.

◆ setValue [3/3]

void MLABMatrixField::setValue ( const SbMatrixd & value)
slot

Sets the value from an Inventor matrix.

References value.

◆ updateMatrixValue

void MLABMatrixField::updateMatrixValue ( const QVariantList & value)
slot

Sets the matrix value if different from the current value.

References value.

Referenced by updateValue().

◆ updateValue

void MLABMatrixField::updateValue ( const QVariantList & value)
inlineslot

Sets the matrix value if different from the current value.

References updateMatrixValue(), and value.

◆ value

double MLABMatrixField::value ( int i,
int j )
inlineslot

Returns the matrix cell value at index i, j.

◆ valueChanged

void MLABMatrixField::valueChanged ( )
signal

Signal that is emitted when the field's value changes.

References value.

Property Documentation

◆ value

QVariantList MLABMatrixField::value
readwrite

Value of the matrix as a list of four vectors with four doubles each.

Referenced by setMatrixValue(), setStringValue(), setValue(), setValue(), setValue(), updateMatrixValue(), updateValue(), and valueChanged().