MeVisLab Scripting Reference
MLXMarkerListWrapper Class Reference

Inherits QObject.

Public Slots

QList< MLXMarkerWrapper * > getMarkers ()
 
MLXMarkerWrappergetMarker (int position)
 
QVariant getMarkerPositions3DAsNumPyArray ()
 
QVariant getMarkerPositions6DAsNumPyArray ()
 
QVariant getMarkerVecsAsNumPyArray ()
 
QVariant getMarkerTypesAsNumPyArray ()
 
QVariant getMarkerIdsAsNumPyArray ()
 
void addMarkersFromNumPyArray (PyObject *positions, PyObject *types=nullptr, PyObject *vecs=nullptr)
 
void add (QVariantList pos, QVariantList vec, int type, int position=-1)
 
void remove (int position)
 
void clear ()
 
int getCurrentIndex ()
 
int size () const
 
QVariantMap calculatePCA () const
 

Detailed Description

A class that wraps XMarkerList objects for use in Python.

Member Function Documentation

◆ add

void MLXMarkerListWrapper::add ( QVariantList  pos,
QVariantList  vec,
int  type,
int  position = -1 
)
slot

Add new marker.

◆ addMarkersFromNumPyArray

void MLXMarkerListWrapper::addMarkersFromNumPyArray ( PyObject *  positions,
PyObject *  types = nullptr,
PyObject *  vecs = nullptr 
)
slot

Adds markers from NumPy arrays.

Positions can be a list of 3D or 6D double values. Types specifies the optional marker types as 1D integer array or as a single int value. Vecs specifies the optional direction vectors as 3D double array.

◆ calculatePCA

QVariantMap MLXMarkerListWrapper::calculatePCA ( ) const
slot

Calculates the main axes using PCA.

Returns a dictionary with the following values:

  • "center" the center of the object (aka mid point)
  • "centerOfMass" the center of mass (aka barycenter)
  • "longestAxis" the longest axis (normalized)
  • "middleAxis" the middle axis (normalized)
  • "shortestAxis" the shortest axis (normalized)
  • "longestExtent" the extent along the longest axis
  • "middleExtent" the extent along the middle axis
  • "shortestExtent" the extent along the shortest axis

◆ clear

void MLXMarkerListWrapper::clear ( )
slot

Removes all markers.

◆ getCurrentIndex

int MLXMarkerListWrapper::getCurrentIndex ( )
slot

Get current index, i.e. the index of the 'selected' marker.

◆ getMarker

MLXMarkerWrapper* MLXMarkerListWrapper::getMarker ( int  position)
slot

Get marker at position position.

◆ getMarkerIdsAsNumPyArray

QVariant MLXMarkerListWrapper::getMarkerIdsAsNumPyArray ( )
slot

Returns the id of the markers as a NumPy array of type int64.

◆ getMarkerPositions3DAsNumPyArray

QVariant MLXMarkerListWrapper::getMarkerPositions3DAsNumPyArray ( )
slot

Returns an array of 3D marker positions of type float64.

◆ getMarkerPositions6DAsNumPyArray

QVariant MLXMarkerListWrapper::getMarkerPositions6DAsNumPyArray ( )
slot

Returns an array of 6D marker positions (x,y,z,c,t,u) of type float64.

◆ getMarkers

QList<MLXMarkerWrapper*> MLXMarkerListWrapper::getMarkers ( )
slot

Get markers of the list.

◆ getMarkerTypesAsNumPyArray

QVariant MLXMarkerListWrapper::getMarkerTypesAsNumPyArray ( )
slot

Returns the type of the markers as a NumPy array of type int32.

◆ getMarkerVecsAsNumPyArray

QVariant MLXMarkerListWrapper::getMarkerVecsAsNumPyArray ( )
slot

Returns an array of marker "vec" 3D component of type float64.

◆ remove

void MLXMarkerListWrapper::remove ( int  position)
slot

Remove marker at position position.

◆ size

int MLXMarkerListWrapper::size ( ) const
inlineslot

Get size of list.