Class VolumeVOI


  • public class VolumeVOI
    extends VolumeObject
    Displays the VOIBase in the GPU-based VolumeRenderer. Creates the shaders and rendering states necessary for rendering and blending with the volume.
    • Field Detail

      • m_kVOILine

        private WildMagic.LibGraphics.SceneGraph.Polyline m_kVOILine
      • m_kVOITicMarks

        private WildMagic.LibGraphics.SceneGraph.Polyline m_kVOITicMarks
      • m_kZState

        private WildMagic.LibGraphics.Rendering.ZBufferState m_kZState
      • m_kVolumeScale

        private WildMagic.LibFoundation.Mathematics.Vector3f m_kVolumeScale
      • m_kColor

        private WildMagic.LibFoundation.Mathematics.ColorRGB m_kColor
      • m_fOpacity

        private float m_fOpacity
      • m_fAnnotationScale

        private float m_fAnnotationScale
      • m_kBillboardPos

        private WildMagic.LibFoundation.Mathematics.Vector3f m_kBillboardPos
      • m_bShowText

        private boolean m_bShowText
      • m_bUpdateDisplay

        private boolean m_bUpdateDisplay
      • annotationTexture

        private byte[][] annotationTexture
      • annotationWidth

        private int annotationWidth
      • annotationHeight

        private int annotationHeight
      • volumeClip

        private boolean volumeClip
      • volumeClipRadius

        private float volumeClipRadius
      • m_kClip

        private WildMagic.LibFoundation.Mathematics.Vector3f m_kClip
        Sets the Color.
      • m_kClipInv

        private WildMagic.LibFoundation.Mathematics.Vector3f m_kClipInv
      • m_bClipped

        private boolean m_bClipped
      • m_bClippedA

        private boolean m_bClippedA
    • Constructor Detail

      • VolumeVOI

        public VolumeVOI​(VolumeImage kImageA,
                         WildMagic.LibFoundation.Mathematics.Vector3f kTranslate,
                         VOIBase kVOI,
                         WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
        Constructor for the VolumeVOI object.
        Parameters:
        kImageA -
        kTranslate -
        kVOI -
        kColor -
    • Method Detail

      • dispose

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

        public WildMagic.LibFoundation.Mathematics.ColorRGBA getColor()
        Returns the current color of the VOI.
        Returns:
      • GetName

        public java.lang.String GetName()
        Description copied from class: VolumeObject
        Return the name of this object.
        Overrides:
        GetName in class VolumeObject
        Returns:
        name of this object.
      • needsUpdate

        public boolean needsUpdate()
      • needsUpdate

        public void needsUpdate​(boolean update)
      • getVOI

        public VOIBase getVOI()
        Returns the VOIBase object rendered by this VolumVOI object.
        Returns:
      • 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.
      • getDepth

        public float getDepth​(WildMagic.LibGraphics.Rendering.Renderer kRenderer,
                              WildMagic.LibGraphics.SceneGraph.Culler kCuller)
        Overrides:
        getDepth in class VolumeObject
      • setBlend

        public void setBlend​(float fBlend)
        Sets the transparency.
        Parameters:
        fBlend -
      • SetClip

        public void SetClip​(int iWhich,
                            float data,
                            boolean bEnable)
        Sets axis-aligned clipping for the VolumeShaderEffect.
        Parameters:
        afClip - the clipping parameters for axis-aligned clipping.
      • SetClipEye

        public void SetClipEye​(float[] afEquation,
                               boolean bEnable)
      • SetClipEyeInv

        public void SetClipEyeInv​(float[] afEquation,
                                  boolean bEnable)
      • SetClipArb

        public void SetClipArb​(float[] afEquation,
                               float[] afEquationInv,
                               boolean bEnable)
      • setVolumeClip

        public void setVolumeClip​(boolean clip)
      • GetClipped

        public boolean GetClipped()
      • setVolumeClipRadius

        public void setVolumeClipRadius​(float radius)
      • GetClipRadius

        public float GetClipRadius()
      • setSlice

        public void setSlice​(boolean bUseSlice,
                             int iWhichSlice,
                             float fSlice)
        Sets the slice information for the shader.
        Parameters:
        bUseSlice -
        iWhichSlice -
        fSlice -
      • setVOI

        public void setVOI​(VOIBase kVOI,
                           boolean bForceReload)
        Sets and updates the VOIBase displayed by this VolumeVOI.
        Parameters:
        kVOI -
      • setVOI

        public void setVOI​(VOIBase kVOI)
        Sets and updates the VOIBase displayed by this VolumeVOI.
        Parameters:
        kVOI -
      • GetBillboardPosition

        public WildMagic.LibFoundation.Mathematics.Vector3f GetBillboardPosition()
      • SetBillboardPosition

        public void SetBillboardPosition​(WildMagic.LibFoundation.Mathematics.Vector3f volumePt)
      • setZCompare

        public void setZCompare​(boolean bOn)
        Turns the ZBufferState compare mode on or off.
        Parameters:
        bOn -
      • showTextBox

        public void showTextBox​(boolean bShow)
        Turns displaying the text on or off.
        Parameters:
        bShow -
      • update

        public void update​(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
        Set the color of the VolumeVOI object.
        Parameters:
        kColor -
      • updateText

        public void updateText()
      • getCoords

        private int getCoords​(WildMagic.LibFoundation.Mathematics.Vector3f kStart,
                              WildMagic.LibFoundation.Mathematics.Vector3f kEnd,
                              float fraction,
                              WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer,
                              int iPos)
        Sets up the line annotations.
        Parameters:
        kStart -
        kEnd -
        fraction -
        kVBuffer -
        iPos -
        Returns:
      • getEndLines

        private int getEndLines​(WildMagic.LibFoundation.Mathematics.Vector3f kStart,
                                WildMagic.LibFoundation.Mathematics.Vector3f kEnd,
                                WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer,
                                int iPos)
        Sets up the line annotations for the end-points of the line (arrows).
        Parameters:
        kStart -
        kEnd -
      • getEndLines2

        private int getEndLines2​(WildMagic.LibFoundation.Mathematics.Vector3f kStart,
                                 WildMagic.LibFoundation.Mathematics.Vector3f kEnd,
                                 WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer,
                                 int iPos)
        Sets up the protractor annotations for the end-points of the protractor (arrows).
        Parameters:
        kStart -
        kEnd -
      • lineAnnotations

        private void lineAnnotations​(WildMagic.LibFoundation.Mathematics.Vector3f kStart,
                                     WildMagic.LibFoundation.Mathematics.Vector3f kEnd)
        Creates the line annotations.
        Parameters:
        kStart -
        kEnd -
      • protractorAnnotations

        private void protractorAnnotations​(WildMagic.LibFoundation.Mathematics.Vector3f kStart,
                                           WildMagic.LibFoundation.Mathematics.Vector3f kMiddle,
                                           WildMagic.LibFoundation.Mathematics.Vector3f kEnd)
        Creates the protractor annotations.
        Parameters:
        kStart -
        kMiddle -
        kEnd -
      • scaleVOI

        private void scaleVOI()
        Creates the scene graph for displaying the VOIBase object.
      • textAnnotations

        private void textAnnotations​(WildMagic.LibFoundation.Mathematics.Vector3f kStart,
                                     WildMagic.LibFoundation.Mathematics.Vector3f kEnd)
        Creates the text annotations (arrow)
        Parameters:
        kStart -
        kEnd -
      • renderAnnotationToTexture

        private void renderAnnotationToTexture​(VOIText text)