public class Viewer3D extends Object
org.jzy3d
package.Modifier and Type | Class and Description |
---|---|
class |
Viewer3D.ManagerPanel |
protected static class |
Viewer3D.Utils |
static class |
Viewer3D.ViewMode
Presets of a scene's view point.
|
Modifier and Type | Field and Description |
---|---|
protected static float |
DEF_NODE_RADIUS |
Modifier | Constructor and Description |
---|---|
|
Viewer3D()
Instantiates Viewer3D without the 'Controls' dialog ('kiosk mode').
|
|
Viewer3D(boolean interactive)
Script-friendly constructor.
|
|
Viewer3D(Context context)
Instantiates an interactive Viewer3D with GUI Controls to import, manage
and customize the Viewer's scene.
|
protected |
Viewer3D(SNT snt) |
Modifier and Type | Method and Description |
---|---|
void |
add(File[] files,
String color)
Adds a collection of trees or meshes from input files.
|
void |
add(Object object)
|
void |
addColorBarLegend(ColorTable colorTable,
double min,
double max)
Adds a color bar legend (LUT ramp) using default settings.
|
void |
addColorBarLegend(ColorTable colorTable,
double min,
double max,
Font font,
int steps,
int precision)
Adds a color bar legend (LUT ramp).
|
<T extends ColorMapper> |
addColorBarLegend(T colorMapper)
Adds a color bar legend (LUT ramp) from a
ColorMapper . |
void |
addLabel(String label)
Adds an annotation label to the scene.
|
boolean |
addMesh(OBJMesh objMesh)
Loads a Wavefront .OBJ file.
|
void |
addTree(Tree tree)
Adds a tree to this viewer.
|
void |
addTrees(Collection<Tree> trees,
boolean assignUniqueColors)
Deprecated.
use
addTrees(Collection, String) instead |
void |
addTrees(Collection<Tree> trees,
String color)
Adds a collection of trees.
|
void |
addTrees(Collection<Tree> trees,
String color,
double transparencyPercent)
Adds a collection of trees.
|
void |
addTrees(Collection<Tree> trees,
String color,
String... commonTags)
Adds a collection of trees.
|
Annotation3D |
annotateLine(Collection<? extends SNTPoint> points,
String label)
Adds a line annotation to this viewer.
|
Annotation3D |
annotatePoint(SNTPoint point,
String label)
Adds an highlighting point annotation to this viewer.
|
Annotation3D |
annotatePoint(SNTPoint node,
String label,
String color,
float size)
Adds an highlighting point annotation to this viewer.
|
Annotation3D |
annotatePoints(Collection<? extends SNTPoint> points,
String label)
Adds a scatter (point cloud) annotation to this viewer.
|
Annotation3D |
annotateSurface(Collection<? extends SNTPoint> points,
String label) |
Annotation3D |
annotateSurface(Collection<? extends SNTPoint> points,
String label,
boolean computeVolume)
Computes a convex hull from a collection of points and adds it to the
scene as an annotation.
|
void |
assignUniqueColors(Collection<String> treeLabels) |
double[] |
colorCode(Collection<String> treeLabels,
String measurement,
ColorTable colorTable)
Runs
MultiTreeColorMapper on the specified collection of
Tree s. |
double[] |
colorCode(String treeLabel,
String measurement,
ColorTable colorTable)
Runs
TreeColorMapper on the specified Tree . |
void |
dispose()
Closes and releases all the resources used by this viewer.
|
Viewer3D |
duplicate() |
boolean |
equals(Object obj) |
void |
freeze()
Does not allow scene to be interactive.
|
protected org.jzy3d.colors.Color |
fromAWTColor(Color color) |
Annotation3D |
getAnnotation(String label)
Gets the annotation associated with the specified label.
|
List<Annotation3D> |
getAnnotations()
Returns all annotations added to this viewer.
|
protected float |
getDefaultThickness()
Returns the default line thickness.
|
protected org.jzy3d.colors.Color |
getDefColor() |
int |
getID()
Returns this Viewer's id.
|
Viewer3D.ManagerPanel |
getManagerPanel()
Returns a reference to 'RV Controls' panel.
|
OBJMesh |
getMesh(String label)
Gets the mesh associated with the specified label.
|
List<OBJMesh> |
getMeshes()
Returns all meshes added to this viewer.
|
List<OBJMesh> |
getMeshes(boolean visibleOnly)
Returns all meshes added to this viewer.
|
Tree |
getTree(String label)
Gets the tree associated with the specified label.
|
List<Tree> |
getTrees()
Returns all trees added to this viewer.
|
List<Tree> |
getTrees(boolean visibleOnly)
Returns all trees added to this viewer.
|
int |
hashCode() |
boolean |
isActive()
Checks whether this instance is currently active
|
boolean |
isDarkModeOn()
Checks if scene is being rendered under dark or light background.
|
boolean |
isSNTInstance()
Checks whether this instance is SNT's Reconstruction Viewer.
|
boolean |
isSplitDendritesFromAxons()
Checks whether axons and dendrites of imported Trees are set to be imported
as separated objects.
|
OBJMesh |
loadMesh(String filePath,
ColorRGB color,
double transparencyPercent)
Loads a Wavefront .OBJ file.
|
OBJMesh |
loadRefBrain(String template)
Loads the surface mesh of a supported reference brain/neuropil.
|
void |
logSceneControls()
Logs API calls controlling the scene (view point, bounds, etc.) to Console.
|
static void |
main(String[] args) |
Annotation3D |
mergeAnnotations(Collection<Annotation3D> annotations,
String label)
Merges a collection of annotations into a single object.
|
void |
recordRotation(float angle,
int frames,
File destinationDirectory)
Records an animated rotation of the scene as a sequence of images.
|
void |
remove(Object object)
|
protected void |
removeAllAnnotations()
Removes all the Annotations from current viewer
|
void |
removeAllMeshes()
Removes all loaded OBJ meshes from current viewer
|
void |
removeAllTrees()
Removes all the Trees from current viewer
|
boolean |
removeMesh(OBJMesh mesh)
Removes the specified OBJ mesh.
|
boolean |
removeMesh(String meshLabel)
Removes the specified OBJ mesh.
|
boolean |
removeTree(String treeLabel)
Removes the specified Tree.
|
boolean |
removeTree(Tree tree)
Removes the specified Tree.
|
void |
rotate(float degrees)
Rotates the scene.
|
boolean |
saveSnapshot()
Saves a snapshot of current scene as a PNG image.
|
protected boolean |
saveSnapshot(File file) |
boolean |
saveSnapshot(String filePath)
Saves a snapshot of current scene as a PNG image to the specified path.
|
void |
setAnimationEnabled(boolean enabled)
Toggles the Viewer's animation.
|
void |
setBounds(float xMin,
float xMax,
float yMin,
float yMax,
float zMin,
float zMax)
Sets a manual bounding box for the scene.
|
void |
setDefaultColor(ColorRGB color)
Sets the default color for rendering
Tree s. |
void |
setDefaultThickness(float thickness)
Sets the line thickness for rendering
Tree s that have no specified
radius. |
void |
setEnableDarkMode(boolean enable)
Enables/disables "Dark Mode" mode
|
void |
setEnableDebugMode(boolean enable)
Enables/disables debug mode
|
void |
setFont(Font font,
float angle,
ColorRGB color)
Sets the font for label annotations
|
void |
setFrameSize(int width,
int height)
Resizes the viewer to the specified dimensions.
|
void |
setLabelLocation(float x,
float y)
Sets the location for annotation labels
|
void |
setLookAndFeel(String lookAndFeelName) |
void |
setSceneUpdatesEnabled(boolean enabled)
Sets whether the scene should update (refresh) every time a new
reconstruction (or mesh) is added/removed from the scene.
|
void |
setSnapshotDir(String path)
Sets the directory for storing snapshots.
|
void |
setSomasDisplayed(boolean displayed)
Toggles the visibility of somas for all trees in the scene.
|
void |
setSomasDisplayed(Collection<String> labels,
boolean displayed)
Toggles the visibility of somas for subset of trees.
|
void |
setSplitDendritesFromAxons(boolean split)
Sets whether axons and dendrites should be imported as separated objects.
|
void |
setTreeColor(Collection<String> labels,
ColorRGB color,
String compartment)
Recolors a subset of rendered trees.
|
void |
setTreeColor(Collection<String> labels,
String color,
String compartment)
Recolors a subset of rendered trees.
|
void |
setTreeThickness(Collection<String> labels,
float thickness,
String compartment)
Applies a constant thickness (line width) to a subset of rendered trees.
|
void |
setTreeThickness(float thickness)
Applies a constant thickness to all rendered trees.
|
void |
setTreeThickness(float thickness,
String compartment)
Applies a constant thickness (line width) to all rendered trees.Note that by
default, trees are rendered using their nodes' diameter.
|
void |
setViewMode(String viewMode)
Renders the scene from a specified camera angle (script-friendly).
|
void |
setViewMode(Viewer3D.ViewMode viewMode)
Renders the scene from a specified camera angle.
|
void |
setViewPoint(double r,
double t)
Renders the scene from a specified camera angle using polar coordinates
relative to the the center of the scene.
|
void |
setViewPointCC(double x,
double y)
Calls
setViewPoint(double, double) using Cartesian coordinates. |
void |
setVisible(String label,
boolean visible)
Toggles the visibility of a rendered Tree, a loaded OBJ mesh, or an
annotation.
|
Frame |
show()
Displays the Viewer and returns a reference to its frame.
|
Frame |
show(int width,
int height)
Displays the viewer under specified dimensions.
|
boolean |
syncPathManagerList()
(Re)loads the current list of Paths in the Path Manager list.
|
void |
translate(Collection<String> treeLabels,
SNTPoint offset)
Translates the specified collection of
Tree s. |
void |
translate(Tree tree,
SNTPoint offset)
Translates the specified Tree.
|
void |
unfreeze()
Allows scene to be interactive.
|
void |
updateColorBarLegend(double min,
double max)
Updates the existing color bar legend to new properties.
|
void |
updateView()
Updates the scene bounds to ensure all visible objects are displayed.
|
void |
validate()
Checks if all drawables in the 3D scene are being rendered properly,
rebuilding the entire scene if not.
|
protected static void |
workaroundIntelGraphicsBug() |
void |
zoomTo(Object... objects)
Zooms the scene into the bounding box enclosing the specified objects.
|
protected static final float DEF_NODE_RADIUS
public Viewer3D()
Tree
s to
be added concurrently.public Viewer3D(Context context)
context
- the SciJava application context providing the services
required by the classpublic Viewer3D(boolean interactive)
interactive
- if true, the viewer is displayed with GUI Controls to
import, manage and customize the Viewer's scene.protected Viewer3D(SNT snt)
protected static void workaroundIntelGraphicsBug()
public int getID()
public void setSceneUpdatesEnabled(boolean enabled)
enabled
- Whether scene updates should be enabled. Should be set to
false
when performing bulk operations. Scene will
update if set to true
public Viewer3D duplicate()
public void validate()
updateView()
public void setEnableDebugMode(boolean enable)
enable
- true to enable debug mode, otherwise falsepublic void setEnableDarkMode(boolean enable)
enable
- true to enable "Dark Mode", "Light Mode" otherwisepublic void setSplitDendritesFromAxons(boolean split)
split
- true to segregate imported Trees into axonal and dendritic
subtrees. This is likely only relevant to allow for subtree
customizations using the GUI commands provided by the "RV
Controls" dialog. This parameter is ignored if Trees have no
annotations.public void rotate(float degrees) throws IllegalArgumentException
degrees
- the angle, in degreesIllegalArgumentException
- if current view mode does not allow
rotationspublic void recordRotation(float angle, int frames, File destinationDirectory) throws IllegalArgumentException, SecurityException
angle
- the rotation angle (e.g., 360 for a full rotation)frames
- the number of frames in the animated sequencedestinationDirectory
- the directory where the image sequence will be
stored.IllegalArgumentException
- if no view exists, or current view is
constrained and does not allow 360 degrees rotationSecurityException
- if it was not possible to save files to
destinationDirectory
public boolean isDarkModeOn()
public boolean isSplitDendritesFromAxons()
public void freeze()
unfreeze()
public void unfreeze()
freeze()
protected org.jzy3d.colors.Color fromAWTColor(Color color)
public void addTree(Tree tree)
updateView()
may be
required to ensure that the current View's bounding box includes the added
Tree.tree
- the Tree
to be added. The Tree's label will be used as
identifier. It is expected to be unique when rendering multiple
Trees, if not (or no label exists) a unique label will be
generated.Tree.getLabel()
,
removeTree(String)
,
updateView()
,
setSplitDendritesFromAxons(boolean)
public void addTrees(Collection<Tree> trees, String color, String... commonTags)
trees
- the trees to be addedcolor
- Set it to null
, none
or ""
to
ignore this option altogether. Set it to unique
to
assign unique colors to each tree in the collection.commonTags
- common tag(s) to be assigned to the group (to be displayed
in 'RV Controls' list.public void addTrees(Collection<Tree> trees, String color)
trees
- the trees to be added.color
- the rendering color. Set it to null
, none
or ""
to
ignore this option altogether. Set it to unique
to assign
unique colors to each tree in the collection.public void addTrees(Collection<Tree> trees, String color, double transparencyPercent)
trees
- the trees to be added.color
- the color to be applied, either a HTML color codes
starting with hash (#
), a color preset
("red", "blue", etc.), or integer triples of the
form r,g,b
and range [0, 255]
transparencyPercent
- the color transparency (in percentage)@Deprecated public void addTrees(Collection<Tree> trees, boolean assignUniqueColors)
addTrees(Collection, String)
insteadpublic void add(File[] files, String color)
files
- the files to be importedcolor
- the color to be assigned to imported reconstructions/meshes. If
empty, null
or unique
, objects will be assigned
a unique color.setSplitDendritesFromAxons(boolean)
public Tree getTree(String label)
label
- the (unique) label as displayed in Viewer's listpublic Annotation3D getAnnotation(String label)
label
- the (unique) label as displayed in Viewer's listpublic OBJMesh getMesh(String label)
label
- the (unique) label as displayed in Viewer's listpublic List<Tree> getTrees()
public List<Tree> getTrees(boolean visibleOnly)
visibleOnly
- If true, only visible Trees are retrieved.public List<OBJMesh> getMeshes()
public List<OBJMesh> getMeshes(boolean visibleOnly)
visibleOnly
- If true, only visible meshes are retrieved.public List<Annotation3D> getAnnotations()
public Annotation3D annotateSurface(Collection<? extends SNTPoint> points, String label)
public Annotation3D annotateSurface(Collection<? extends SNTPoint> points, String label, boolean computeVolume)
points
- the collection of points defining the convex set.label
- the (optional) annotation identifier. If null or empty, a
unique label will be generated.computeVolume
- whether or not to compute the volume of the convex hull.
If true, the volume is stored in the "volume" field of the
returned Annotation3D
object.Annotation3D
public Annotation3D annotatePoint(SNTPoint point, String label)
point
- the point to be highlightedlabel
- the (optional) annotation identifier. If null or empty, a unique
label will be generated.Annotation3D
public Annotation3D annotatePoint(SNTPoint node, String label, String color, float size)
node
- the node to be highlightedlabel
- the (optional) annotation identifier. If null or empty, a unique
label will be generated.color
- the annotation colorsize
- the annotation sizeAnnotation3D
public Annotation3D annotatePoints(Collection<? extends SNTPoint> points, String label)
points
- the collection of points in the annotationlabel
- the (optional) annotation identifier. If null or empty, a
unique label will be generated.Annotation3D
public Annotation3D annotateLine(Collection<? extends SNTPoint> points, String label)
points
- the collection of points in the line annotation (at least 2
elements required). Start and end of line are highlighted if 2
points are specified.label
- the (optional) annotation identifier. If null or empty, a
unique label will be generated.Annotation3D
or null if collection contains less than 2
elementspublic Annotation3D mergeAnnotations(Collection<Annotation3D> annotations, String label)
annotations
- the collection of annotations.label
- the (optional) identifier for the merged annotation. If
null or empty, a unique label will be generated.Annotation3D
public void updateView()
rebuild()
public void zoomTo(Object... objects)
objects
- the objects to be zoomed into. These can be OBJMesh
,
Tree
, Annotation3D
, etc., or string(s)
defining objects listed in the "RV Controls" dialog.
Collections of supported objects are also supported.public <T extends ColorMapper> void addColorBarLegend(T colorMapper)
ColorMapper
.colorMapper
- the class extending ColorMapper (TreeColorMapper
,
etc.)public void addColorBarLegend(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 updateColorBarLegend(double min, double max)
min
- the minimum value in the color tablemax
- the maximum value in the color tablepublic void addColorBarLegend(ColorTable colorTable, double min, double max, Font font, int steps, int precision)
colorTable
- the color tablemin
- the minimum value in the color tablemax
- the maximum value in the color tablefont
- the font the legend font.steps
- the number of ticks in the legend. Tick placement is computed
automatically if negative.precision
- the number of decimal places of tick labels. scientific
notation is used if negative.public Frame show()
public Frame show(int width, int height)
width
- the width of the frame. -1
will set width to its maximum.height
- the height of the frame. -1
will set height to its maximum.show()
public void setFrameSize(int width, int height)
width
- the width of the frame. -1
will set width to its maximum.height
- the height of the frame. -1
will set height to its maximum.show(int, int)
public void setLookAndFeel(String lookAndFeelName)
public boolean removeTree(Tree tree)
tree
- the tree to be removed.addTree(Tree)
public boolean removeTree(String treeLabel)
treeLabel
- the key defining the tree to be removed.addTree(Tree)
public boolean removeMesh(OBJMesh mesh)
mesh
- the OBJ mesh to be removed.loadMesh(String, ColorRGB, double)
public boolean removeMesh(String meshLabel)
meshLabel
- the key defining the OBJ mesh to be removed.loadMesh(String, ColorRGB, double)
public void removeAllMeshes()
public void removeAllTrees()
protected void removeAllAnnotations()
public void add(Object object)
Tree
,
OBJMesh
, AbstractDrawable
, etc.) to this viewer. Note that
collections of supported objects are also supported, which is an effective
way of adding multiple items since the scene is only rebuilt once all items
have been added.object
- the object to be added. No exception is triggered if nullIllegalArgumentException
- if object is not supportedpublic void remove(Object object)
Tree
, OBJMesh
,
AbstractDrawable
, String
(object label), etc.) from this viewer's scene.object
- the object to be removed, or the unique String identifying it.
Collections supported.IllegalArgumentException
- if object is not supportedpublic boolean syncPathManagerList() throws UnsupportedOperationException
UnsupportedOperationException
- if SNT is not runningpublic void setVisible(String label, boolean visible)
label
- the unique identifier of the Tree (as per
addTree(Tree)
), the filename/identifier of the loaded
OBJ loadMesh(String, ColorRGB, double)
, or annotation
label.visible
- whether the Object should be displayedpublic double[] colorCode(Collection<String> treeLabels, String measurement, ColorTable colorTable)
MultiTreeColorMapper
on the specified collection of
Tree
s.treeLabels
- the collection of Tree identifiers (as per
addTree(Tree)
) specifying the Trees to be color mappedmeasurement
- the mapping measurement e.g.,
MultiTreeColorMapper.LENGTH
MultiTreeColorMapper.N_TIPS
, etc.colorTable
- the mapping color table (LUT), e.g.,
ColorTables.ICE
), or any other known to LutServicepublic void setAnimationEnabled(boolean enabled)
enabled
- if true animation starts. Stops if falsepublic void setBounds(float xMin, float xMax, float yMin, float yMax, float zMin, float zMax)
xMin
- the X coordinate of the box originxMax
- the X coordinate of the box origin oppositeyMin
- the Y coordinate of the box originyMax
- the Y coordinate of the box origin oppositezMin
- the Z coordinate of the box originzMax
- the X coordinate of the box origin oppositepublic double[] colorCode(String treeLabel, String measurement, ColorTable colorTable)
TreeColorMapper
on the specified Tree
.treeLabel
- the identifier of the Tree (as per addTree(Tree)
)to
be color mappedmeasurement
- the mapping measurement e.g.,
TreeColorMapper.PATH_ORDER
TreeColorMapper.PATH_DISTANCE
, etc.colorTable
- the mapping color table (LUT), e.g.,
ColorTables.ICE
), or any other known to LutServicepublic void assignUniqueColors(Collection<String> treeLabels)
public void setViewMode(Viewer3D.ViewMode viewMode)
viewMode
- the view mode, e.g., Viewer3D.ViewMode.DEFAULT
,
Viewer3D.ViewMode.SIDE
, etc.public void setViewMode(String viewMode)
viewMode
- the view mode (case insensitive): "side" or "sagittal"; "top"
or "coronal"; "perspective" or "overview"; "default" or "".public void setViewPoint(double r, double t)
logSceneControls()
.r
- the radial coordinatet
- the angle coordinate (in radians)public void setViewPointCC(double x, double y)
setViewPoint(double, double)
using Cartesian coordinates.x
- the X coordinatey
- the Y coordinatepublic void addLabel(String label)
label
- the annotation textsetFont(Font, float, ColorRGB)
,
setLabelLocation(float, float)
public void setLabelLocation(float x, float y)
x
- the x position of the labely
- the y position of the labelpublic void setFont(Font font, float angle, ColorRGB color)
font
- the font label, e.g.,
new Font(Font.SANS_SERIF, Font.ITALIC, 20)
angle
- the angle in degrees for rotated labelscolor
- the font color, e.g., org.scijava.util.Colors.ORANGE
public boolean saveSnapshot()
setSnapshotDir(String)
public boolean saveSnapshot(String filePath)
filePath
- the absolute path of the destination fileprotected boolean saveSnapshot(File file) throws IllegalArgumentException, IOException
IllegalArgumentException
IOException
public void setSnapshotDir(String path)
path
- the absolute path to the new snapshot directory.public OBJMesh loadMesh(String filePath, ColorRGB color, double transparencyPercent) throws IllegalArgumentException
validate()
should be called to ensure all meshes are visible.filePath
- the absolute file path (or URL) of the file to be imported.
The filename is used as unique identifier of the object (see
setVisible(String, boolean)
)color
- the color to render the imported filetransparencyPercent
- the color transparency (in percentage)IllegalArgumentException
- if filePath is invalid or file does not
contain a compilable meshpublic boolean addMesh(OBJMesh objMesh) throws IllegalArgumentException
validate()
should be
called to ensure all meshes are visible.objMesh
- the mesh to be loadedIllegalArgumentException
- if mesh could not be compiledpublic OBJMesh loadRefBrain(String template) throws IllegalArgumentException
template
- the reference brain to be loaded (case-insensitive). E.g.,
"zebrafish" (MP ZBA); "mouse" (Allen CCF); "JFRC2", "JFRC3"
"JFRC2018", "FCWB"(adult), "L1", "L3", "VNC" (Drosophila)IllegalArgumentException
- if template
is not recognizedAllenUtils
,
VFBUtils
,
ZBAtlasUtils
protected org.jzy3d.colors.Color getDefColor()
public void logSceneControls()
public Viewer3D.ManagerPanel getManagerPanel()
public void dispose()
public void setDefaultThickness(float thickness)
Tree
s that have no specified
radius.thickness
- the new line thickness. Note that this value only applies
to Paths that have no specified radiuspublic void setDefaultColor(ColorRGB color)
Tree
s.color
- the new color. Note that this value only applies to Paths that
have no specified color and no colors assigned to its nodesprotected float getDefaultThickness()
public void setTreeThickness(Collection<String> labels, float thickness, String compartment)
labels
- the Collection of keys specifying the subset of treesthickness
- the thickness (line width)compartment
- a string with at least 2 characters describing the Tree
compartment (e.g., 'axon', 'axn', 'dendrite', 'dend',
etc.)setTreeThickness(float, String)
public void setTreeThickness(float thickness)
thickness
- the thickness (line width)setTreeThickness(float, String)
public void setTreeThickness(float thickness, String compartment)
thickness
- the thickness (line width)compartment
- a string with at least 2 characters describing the Tree
compartment (e.g., 'axon', 'axn', 'dendrite', 'dend',
etc.)setTreeThickness(float)
public void setTreeColor(Collection<String> labels, String color, String compartment)
labels
- the Collection of keys specifying the subset of treescolor
- the color to be applied, either a 1) HTML color codes
starting with hash (#
), a color preset ("red",
"blue", etc.), or integer triples of the form
r,g,b
and range [0, 255]
compartment
- a string with at least 2 characters describing the Tree
compartment (e.g., 'axon', 'axn', 'dendrite', 'dend',
etc.)public void setTreeColor(Collection<String> labels, ColorRGB color, String compartment)
labels
- the Collection of keys specifying the subset of treescolor
- the color to be applied.compartment
- a string with at least 2 characters describing the Tree
compartment (e.g., 'axon', 'axn', 'dendrite', 'dend',
etc.)public void translate(Tree tree, SNTPoint offset)
tree
- the Tree to be translatedoffset
- the translation offset. If null, tree position will be reset to
their original location.public void translate(Collection<String> treeLabels, SNTPoint offset)
Tree
s.treeLabels
- the collection of Tree identifiers (as per
addTree(Tree)
) specifying the Trees to be translatedoffset
- the translation offset. If null, trees position will be reset
to their original location.public void setSomasDisplayed(Collection<String> labels, boolean displayed)
labels
- the Collection of keys specifying the subset of trees to be
affecteddisplayed
- whether soma should be displayedpublic void setSomasDisplayed(boolean displayed)
displayed
- whether soma should be displayedpublic boolean isSNTInstance()
public boolean isActive()
public static void main(String[] args) throws InterruptedException
InterruptedException
Copyright © 2015–2021 Fiji. All rights reserved.