MeVisLab Scripting Reference
|
#include <mlCSOWrapper.h>
Inherits QObject.
Public Slots | |
MLCSOListWrapper * | getCSOList () const |
unsigned int | getId () const |
void | setId (unsigned int id) |
QString | getType () const |
void | setType (const QString &newType) |
QString | getSubType () const |
void | setSubType (const QString &newSubType) |
int | getCreatorId () const |
void | setUserData (const QString &name, const QVariant &value) |
QVariant | getUserData (const QString &name) const |
QVariant | getUserData (const QString &name, const QVariant &defaultValue) const |
QStringList | getUserDataNames () const |
void | removeUserData (const QString &name) |
QList< float > | getPathPoints () const |
QVariant | getPathPointsAsNumPyArray () const |
int | getNumPathPointLists () const |
QList< float > | getPathPointsListAt (unsigned int index) const |
int | getNumUniquePathPoints () const |
void | recomputePathPointsLinear (double pointDistanceInMM=1.0) |
void | recomputePathPointsEllipse (double pointDistanceInMM=1.0) |
void | recomputePathPointsSplineInterpolation (double pointDistanceInMM=1.0) |
void | recomputePathPointsSplineApproximation (double pointDistanceInMM=1.0) |
QList< float > | getSeedPoints () const |
QVariant | getSeedPointsAsNumPyArray () const |
QList< QVariant > | getSeedPointPositions () const |
int | getNumSeedPoints () const |
QVariantList | getSeedPointPositionAt (unsigned int index) const |
void | setSeedPointPositionAt (unsigned int index, QVariantList newPosition) |
void | setSeedPointsAndPathPoints (const MLCSOWrapper *csoWrapper, bool useUndoRedo=true) |
void | setSeedPointsAndPathPoints (const QVariantList &seedPoints, const QVariantList &pathPointLists, bool closed, bool useUndoRedo) |
void | redistributeSeedPointsEveryNthPathPoint (int everyNthPathPoint, bool notifyObservers=true) |
void | setSeedPointSelectedAt (unsigned int index) |
bool | hasSelectedSeedPoint () const |
unsigned int | getNumGroups () const |
MLCSOGroupWrapper * | getGroupAt (unsigned int index) const |
unsigned int | getGroupIdAt (unsigned int index) const |
QVariantList | getWorldBoundingBox () const |
QVariantList | getVoxelBoundingBox (const QVariantList &worldToVoxelMatrix) const |
QVariantList | getVoxelBoundingBoxSeedPoints (const QVariantList &worldToVoxelMatrix) const |
bool | getIsInPlane () const |
QVariantList | getPlaneNormal () const |
float | getLength () const |
double | getArea () const |
bool | getIsClosed () const |
bool | getIsPoint () const |
bool | getIsFinished () const |
bool | isSelfIntersecting () const |
bool | getIsPointInside (QVariantList position) const |
QVariantMap | calculatePCA () const |
double | getLargestDistance () const |
QVariantMap | getLargestDistanceWithPoints () const |
void | setShowState (bool showState) |
bool | getShowState () const |
void | setVoxelizeState (bool voxelizeState) |
bool | getVoxelizeState () const |
void | setEditableState (bool editableState) |
bool | getEditableState () const |
void | setLabel (QString label) |
QString | getLabel () const |
void | setDescription (QString desc) |
QString | getDescription () const |
void | setTimePointIndex (int index) |
int | getTimePointIndex () const |
void | setVoxelWriteMode (CSOVoxelWriteMode mode) |
CSOVoxelWriteMode | getVoxelWriteMode () const |
void | setVoxelWriteValue (float vwV) |
float | getVoxelWriteValue () const |
bool | addToGroup (int id, bool useUndoRedo=true) |
bool | removeFromGroup (int id, bool useUndoRedo=true) |
void | removeFromAllGroups () |
bool | addGroup (int id, bool useUndoRedo=true) |
bool | removeGroup (int id, bool useUndoRedo=true) |
void | removeAllGroups () |
void | moveSeedPointsAndPathPoints (float dx, float dy, float dz, int timepoint) |
void | applyTransformationMatrix (QVariantList matrix) |
void | level () |
void | levelToPlane (QVariantList normal, QVariantList planeAnchorPoint) |
void | close () |
void | setPathPointStyle (int lStyle) |
int | getPathPointStyle () const |
void | setPathPointColor (QVariantList) |
QVariantList | getPathPointColor () const |
void | setPathPointAlpha (float alpha) |
float | getPathPointAlpha () const |
void | setPathPointWidth (float width) |
float | getPathPointWidth () const |
void | setSeedPointStyle (int sStyle) |
int | getSeedPointStyle () const |
void | setSeedPointColor (QVariantList) |
QVariantList | getSeedPointColor () const |
void | setSeedPointAlpha (float alpha) |
float | getSeedPointAlpha () const |
void | setSeedPointSize (float size) |
float | getSeedPointSize () const |
Properties | |
int | numGroups |
int | numUniquePathPoints |
int | numSeedPoints |
bool | isInPlane |
float | length |
float | area |
bool | isClosed |
bool | isFinished |
bool | showState |
bool | voxelizeState |
bool | editableState |
QString | label |
QString | description |
int | timePointIndex |
CSOVoxelWriteMode | voxelWriteMode |
float | voxelWriteValue |
int | pathPointStyle |
QVariantList | pathPointColor |
float | pathPointAlpha |
float | pathPointWidth |
int | seedPointStyle |
QVariantList | seedPointColor |
float | seedPointAlpha |
float | seedPointSize |
enum | CSOVoxelWriteMode { VOXEL_WRITE_ID = ml::VOXEL_WRITE_ID , VOXEL_WRITE_CONST = ml::VOXEL_WRITE_CONST , VOXEL_WRITE_CONST_PLUS_ID = ml::VOXEL_WRITE_CONST_PLUS_ID , VOXEL_WRITE_MODULE = ml::VOXEL_WRITE_MODULE } |
MLCSOListWrapper * | csoList |
quint32 | id |
QString | type |
QString | subType |
int | creatorId |
A class that wraps CSO objects for use in Scripting.
Voxel write mode used for setVoxelWriteMode.
|
slot |
Adds this CSO to the group with the given id.
Returns false if the group id is invalid. Deprecated: use addToGroup instead!
|
slot |
Adds this CSO to the group with the given id.
Returns false if the group id is invalid.
|
slot |
Applies the given matrix to all seed- and path points.
|
slot |
Calculates the main axes using PCA.
Returns a dictionary with the following values:
|
slot |
Closes an open CSO.
Note: this method just adds a path points list between the last and the first seed point, but this path point list is not filled up with path points as the other path point lists.
|
slot |
Returns the area of this CSO (this value is only meaningful if all points lie in a plane).
|
slot |
Returns the creator ID of the CSO. This is set by the Processor or Editor which generated this CSO.
|
slot |
Returns the internal pointer to the wrapped CSOList.
|
slot |
Returns the description of this CSO.
|
slot |
Returns the 'editable' state of this CSO.
|
slot |
Returns the group at the specified index. If the index is out of bounds, NULL is returned.
|
inlineslot |
Returns the id of the group at the specified index.
|
slot |
Returns the unique ID of this CSO.
|
slot |
Returns the closed state of this contour.
|
slot |
Returns the finished status of this contour.
|
slot |
Returns the plane status (do all seed points lie in a plane?).
If the method returns 'true', the plane normal is also valid. Note that a CSO forming a straight line is not considered to be 'in plane' as it lies in an infinite number of planes.
|
slot |
Returns whether the CSO is a point.
|
slot |
Returns whether the given point is inside the CSO.
|
slot |
Returns the label of this CSO.
|
slot |
Returns the largest distance between any of the path points of the CSO.
|
slot |
Returns the largest distance between any of the path points of the CSO.
Also returns the two points that have the largest distance. The result dictionary looks like this:
|
slot |
Returns the length of this CSO (this is sum of the the euclidean distances between all successive path points).
|
slot |
Returns the number of groups this CSO is in.
|
slot |
Returns the number of path point lists.
|
slot |
Returns the number of seed points.
|
slot |
Returns the number of path points.
|
slot |
Returns the path point alpha of this CSO.
|
slot |
Returns the path point color of this CSO.
|
slot |
Returns all path points making up the CSO in world coordinates (xyz tuple).
The returned list of path points contains no duplicates; note that for a closed CSO, the first and the last position in this returned list are also not duplicates. If you want to compute the length of a closed CSO by adding the distances between all path points in this list, make sure to finally add the distance between the last and the first path points!
|
slot |
Returns the path points as numpy array. See getPathPoints() for details.
|
slot |
Returns the points of the path point list at the given index.
|
slot |
Returns the path point style of this CSO.
|
slot |
Returns the path point width of this CSO.
|
slot |
Returns the plane normal. Only valid, if isInPlane returns 'true'.
|
slot |
Returns the seed point alpha of this CSO.
|
slot |
Returns the seed point color of this CSO.
|
slot |
Returns the seed point position at the given index.
|
slot |
Returns all seed points' positions as a list of lists: ((x1,y1,z1), (x2,y2,z2), ... , (xn,yn,zn))
|
slot |
Returns all seed points' positions as a flat list: (x1,y1,z1, x2,y2,z2, ... , xn,yn,zn)
|
slot |
Returns the seed points' positions as numpy array.
|
slot |
Returns the seed point size of this CSO.
|
slot |
Returns the seed point style of this CSO.
|
slot |
Returns the 'show' status of this CSO.
|
slot |
Returns the subtype of the CSO. This is set by the Processor or Editor which generated this CSO.
|
slot |
Returns the time point index of this CSO.
|
slot |
Returns the type of the CSO. This is set by the Processor or Editor which generated this CSO.
|
slot |
Returns the user data under the given name or an invalid value if the entry does not exist.
|
slot |
Returns the user data under the given name or the given default value if the entry does not exist.
|
slot |
Returns the keys/names under which user data are stored for this CSO.
|
slot |
Returns the bounding box of this contour in voxel coordinates computed by the given (image) matrix.
|
slot |
Returns the bounding box of the seed points of this CSO in voxel coordinates computed by the given (image) matrix.
|
slot |
Returns the 'voxelize' state of this CSO.
|
slot |
Returns the voxel write mode of this CSO.
|
slot |
Returns the voxel write value of this CSO.
|
slot |
Returns the bounding box of this contour in world coordinates.
|
slot |
Returns whether the CSO has a selected seed point.
|
slot |
Returns whether the CSO is self-intersecting.
|
slot |
Levels this CSO; the best-fitting plane for all CSO points is computed and all CSO points are projected onto that plane.
The CSO is in-plane after this operation.
Note that this might slightly shift the position of the CSO. If there is a more robust way to determine the target plane, use levelToPlane(...) method instead!
|
slot |
Levels this CSO by projecting all points to the plane defined by the normal and the plane anchor point.
|
inlineslot |
Moves all seed points and all path points by the given coordinates offset.
The timepoint value is simply set to the CSO's, it is not used as an offset to the existing timepoint.
|
slot |
Interpolates all path points to fit an ellipse.
|
slot |
Interpolates all path points linearly.
|
slot |
Interpolates all path points with a spline approximation.
|
slot |
Interpolates all path points with a spline interpolation.
|
slot |
Redistributes seed points so that everyNthPathPoint, there will be a seed point.
notifyObservers | If true (the default) a "CSO finished" notification is sent after completion. |
|
slot |
Removes this CSO from all its groups.
Deprecated: use removeFromAllGroups instead!
|
slot |
Removes this CSO from all its groups.
|
slot |
Removes this CSO from the group with the given id.
Returns false if the group id is invalid.
|
slot |
Removes this CSO from the group with the given id.
Returns false if the group id is invalid. Deprecated: use removeFromGroup instead!
|
slot |
Removes a user data entry.
|
slot |
Sets the description of this CSO.
|
slot |
Sets the 'editable' state of this CSO.
|
slot |
Sets the unique ID of this CSO. Note that uniqueness is not checked.
|
slot |
Sets the label of this CSO.
|
slot |
Sets the path point alpha of this CSO.
|
slot |
Sets the path point color of this CSO.
|
slot |
Sets the path point style of this CSO.
|
slot |
Sets the path point width of this CSO.
|
slot |
Sets the seed point alpha of this CSO.
|
slot |
Sets the seed point color of this CSO.
|
slot |
Sets the seed point's position at the given index.
Note that no GEOMETRY_CHANGE events are sent when calling this method and path points are not touched. Therefore one of the recomputePathPoints* methods has to be called after changing the seed point geometry which catches up on both.
|
slot |
Sets the seed points and the path point of the given CSO.
|
slot |
Sets the given seed points and the path points.
|
slot |
Sets the seed point at the given index as selected. Does not change the CSO's selection state.
|
slot |
Sets the seed point size of this CSO.
|
slot |
Sets the seed point style of this CSO.
|
slot |
Sets the 'show' status of this CSO.
|
slot |
Sets the subtype of the CSO.
This is used to identify a Processor's preset or the Editor responsible for this kind of CSO.
|
slot |
Sets the time point index of this CSO.
|
slot |
Sets the type of the CSO.
|
slot |
Sets or adds a user data value under the given name.
|
slot |
Sets the 'voxelize' state of this CSO.
|
slot |
Sets the voxel write mode of this CSO.
|
slot |
Sets the voxel write value of this CSO.
|
read |
Returns the area of the CSO.
|
read |
Returns the id of the creator.
|
read |
Returns the CSOList.
|
readwrite |
Set or read the description.
|
readwrite |
Set or read the editable state.
|
readwrite |
Returns the id.
|
read |
Returns whether the CSO is closed.
|
read |
Returns whether the CSO is finished.
|
read |
Returns whether the CSO is planar.
|
readwrite |
Set or read the label.
|
read |
Returns the length of the CSO.
|
read |
Returns the number of groups this CSO is in.
|
read |
Returns the number of seed points.
|
read |
Returns the number of path points.
|
readwrite |
Set or read the path point alpha.
|
readwrite |
Set or read the path point color.
|
readwrite |
Set or read the path point style.
|
readwrite |
Set or read the path point width.
|
readwrite |
Set or read the seed point alpha.
|
readwrite |
Set or read the seed point color.
|
readwrite |
Set or read the seed point size.
|
readwrite |
Set or read the seed point style.
|
readwrite |
Set or read the show state.
|
readwrite |
Returns the subtype.
|
readwrite |
Set or read the time point index.
|
readwrite |
Returns the type.
|
readwrite |
Set or read the voxelize state.
|
readwrite |
Set or read the voxel write mode.
|
readwrite |
Set or read the voxel write value.