Class VolumeSlices

java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeSlices

public class VolumeSlices extends VolumeObject
Displays the three orthogonal planes with the volume data.
See Also:
  • invalid reference
    GPUVolumeRender.java
  • invalid reference
    VolumePlaneEffect.java
  • invalid reference
    VolumeObject.java
  • Field Details

    • m_kBoundingBoxShaderSolid

      private VolumePreRenderEffect[] m_kBoundingBoxShaderSolid
    • m_kBoundingBoxShaderTransparent

      private VolumePreRenderEffect[] m_kBoundingBoxShaderTransparent
    • m_kVolumePreShader

      private VolumePreRenderEffect[] m_kVolumePreShader
      ShaderEffect for the pre-render stage the bounding-box and the slice share the same pre-render effect.
    • m_kVolumePreShaderTransparent

      private VolumePreRenderEffect[] m_kVolumePreShaderTransparent
    • m_akPlaneEffect

      private VolumePlaneEffect[] m_akPlaneEffect
      ShaderEffects for the planes. Each is unique so they can have different alpha values.
    • m_akPlaneEffectTransparent

      private VolumePlaneEffect[] m_akPlaneEffectTransparent
    • m_akPlanes

      private WildMagic.LibGraphics.SceneGraph.TriMesh[] m_akPlanes
      The three orthogonal plane TriMeshes.
    • m_abShowPlanes

      private boolean[] m_abShowPlanes
      Displaying each plane:
    • m_akBoundingBox

      private WildMagic.LibGraphics.SceneGraph.Polyline[] m_akBoundingBox
      The three plane bounding-box Polylines.
    • m_abShowBoundingBox

      private boolean[] m_abShowBoundingBox
      Displaying each bounding-box:
    • m_akColors

      private WildMagic.LibFoundation.Mathematics.ColorRGB[] m_akColors
      Set of colors used to draw the X and Y Bars and the Z box:.
    • m_abSolid

      private boolean[] m_abSolid
    • sliceIDs

      private int[] sliceIDs
  • Constructor Details

    • VolumeSlices

      public VolumeSlices(WildMagic.LibGraphics.Rendering.Renderer kRenderer, VolumeImage kImageA, VolumeImage kImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
      Create a new VolumeObject with the VolumeImage parameter.
      Parameters:
      kImageA - the VolumeImage containing shared data and textures for rendering.
      kTranslate - translation in the scene-graph for this object.
      fX - the size of the volume in the x-dimension (extent * resolutions)
      fY - the size of the volume in the y-dimension (extent * resolutions)
      fZ - the size of the volume in the z-dimension (extent * resolutions)
      kVolumeImageB - second VolumeImage.
  • Method Details

    • dispose

      public void dispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer)
      Delete local memory.
      Overrides:
      dispose in class VolumeObject
    • GetScene

      public WildMagic.LibGraphics.SceneGraph.Node GetScene()
      Description copied from class: VolumeObject
      Get the object's parent node in the scene graph.
      Overrides:
      GetScene in class VolumeObject
    • GetShowBoundingBox

      public boolean GetShowBoundingBox(int i)
      Return the current display status for the bounding box for the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      Returns:
      true when the bounding box is displayed.
    • GetShowSlice

      public boolean GetShowSlice(int i)
      Return the current display status for the bounding box for the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      Returns:
      true when the bounding box is displayed.
    • GetSliceOpacity

      public float GetSliceOpacity(int i)
      Return the opacity for the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      Returns:
      the opacity for the given plane.
    • GetSliceOpacity

      public float[] GetSliceOpacity()
    • SetSliceOpacity

      public void SetSliceOpacity(float[] afAlpha)
    • Render

      public void Render(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid)
      Description copied from class: VolumeObject
      Render the object.
      Specified by:
      Render in class VolumeObject
      Parameters:
      kRenderer - the OpenGLRenderer object.
      kCuller - the Culler object.
    • setABBlend

      public void setABBlend(float fBlend)
    • SetBoundingBoxColor

      public void SetBoundingBoxColor(int i, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
      Sets the bounding box color for the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      kColor - the new color.
    • SetCenter

      public void SetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
      Sets the positions of the three orthogonal planes.
      Parameters:
      kCenter - the positions in file coordinates.
    • setRGBTA

      public void setRGBTA(ModelRGB RGBT)
    • setRGBTB

      public void setRGBTB(ModelRGB RGBT)
    • SetSliceOpacity

      public void SetSliceOpacity(int i, float fAlpha)
      Sets the opacity for the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      fAlpha - the opacity for the given plane.
    • ShowBoundingBox

      public void ShowBoundingBox(int i, boolean bShow)
      Turns on/off displaying the bounding box for the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      bShow - when true, the bounding box is displayed.
    • ShowSlice

      public void ShowSlice(int i, boolean bShow)
      Turns on/off displaying the given plane.
      Parameters:
      i - the plane index (0-3) in file coordinates.
      bShow - when true, the plane is displayed.
    • ShowSurface

      public void ShowSurface(boolean bOn)
      Turns rendering the planes with the surface mask on/off.
      Parameters:
      bOn - on/off.
    • SetTranslate

      public void SetTranslate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
      Description copied from class: VolumeObject
      Copy translation vector.
      Overrides:
      SetTranslate in class VolumeObject
      Parameters:
      kTranslate - new translation amount.
    • whichPlane

      public int whichPlane(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh)
    • CreateBoundingBox

      private void CreateBoundingBox()
      Creates the bounding frames for the planes.
    • CreatePlanes

      private void CreatePlanes()
      Creates the scene graph.
    • reCreateScene

      public void reCreateScene(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
    • reCreateBoundingBox

      private void reCreateBoundingBox()