public class Viewer2D extends TreeColorMapper
Trees as 2D plots that can be exported as SVG,
PNG or PDF.BRANCH_ORDER, LENGTH, MEAN_RADIUS, N_BRANCH_POINTS, N_NODES, NODE_RADIUS, PATH_DISTANCE, TAG_FILENAME, VALUES, X_COORDINATES, Y_COORDINATES, Z_COORDINATES| Constructor and Description |
|---|
Viewer2D(org.scijava.Context context)
Instantiates an empty 2D viewer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColorBarLegend()
Adds a color bar legend (LUT ramp) to the viewer.
|
void |
addColorBarLegend(net.imglib2.display.ColorTable colorTable,
double min,
double max)
Adds a color bar legend (LUT ramp).
|
void |
addTree(Tree tree)
Appends a tree to the viewer using default options.
|
void |
addTree(Tree tree,
org.scijava.util.ColorRGB color)
Appends a tree to the viewer.
|
void |
addTree(Tree tree,
java.lang.String measurement,
net.imglib2.display.ColorTable colorTable,
double min,
double max)
Appends a tree to the viewer rendered after the specified measurement.
|
void |
addTree(Tree tree,
java.lang.String measurement,
java.lang.String lut)
Appends a tree to the viewer rendered after the specified measurement.
|
void |
addTree(Tree tree,
java.lang.String measurement,
java.lang.String lut,
double min,
double max)
Appends a tree to the viewer rendered after the specified measurement.
|
void |
addTrees(java.util.List<Tree> trees,
java.lang.String lut)
Adds a list of trees while assigning each tree to a LUT index.
|
org.jfree.chart.JFreeChart |
getChart()
Gets the current viewer as a
JFreeChart object |
net.imagej.plot.XYPlot |
getPlot(boolean show)
Gets the current plot as a
XYPlot object |
java.lang.String |
getTitle()
Gets the plot display title.
|
static void |
main(java.lang.String... args) |
void |
setAxesVisible(boolean visible) |
void |
setDefaultColor(org.scijava.util.ColorRGB color)
Sets the default (fallback) color for plotting paths.
|
void |
setGridlinesVisible(boolean visible) |
void |
setOutlineVisible(boolean visible) |
void |
setPreferredSize(int width,
int height)
Sets the preferred size of the plot to a constant value.
|
void |
setTitle(java.lang.String title)
Sets the plot display title.
|
void |
showPlot()
Displays the current plot on a dedicated frame
|
getAvalailableLuts, getColorTable, getMultiViewer, map, map, map, mapTreesgetMinMax, map, setMinMaxpublic Viewer2D(org.scijava.Context context)
context - the SciJava application context providing the services
required by the classpublic void addColorBarLegend(net.imglib2.display.ColorTable colorTable,
double min,
double max)
colorTable - the color tablemin - the minimum value in the color tablemax - the maximum value in the color tablepublic void addColorBarLegend()
public void addTree(Tree tree)
tree - the Collection of paths to be plottedpublic void addTrees(java.util.List<Tree> trees, java.lang.String lut)
trees - the list of trees to be plottedlut - the lookup table specifying the color mappingpublic void addTree(Tree tree, org.scijava.util.ColorRGB color)
tree - the Collection of paths to be plottedcolor - the color to render the Treepublic void addTree(Tree tree, java.lang.String measurement, net.imglib2.display.ColorTable colorTable, double min, double max)
tree - the tree to be plottedmeasurement - the measurement (TreeColorMapper.BRANCH_ORDER }TreeColorMapper.LENGTH,
etc.)colorTable - the color table specifying the color mappingmin - the mapping lower bound (i.e., the highest measurement value for
the LUT scale)max - the mapping upper bound (i.e., the highest measurement value for
the LUT scale)public void addTree(Tree tree, java.lang.String measurement, java.lang.String lut)
tree - the tree to be plottedmeasurement - the measurement (TreeColorMapper.BRANCH_ORDER }TreeColorMapper.LENGTH,
etc.)lut - the lookup table specifying the color mappingpublic void addTree(Tree tree, java.lang.String measurement, java.lang.String lut, double min, double max)
tree - the tree to be plottedmeasurement - the measurement (TreeColorMapper.BRANCH_ORDER }TreeColorMapper.LENGTH,
etc.)lut - the lookup table specifying the color mappingmin - the mapping lower bound (i.e., the highest measurement value for
the LUT scale)max - the mapping upper bound (i.e., the highest measurement value for
the LUT scale)public org.jfree.chart.JFreeChart getChart()
JFreeChart objectpublic net.imagej.plot.XYPlot getPlot(boolean show)
XYPlot objectshow - if true, plot is displayedpublic void setDefaultColor(org.scijava.util.ColorRGB color)
color - null not allowedpublic void setPreferredSize(int width,
int height)
width - the preferred widthheight - the preferred heightpublic void setTitle(java.lang.String title)
title - the new titlepublic java.lang.String getTitle()
public void showPlot()
public void setGridlinesVisible(boolean visible)
public void setAxesVisible(boolean visible)
public void setOutlineVisible(boolean visible)
public static void main(java.lang.String... args)