Class GraphViewer

java.lang.Object
sc.fiji.snt.viewer.GraphViewer

public class GraphViewer extends Object
Provides a graphical user interface for visualizing and interacting with graphs using SNT's "Graph Viewer". It allows the display of various graph types, including directed weighted graphs, annotation graphs w/ options for interactive exploration and export.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GraphViewer(SNTGraph<?,? extends org.jgrapht.graph.DefaultWeightedEdge> inputGraph)
    Constructs a new GraphViewer for the specified graph.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the GraphEditor for this viewer.
    static void
    main(String[] args)
     
    void
    setContext(org.scijava.Context context)
    Sets the SciJava context for this viewer.
    Displays a graph in SNT's "Graph Viewer" featuring UI commands for interactive visualization and export options.
    show(String title)
    Displays a graph in SNT's "Graph Viewer" featuring UI commands for interactive visualization and export options.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GraphViewer

      public GraphViewer(SNTGraph<?,? extends org.jgrapht.graph.DefaultWeightedEdge> inputGraph)
      Constructs a new GraphViewer for the specified graph.
      Parameters:
      inputGraph - the SNTGraph to be visualized
  • Method Details

    • setContext

      public void setContext(org.scijava.Context context)
      Sets the SciJava context for this viewer.
      Parameters:
      context - the SciJava context
      Throws:
      org.scijava.NullContextException - if context is null
    • getEditor

      public GraphEditor getEditor()
      Gets the GraphEditor for this viewer.
      Returns:
      the GraphEditor instance
    • show

      public Window show()
      Displays a graph in SNT's "Graph Viewer" featuring UI commands for interactive visualization and export options.
      Returns:
      the assembled window
    • show

      public Window show(String title)
      Displays a graph in SNT's "Graph Viewer" featuring UI commands for interactive visualization and export options.
      Parameters:
      title - the Window title (optional, null allowed)
      Returns:
      the assembled window
    • main

      public static void main(String[] args)