Package sc.fiji.snt.viewer
Class Annotation3D
java.lang.Object
sc.fiji.snt.viewer.Annotation3D
An Annotation3D is a triangulated surface or a cloud of points (scatter)
rendered in
Viewer3D that can be used to highlight nodes in a
Tree or locations in a
mesh.- Author:
- Tiago Ferreira
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final intprotected static final int -
Constructor Summary
ConstructorsModifierConstructorDescriptionAnnotation3D(net.imagej.mesh.Mesh mesh, String label) Annotation3D(net.imagej.mesh.Mesh mesh, org.scijava.util.ColorRGB color, String label) Annotation3D(net.imglib2.roi.geom.real.Polygon2D polygon, org.scijava.util.ColorRGB color, String label) Annotation3D(AbstractConvexHull hull, org.scijava.util.ColorRGB color, String label) protectedAnnotation3D(Viewer3D viewer, Collection<? extends SNTPoint> points, int type) protectedAnnotation3D(Viewer3D viewer, Collection<Annotation3D> annotations) protectedAnnotation3D(Viewer3D viewer, SNTPoint point) -
Method Summary
Modifier and TypeMethodDescriptionvoidReturns the center of this annotation bounding box.org.scijava.util.ColorRGBgetColor()org.jzy3d.plot3d.primitives.DrawableReturns the AbstractDrawable associated with this annotation.protected org.jzy3d.colors.ColorgetLabel()Gets the annotation labelgetType()Gets the type of this annotation.doublebooleanstatic org.jzy3d.plot3d.primitives.DrawablemeshToDrawable(net.imagej.mesh.Mesh mesh) voidsetBoundingBoxColor(org.scijava.util.ColorRGB boundingBoxColor) Determines whether the mesh bounding box should be displayed.voidScript friendly method to assign a color to the annotation.voidScript friendly method to assign a color to the annotation.voidsetColor(org.scijava.util.ColorRGB color, double transparencyPercent) Assigns a color to the annotation.protected voidvoidSets the annotation width.voidsetTransparency(double transparencyPercent) Script friendly method to assign a transparency to the annotation.voidsetWireframeColor(String color) Script friendly method to assign a wireframe color to the annotation.voidsetWireframeColor(org.scijava.util.ColorRGB color) Assigns a wireframe color to the annotation.
-
Field Details
-
SCATTER
protected static final int SCATTER- See Also:
-
SURFACE
protected static final int SURFACE- See Also:
-
STRIP
protected static final int STRIP- See Also:
-
Q_TIP
protected static final int Q_TIP- See Also:
-
MERGE
protected static final int MERGE- See Also:
-
PLANE
protected static final int PLANE- See Also:
-
SURFACE_AND_VOLUME
protected static final int SURFACE_AND_VOLUME- See Also:
-
COLORMAPS
-
-
Constructor Details
-
Annotation3D
-
Annotation3D
-
Annotation3D
-
Annotation3D
-
Annotation3D
public Annotation3D(net.imglib2.roi.geom.real.Polygon2D polygon, org.scijava.util.ColorRGB color, String label) -
Annotation3D
-
Annotation3D
-
-
Method Details
-
meshToDrawable
public static org.jzy3d.plot3d.primitives.Drawable meshToDrawable(net.imagej.mesh.Mesh mesh) -
isColorCodeAllowed
public boolean isColorCodeAllowed() -
colorCode
- Parameters:
colormap- one ofCOLORMAPS, i.e., "grayscale", "hotcold", "rgb", "redgreen", "whiteblue", etc.axis- the range axis: either "x", "y", or "z".
-
setSize
Sets the annotation width.- Parameters:
floatSize- the new width. A negative value will set width toViewer3D's default.
-
setColor
public void setColor(org.scijava.util.ColorRGB color, double transparencyPercent) Assigns a color to the annotation.- Parameters:
color- the color to render the annotation. If the annotation contains a wireframe, the wireframe is rendered using a "contrast" color computed from this one.transparencyPercent- the color transparency (in percentage)
-
getColor
public org.scijava.util.ColorRGB getColor() -
getDrawableColor
protected org.jzy3d.colors.Color getDrawableColor() -
setColor
Script friendly method to assign a color to the annotation.- Parameters:
color- the color to render the imported file, either a 1) HTML color codes starting with hash (#), a color preset ("red", "blue", etc.), or integer triples of the formr,g,band range[0, 255]transparencyPercent- the color transparency (in percentage)
-
setTransparency
public void setTransparency(double transparencyPercent) Script friendly method to assign a transparency to the annotation.- Parameters:
transparencyPercent- the color transparency (in percentage)
-
setColor
Script friendly method to assign a color to the annotation.- Parameters:
color- the color to render the imported file, either a 1) HTML color codes starting with hash (#), a color preset ("red", "blue", etc.), or integer triples of the formr,g,band range[0, 255]
-
setWireframeColor
Script friendly method to assign a wireframe color to the annotation.- Parameters:
color- the wireframe color. Ignored if the annotation has no wireframe.
-
setWireframeColor
public void setWireframeColor(org.scijava.util.ColorRGB color) Assigns a wireframe color to the annotation.- Parameters:
color- the wireframe color. Ignored if the annotation has no wireframe.
-
setBoundingBoxColor
public void setBoundingBoxColor(org.scijava.util.ColorRGB boundingBoxColor) Determines whether the mesh bounding box should be displayed.- Parameters:
boundingBoxColor- the color of the mesh bounding box. If null, no bounding box is displayed
-
getLabel
Gets the annotation label- Returns:
- the label, as listed in Reconstruction Viewer's list.
-
getType
Gets the type of this annotation.- Returns:
- the annotation type. Either
cloud(point cloud),surface,line,plane, ormixed(composite shape).
-
setLabel
-
getBarycentre
Returns the center of this annotation bounding box.- Returns:
- the barycentre of this annotation. All coordinates are set to Double.NaN if the bounding box is not available.
-
getVolume
public double getVolume() -
getDrawable
public org.jzy3d.plot3d.primitives.Drawable getDrawable()Returns the AbstractDrawable associated with this annotation.- Returns:
- the AbstractDrawable
-