MeVisLab Scripting Reference
MLXMarkerListWrapper Class Reference

#include <mlXMarkerListWrapper.h>

Inherits QObject.

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

Adds a 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 integer 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

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

◆ getMarker

MLXMarkerWrapper * MLXMarkerListWrapper::getMarker ( int  position)
slot

Returns the marker at the 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

Returns the 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

Removes a marker at position position.

◆ size

int MLXMarkerListWrapper::size ( ) const
inlineslot

Returns the size of the list.