MeVisLab Scripting Reference
|
#include <mlGraphWrapper.h>
Inherits QObject.
Public Slots | |
size_t | numNodes () |
size_t | numEdges () |
size_t | numRoots () |
MLVesselNodeWrapper * | getIdNode (qint64 id) |
MLVesselEdgeWrapper * | getIdEdge (qint64 id) |
MLVesselNodeWrapper * | getNode (QVariantList pos) |
MLVesselEdgeWrapper * | getEdge (QVariantList pos) |
QVariantList | getEdges () |
QVariantList | getNodes () |
QVariantList | getRoots () |
void | addGraph (MLGraphWrapper *graph) |
MLVesselNodeWrapper * | createNode (QList< double > pos, qint64 useId=-1) |
MLVesselEdgeWrapper * | createEdge (qint64 predNodeId, qint64 succNodeId, qint64 useId=-1, bool createSkeletons=true) |
void | removeEdge (qint64 edgeId) |
MLVesselEdgeWrapper * | splitEdge (qint64 edgeId, size_t skeletonIndex) |
void | resampleEdges (double resolution) |
void | insertRoot (MLVesselNodeWrapper *node) |
void | removeRoot (MLVesselNodeWrapper *node) |
void | smooth (int numSmoothingPasses, double smoothingFactor) |
void | directGraph (double floodThreshold=0.0) |
void | stripCycles () |
void | removeValency2Nodes () |
void | transform (QVariantList matrix4) |
QVariantList | shortestPath (MLVesselNodeWrapper *startNode, MLVesselNodeWrapper *endNode) |
QVariantList | shortestPath (QVariantList fromPos, QVariantList toPos) |
QVariant | getImageExtent () |
QVariant | getVoxelToWorldMatrix () |
void | setImageExtent (QVariantList extent) |
void | setVoxelSize (QVariantList size) |
void | setVoxelToWorldMatrix (QVariantList matrix4) |
void | clampToImage () |
bool | getUseBinaryPersistence () |
void | useBinaryPersistence (bool use) |
QByteArray | toBinaryData () const |
void | fromBinaryData (const QByteArray &data) |
Properties | |
QVariantList | edges |
QVariantList | nodes |
QVariantList | roots |
A class that wraps Graph objects for use in Scripting.
|
slot |
Add an entire graph to the current graph.
|
slot |
Clamp graph to image boundary as specified by image extent and voxel-to-world matrix.
|
slot |
Create a VesselEdge with unique id, add it to the Nodes identified by the respective IDs and return a pointer to it.
By default line skeletons will be created on the edge. Can be deactivated by setting createSkeletons to false.
|
slot |
Create a VesselNode with unique id, add it to the Graph and return a pointer to it.
|
slot |
Directs the graph from root to leaves anew.
This is done following the weights of the edges downwards.
|
slot |
Reconstructs the graph using the binary data.
|
slot |
Get the edge with minimal distance to pos
. Uses method distance() of edge classes.
|
slot |
Get all the edges of the graph as MLVesselEdgeWrapper.
|
slot |
Get an edge by id.
|
slot |
Get a node by id.
|
slot |
Image extent of the image the graph is compiled from.
|
slot |
Get the node with minimal distance to pos
. Uses method distance() of node classes.
|
slot |
Get all the nodes of the graph as MLVesselNodeWrapper.
|
slot |
Get all the root nodes of the graph as MLVesselNodeWrapper.
|
inlineslot |
Returns whether the graph uses binary persistence.
|
slot |
Voxel-to-world matrix (4x4) of the image the graph is compiled from.
|
slot |
Insert a node to the list of root nodes.
|
inlineslot |
Get the number of nodes.
|
inlineslot |
Get the number of edges.
|
inlineslot |
Get the number of root nodes.
|
slot |
Remove an edge with the given edgeId
from the graph.
|
slot |
Remove a root from the graph.
|
slot |
Removes all nodes which are connected to exactly two different edges by mergine those two edges.
If necessary, edges will be flipped before the node is removed.
|
slot |
Create skeletons with a given resolution for all edges.
|
slot |
Set new image extent.
|
slot |
Set new voxel size.
|
slot |
Set new voxel-to-world matrix (4x4).
|
slot |
Finds the shortest path in graph between startNode and endNode; since the graph is internally handled as undirected graph, the order of start and end node has no influence.
|
slot |
Same as above, but with nodes that are nearest to the given positions.
|
slot |
Smooth the graph.
|
slot |
Splits edge with id edgeID
at skeleton index skeletonIndex
and returns the ID of the additionally created edge.
If the edge could not be split (e.g. edgeID not found, no vessel edge or not enough skeletons), -1 is returned.
|
slot |
Strip cyclic edges from the graph First the graph is directed.
Than, all cyclic edges are removed to build a graph without cycles.
|
slot |
Returns string containing binary representation of all data necessary to reconstruct the graph.
|
slot |
Transform node and edge positions by the given 4x4 matrix.
|
inlineslot |
Sets whether the graph should use binary persistence.
|
read |
Get all the edges of the graph as MLVesselEdgeWrapper (read-only).
|
read |
Get all the nodes of the graph as MLVesselNodeWrapper (read-only).
|
read |
Get all the root nodes of the graph as MLVesselNodeWrapper (read-only).