Class VolumeSet3DInt

All Implemented Interfaces:
java.awt.datatransfer.Transferable, java.lang.Comparable<InterfaceShape>, AttributeListener, AttributeObject, InterfaceObject, PersistentObject, ColourMapListener, VariableObject, PopupMenuObject, NamedObject, InterfaceQueryObject, InterfaceShapeQueryObject, ShapeListener, VertexDataColumnListener, InterfaceTransferable, TreeObject, CleanableObject, XMLObject, IconObject, org.jogamp.java3d.GeometryUpdater, org.jogamp.java3d.ImageComponent3D.Updater

public class VolumeSet3DInt
extends Volume3DInt
implements ShapeListener
A set of Volume3DInt objects which render as an overlay image. This class extends Volume3DInt and inherits its behaviour; it is specified as a stack of images with given image and geometric dimensions, and samples from its member volumes within its bounding box to compose an overlay image. Anything outside the bounding box is not rendered.

Overlays are determined by:

  • An ordered list of member volumes
Since:
1.0
Version:
1.0
Author:
Andrew Reid
  • Constructor Details

    • VolumeSet3DInt

      public VolumeSet3DInt()
    • VolumeSet3DInt

      public VolumeSet3DInt​(Grid3D grid)
  • Method Details

    • getMembers

      public java.util.ArrayList<Volume3DInt> getMembers()
      Gets a list of this set's members
      Returns:
    • getMember

      public Volume3DInt getMember​(int i)
      Gets the i'th member in this set
      Parameters:
      i -
      Returns:
    • getMemberCount

      public int getMemberCount()
    • addVolume

      public void addVolume​(Volume3DInt volume, float alpha, boolean update)
      Adds volume to top of this overlay set, with given alpha level, and redraws the overlay.
      Parameters:
      volume -
      alpha -
      update -
    • addVolume

      public void addVolume​(int index, float alpha, Volume3DInt volume, boolean update)
      Adds volume at position index of this overlay set, with given alpha level, and redraws the overlay. Prevents volume from creating its own scene nodes using the creatable_scene_node flag.
      Parameters:
      index - The position of this volume in the set; negative adds to the top
      alpha - The transparency of this volume in the overlay
      volume -
      update -
    • removeVolume

      public void removeVolume​(Volume3DInt volume, boolean update)
      Removes the given volume (actually the first volume having the identical name) from this set.
      Parameters:
      volume -
      update -
    • removeVolume

      public void removeVolume​(java.lang.String name, boolean update)
      Removes the first volume having name name from this set.
      Parameters:
      volume -
      update -
    • setScene3DObject

      public void setScene3DObject​(boolean make_live)
      Description copied from class: Shape3DInt
      Sets this ShapeInt's Java3D scene node from its current geometry and rendering attributes. This node should be retrieved using the Shape3DInt.getShapeSceneNode() method. A scene node will only created if one of these conditions is met:
      • The shape is auxiliary (i.e., not a model shape, but a helper shape such as a section polygon)
      • The shape is associated with a ShapeModel3D, and this model is live (is associated with at least one Java3D scene graph).
      Subclasses which call this super method should always check that a scene node has indeed been created.
      Overrides:
      setScene3DObject in class Volume3DInt
    • setAlpha

      public void setAlpha​(int i, float alpha)
      Sets the transparency for the i'th volume in this set.
      Parameters:
      i -
    • getAlpha

      public float getAlpha​(int i)
      Gets the transparency for the i'th volume
      Parameters:
      i -
      Returns:
    • generateComposites

      public java.awt.image.BufferedImage[] generateComposites()
      This method updates the overlay composite Grid3D by sampling from all members and applying their transparency levels.
      Returns:
      A stack of composite images
    • getSampledImage

      protected java.awt.image.BufferedImage getSampledImage​(java.awt.image.BufferedImage sample_image)
      Returns an image having a colour model with type BufferedImage.TYPE_INT_ARGB, with colours set from image's colour model.
      Parameters:
      image -
      c_model -
      Returns:
    • shapeUpdated

      public void shapeUpdated​(ShapeEvent e)
      Description copied from interface: ShapeListener
      A shape that this object is listening to has been updated. The specific type of event is defined by ShapeEvent.EventType.
      Specified by:
      shapeUpdated in interface ShapeListener
      Overrides:
      shapeUpdated in class Volume3DInt
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode treeNode)
      Constructs a tree node from this shape. Adds an AttributeTreeNode via the super method, and also adds a node to display the vertex-wise data columns associated with this ShapeInt.
      Specified by:
      setTreeNode in interface TreeObject
      Overrides:
      setTreeNode in class InterfaceShape
      Parameters:
      treeNode - node to construct