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 based on 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 Empty Graph: Trigger
Create Undo Step: Trigger
Flooding Value: Float
Restore State: Trigger
Store State: Trigger

Visible Fields

Copy Input Graph

name: copyInputGraph, type: Trigger

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

Copy And Direct Input Graph

name: copyAndDirectInputGraph, type: Trigger

When pressed, the input Graph is copied internally, and is split based on the given Flooding Value.

New root nodes are determined, and the graph is directed based on these roots, so that the graph consists of trees with cyclic edges marked as such.

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

Create Empty Graph

name: createEmptyGraph, type: Trigger

When pressed, an empty output graph is created.

Clear

name: clear, type: Trigger

When 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 the rnage [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 the splitting and directing of the Graph, including the determination of new root nodes.

Store State

name: storeState, type: Trigger

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

Restore State

name: restoreState, type: Trigger

When pressed, the previously copied Graph (copied by pressing Store State) will be recreated.

Create Undo Step

name: createUndoStep, type: Trigger

When pressed, an undo step is created explicitly.