Class Annotation3D

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

public class Annotation3D extends Object
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 Details

  • Constructor Details

    • Annotation3D

      protected Annotation3D(Viewer3D viewer, Collection<Annotation3D> annotations)
    • Annotation3D

      protected Annotation3D(Viewer3D viewer, Collection<? extends SNTPoint> points, int type)
    • Annotation3D

      public Annotation3D(net.imagej.mesh.Mesh mesh, org.scijava.util.ColorRGB color, String label)
    • Annotation3D

      public Annotation3D(AbstractConvexHull hull, org.scijava.util.ColorRGB color, String label)
    • Annotation3D

      public Annotation3D(net.imglib2.roi.geom.real.Polygon2D polygon, org.scijava.util.ColorRGB color, String label)
    • Annotation3D

      public Annotation3D(net.imagej.mesh.Mesh mesh, String label)
    • Annotation3D

      protected Annotation3D(Viewer3D viewer, SNTPoint point)
  • Method Details

    • meshToDrawable

      public static org.jzy3d.plot3d.primitives.Drawable meshToDrawable(net.imagej.mesh.Mesh mesh)
    • isColorCodeAllowed

      public boolean isColorCodeAllowed()
    • colorCode

      public void colorCode(String colormap, String axis)
      Parameters:
      colormap - one of COLORMAPS, i.e., "grayscale", "hotcold", "rgb", "redgreen", "whiteblue", etc.
      axis - the range axis: either "x", "y", or "z".
    • setSize

      public void setSize(Number floatSize)
      Sets the annotation width.
      Parameters:
      floatSize - the new width. A negative value will set width to Viewer3D'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

      public void setColor(String color, double transparencyPercent)
      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 form r,g,b and 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

      public void setColor(String color)
      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 form r,g,b and range [0, 255]
    • setWireframeColor

      public void setWireframeColor(String color)
      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

      public String getLabel()
      Gets the annotation label
      Returns:
      the label, as listed in Reconstruction Viewer's list.
    • getType

      public String getType()
      Gets the type of this annotation.
      Returns:
      the annotation type. Either cloud (point cloud), surface, line, plane, or mixed (composite shape).
    • setLabel

      protected void setLabel(String label)
    • getBarycentre

      public SNTPoint 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