Purpose

The module GraphManager holds a Graph object and enables undo/redo operations of Graph editing.

It also allows for directing the Graph and for splitting the Graph on base of a given Flooding Value.

Windows

Default Panel

../../../Projects/MLGraphEditing/Modules/mhelp/Images/Screenshots/GraphManager._default.png

Input Fields

inGraph

name: inGraph, type: Graph(MLBase)

Input Graph object.

For accessing this object via scripting see the Scripting Reference: MLGraphWrapper.

inUndoContext

name: inUndoContext, type: UndoContext(MLBase)

Input undo/redo context (UndoManager).

For accessing this object via scripting see the Scripting Reference: MLUndoContextWrapper.

Output Fields

outGraph

name: outGraph, type: Graph(MLBase)

Output Graph for visualization or direct manipulation (no undo/redo here).

For accessing this object via scripting see the Scripting Reference: MLGraphWrapper.

outGraphEditing

name: outGraphEditing, type: GraphEditing(MLBase)

Attach a Graph editing module so that their operations can be undone/redone.

Parameter Fields

Field Index

Clear: Trigger
Copy And Direct Input Graph: Trigger
Copy Input Graph: Trigger
Create Undo Step: Trigger
Flooding Value: Float
Restore State: Trigger
Store State: Trigger

Visible Fields

Copy Input Graph

name: copyInputGraph, type: Trigger

If pressed, the input Graph is copied internally as it is.

Copy And Direct Input Graph

name: copyAndDirectInputGraph, type: Trigger

If pressed, the input Graph is copied internally, and is being split based on the given Flooding Value. New root nodes are determined, and the graph is being directed based on these roots, so that the graph consists of trees with cyclic edges being marked as such.

Graph objects (loaded or generated by DtfSkeletonization) are sometimes not directed properly.

Clear

name: clear, type: Trigger

If pressed, the internal copy of the input Graph is cleared.

Flooding Value

name: floodingValue, type: Float, default: 0, minimum: 0, maximum: 1

Sets a value in [0..1] for splitting a Graph. A value of 0 will not split the Graph, a value of 1 will split the Graph on as many ‘weak’ links as possible.

Changing the value triggers splitting and directing the graph including determination of new root nodes.

Store State

name: storeState, type: Trigger

If pressed, the current Graph is copied; on pressing Restore State, that Graph is recreated.

Restore State

name: restoreState, type: Trigger

If pressed, the once copied Graph on pressing Store State is being recreated.

Create Undo Step

name: createUndoStep, type: Trigger

If pressed, an undo step is explicitly being created.