Viewer2D Class Documentation#

Package: sc.fiji.snt.viewer

Class for rendering Trees as 2D plots that can be exported as SVG, PNG or PDF.

Methods#

Getters Methods#

getAvailableLuts()#
getChart()#

Gets the current viewer as a SNTChart object

getColor(double)#
getColorRGB(double)#
getColorTable(String)#
getJFreeChart()#

Gets the current viewer as a JFreeChart object

static getMetrics()
getMinMax()#
getMultiViewer()#
getNaNColor()#
getPlot()#

Gets the current plot as a XYPlot object

getTitle()#

Gets the plot display title.

isIntegerScale()#
isNodeMapping()#

Setters Methods#

setAxesVisible(boolean)#
setDefaultColor(ColorRGB)#

Sets the default (fallback) color for plotting paths.

setEqualizeAxes(boolean)#

/** Sets whether the axes should be equalized (same scale).

When enabled, both X and Y axes will use the same scale to maintain equal aspect ratio. When disabled, each axis maximizes its range.

setGridlinesVisible(boolean)#
setMinMax(double, double)#
setNaNColor(Color)#
setOutlineVisible(boolean)#
setPreferredSize(int, int)#

Sets the preferred size of the plot to a constant value.

setTitle(String)#

Sets the plot display title.

setXrange(double, double)#

Sets a manual range for the viewers’ X-axis. Calling setXrange(-1, -1) enables auto-range (the default). Must be called before Viewer is fully assembled.

setYrange(double, double)#

Sets a manual range for the viewers’ Y-axis. Calling setYrange(-1, -1) enables auto-range (the default). Must be called before Viewer is fully assembled.

Visualization Methods#

show()#

Displays the current plot on a dedicated frame *

Other Methods#

add(Object)#

Appends a tree to the viewer rendered after the specified measurement.

addColorBarLegend(ColorTable, double, double)#

Adds a color bar legend (LUT ramp) to the viewer. Does nothing if no measurement mapping occurred successfully. Note that when performing mapping to different measurements, the legend reflects only the last mapped measurement.

addNodes(Map)#
addPolygon(Polygon2D, String)#
addTree(Tree)#

Appends a tree to the viewer using default options.

addTrees(Collection)#

Adds a collection of trees. Each tree will be rendered using a unique color.

static main(String;)
map(Tree, String, String)#
mapTrees(List, String)#

See Also#