public class GraphUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static org.jgrapht.graph.DefaultDirectedGraph<SWCPoint,org.jgrapht.graph.DefaultWeightedEdge> |
createGraph(java.util.Collection<SWCPoint> nodes,
boolean assignDistancesToWeights)
Creates a DirectedGraph from a collection of reconstruction nodes.
|
static org.jgrapht.graph.DefaultDirectedGraph<SWCPoint,org.jgrapht.graph.DefaultWeightedEdge> |
createGraph(Tree tree)
Creates a DirectedGraph from a Tree.
|
static Tree |
createTree(org.jgrapht.graph.DefaultDirectedGraph<SWCPoint,?> graph)
Creates a
Tree from a graph. |
static void |
main(java.lang.String[] args) |
static <V,E> java.awt.Window |
show(org.jgrapht.Graph<V,E> graph)
Displays a graph in a dedicated window featuring UI commands for interactive
visualization and export options.
|
public static org.jgrapht.graph.DefaultDirectedGraph<SWCPoint,org.jgrapht.graph.DefaultWeightedEdge> createGraph(java.util.Collection<SWCPoint> nodes, boolean assignDistancesToWeights)
nodes - the collections of SWC nodesassignDistancesToWeights - if true, inter-node Euclidean distances are
used as edge weightspublic static org.jgrapht.graph.DefaultDirectedGraph<SWCPoint,org.jgrapht.graph.DefaultWeightedEdge> createGraph(Tree tree)
tree - the Tree to be convertedpublic static Tree createTree(org.jgrapht.graph.DefaultDirectedGraph<SWCPoint,?> graph)
Tree from a graph.graph - the graph to be converted.public static <V,E> java.awt.Window show(org.jgrapht.Graph<V,E> graph)
V - the graph vertex typeE - the graph edge typegraph - the graph to be displayedpublic static void main(java.lang.String[] args)