Class VolumeTriPlanarRender

    • Field Detail

      • rightMousePressed

        protected boolean rightMousePressed
      • altPressed

        protected boolean altPressed
      • shiftPressed

        protected boolean shiftPressed
      • animateStep

        private int animateStep
      • annotationPositions

        private VOIVector annotationPositions
      • annotationDiameters

        private java.util.HashMap<java.lang.String,​java.lang.Float> annotationDiameters
      • annotationSpheres

        private java.util.HashMap<java.lang.String,​VolumeSurface> annotationSpheres
      • annotationSpheresDisplay

        private java.util.HashMap<java.lang.String,​java.lang.Boolean> annotationSpheresDisplay
      • annotationSpheresIndex

        private int annotationSpheresIndex
      • annotationVOIs

        private java.util.HashMap<java.lang.String,​VOI> annotationVOIs
      • neuriteVOIs

        private java.util.HashMap<java.lang.String,​VOI[]> neuriteVOIs
      • neuriteSurfaces

        private java.util.HashMap<java.lang.String,​VolumeSurface[]> neuriteSurfaces
      • neuriteDisplay

        private java.util.HashMap<java.lang.String,​java.lang.Boolean> neuriteDisplay
      • annotationSpheresColors

        private java.util.HashMap<java.lang.String,​WildMagic.LibFoundation.Mathematics.ColorRGB> annotationSpheresColors
      • annotationLabelsDisplay

        private java.util.HashMap<java.lang.String,​java.lang.Boolean> annotationLabelsDisplay
      • annotationNames

        private java.lang.String[] annotationNames
      • sphereScale

        private float sphereScale
      • neuriteNames

        private java.util.Vector<java.lang.String> neuriteNames
    • Constructor Detail

      • VolumeTriPlanarRender

        public VolumeTriPlanarRender​(VolumeTriPlanarInterface kParent,
                                     com.jogamp.opengl.util.Animator kAnimator,
                                     VolumeImage kVolumeImageA,
                                     VolumeImage kVolumeImageB)
        Construct the Volume/Surface/Tri-Planar renderer.
        Parameters:
        kParent - parent user-interface and frame.
        kAnimator - animator used to display the canvas.
        kVolumeImageA - volume data and textures for ModelImage A.
        kVolumeImageB - volume data and textures for ModelImage B.
      • VolumeTriPlanarRender

        public VolumeTriPlanarRender​(VolumeTriPlanarRender kShared,
                                     com.jogamp.opengl.awt.GLCanvas kCanvas,
                                     VolumeTriPlanarInterface kParent,
                                     VolumeImage kVolumeImageA,
                                     VolumeImage kVolumeImageB)
        Construct the Volume/Surface/Tri-Planar renderer.
        Parameters:
        kParent - parent user-interface and frame.
        kAnimator - animator used to display the canvas.
        kVolumeImageA - volume data and textures for ModelImage A.
        kVolumeImageB - volume data and textures for ModelImage B.
      • VolumeTriPlanarRender

        public VolumeTriPlanarRender​(VolumeTriPlanarInterface kParent,
                                     VolumeImage kVolumeImageA,
                                     VolumeImage kVolumeImageB)
        Construct the Volume/Surface/Tri-Planar renderer.
        Parameters:
        kVolumeImageA - volume data and textures for ModelImage A.
        kVolumeImageB - volume data and textures for ModelImage B.
      • VolumeTriPlanarRender

        public VolumeTriPlanarRender​(VolumeImage[] images,
                                     WildMagic.LibGraphics.Rendering.Texture colormap)
    • Method Detail

      • display

        public void display​(com.jogamp.opengl.GLAutoDrawable arg0)
        Specified by:
        display in interface com.jogamp.opengl.GLEventListener
        Overrides:
        display in class VolumeTriPlanarRenderBase
      • addConfiguredListener

        public void addConfiguredListener​(RendererListener listener)
      • dispose

        public void dispose​(com.jogamp.opengl.GLAutoDrawable kDrawable)
        Description copied from class: GPURenderBase
        memory cleanup.
        Specified by:
        dispose in interface com.jogamp.opengl.GLEventListener
        Overrides:
        dispose in class VolumeTriPlanarRenderBase
      • clear3DSelection

        public void clear3DSelection()
      • annotationPrefix

        public java.lang.String annotationPrefix()
      • doAutomaticLabels

        public boolean doAutomaticLabels()
      • is3DSelectionEnabled

        public boolean is3DSelectionEnabled()
      • isEditAnnotations

        public boolean isEditAnnotations()
      • deleteSelectedPoint

        public void deleteSelectedPoint()
      • moveSelectedPoint

        public void moveSelectedPoint​(WildMagic.LibFoundation.Mathematics.Vector3f direction)
      • hasSelectedPoint

        public boolean hasSelectedPoint()
      • keyPressed

        public void keyPressed​(java.awt.event.KeyEvent e)
        Part of the KeyListener interface. Pressing 'b' toggles displaying the proxy-geometry versus the ray-traced volume.
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
        Overrides:
        keyPressed in class VolumeTriPlanarRenderBase
        Parameters:
        e - the key event.
      • keyReleased

        public void keyReleased​(java.awt.event.KeyEvent e)
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
        Overrides:
        keyReleased in class WildMagic.LibApplications.OpenGLApplication.JavaApplication3D
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Description copied from class: VolumeTriPlanarRenderBase
        Rotates the object with a virtual trackball:
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Overrides:
        mousePressed in class VolumeTriPlanarRenderBase
        Parameters:
        e - the MouseEvent
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Description copied from class: VolumeTriPlanarRenderBase
        Rotates the object with a virtual trackball:
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Overrides:
        mouseReleased in class VolumeTriPlanarRenderBase
        Parameters:
        e - the MouseEvent
      • setDefaultCursor

        public void setDefaultCursor()
      • select3DMarker

        public boolean select3DMarker​(WildMagic.LibFoundation.Mathematics.Vector3f startPt,
                                      WildMagic.LibFoundation.Mathematics.Vector3f endPt,
                                      WildMagic.LibFoundation.Mathematics.Vector3f pt,
                                      boolean rightMouse,
                                      boolean multiSelect)
      • modify3DMarker

        public boolean modify3DMarker​(WildMagic.LibFoundation.Mathematics.Vector3f startPt,
                                      WildMagic.LibFoundation.Mathematics.Vector3f endPt,
                                      WildMagic.LibFoundation.Mathematics.Vector3f pt)
      • add3DMarker

        public void add3DMarker​(VOI textVOI,
                                boolean automaticLabel,
                                boolean multiSelect,
                                boolean isShift)
      • add3DMarker

        public void add3DMarker​(VOI textVOI,
                                boolean automaticLabel,
                                boolean multiSelect)
      • mouseDragged

        public void mouseDragged​(java.awt.event.MouseEvent e)
        Rotates the object with a virtual trackball:
        Specified by:
        mouseDragged in interface java.awt.event.MouseMotionListener
        Overrides:
        mouseDragged in class VolumeTriPlanarRenderBase
        Parameters:
        e - the MouseEvent
      • processRightMouseDrag

        private void processRightMouseDrag​(java.awt.event.MouseEvent kEvent)
        If the right mouse button is pressed and dragged. processRightMouseDrag updates the HistoLUT window and level (contrast and brightness)
        Parameters:
        kEvent - the mouse event generated by a mouse drag
      • setWindowLevel

        private void setWindowLevel​(float fX,
                                    float fY,
                                    boolean first)
      • Pick

        protected void Pick()
        Picking. If a display list object has picking enabled, find the picked polygon based on the mouse position.
        Overrides:
        Pick in class VolumeTriPlanarRenderBase
      • PickVolume3D

        private void PickVolume3D​(WildMagic.LibFoundation.Mathematics.Vector3f kPos,
                                  WildMagic.LibFoundation.Mathematics.Vector3f kDir,
                                  WildMagic.LibFoundation.Mathematics.Vector3f maxPt)
      • PickSlice3D

        private boolean PickSlice3D​(WildMagic.LibFoundation.Mathematics.Vector3f kPos,
                                    WildMagic.LibFoundation.Mathematics.Vector3f kDir,
                                    WildMagic.LibFoundation.Mathematics.Vector3f maxPt)
      • updateVOIs

        public void updateVOIs()
      • addSphere

        private void addSphere​(WildMagic.LibFoundation.Mathematics.Vector3f center,
                               int index)
      • toggleNavigation

        public void toggleNavigation​(boolean _isNavigationEnabled)
        Toggle Navigation mode.
        Overrides:
        toggleNavigation in class VolumeTriPlanarRenderBase
        Parameters:
        isNavigationEnabled - is navigation checkbox selected or not.
      • setPathPlanningFlythru

        public void setPathPlanningFlythru​(boolean _isPathPlanning)
      • setMouseControlFlythru

        public void setMouseControlFlythru​(boolean _isMouseControl)
      • setAnnotationMode

        public void setAnnotationMode​(boolean _isAnnotateEnabled)
      • setupNavigationScenegraph

        public void setupNavigationScenegraph()
        Setup the Navigation scene graph view for debugging purpose
      • viewChanged

        public void viewChanged​(NavigationBehavior behavior,
                                int iEvent)
        Navigation behavior callback handler
        Specified by:
        viewChanged in interface NavigationBehavior.Callback
        Parameters:
        behavior - reference to this MjFlyPathBehavior in which the view changed.
        iEvent - Bitmask identifies the event(s) which caused the view to change. Bitmask created from OR of EVENT_* defintions.
      • getPositionScaled

        public WildMagic.LibFoundation.Mathematics.Vector3f getPositionScaled​(WildMagic.LibFoundation.Mathematics.Vector3f kPoint)
        Scaled coordinates for the current position along the path for viewing.
        Parameters:
        Point - in normalized path coordinates.
        Returns:
        Point3f A new instance created which contains the path position coordinates, scaled to match the TriMesh in JPanelSurface.
      • animateAlgorithm

        private void animateAlgorithm()
      • displayedNeurite

        private boolean displayedNeurite​(java.lang.String neuriteName)
      • updateNeurite

        private void updateNeurite​(java.lang.String neuriteName,
                                   java.lang.String[] names,
                                   WildMagic.LibFoundation.Mathematics.ColorRGB color)
      • updateContour

        private void updateContour​(VOIContour contour,
                                   VOI positions,
                                   java.lang.String[] names)
      • displayNeurite

        public void displayNeurite​(java.lang.String neuriteName,
                                   boolean display)
      • setNeuriteColor

        public void setNeuriteColor​(java.lang.String neuriteName,
                                    WildMagic.LibFoundation.Mathematics.ColorRGB color)
      • addNeurite

        public void addNeurite​(java.lang.String neuriteName,
                               java.lang.String[] names,
                               WildMagic.LibFoundation.Mathematics.ColorRGB color)
      • setDisplayAnnotation

        public void setDisplayAnnotation​(java.lang.String name,
                                         boolean display)
      • getAnnotationInfo

        public void getAnnotationInfo​(java.lang.String name,
                                      boolean[] display,
                                      java.awt.Color[] color,
                                      float[] diameter,
                                      boolean[] displayLabel,
                                      java.awt.Color[] labelColor)
      • setAnnotationDiameter

        public void setAnnotationDiameter​(java.lang.String name,
                                          float diameter)
      • getSelectedVOI

        public VOI getSelectedVOI​(java.lang.String name)
      • setDisplayAnnotationLabel

        public void setDisplayAnnotationLabel​(java.lang.String name,
                                              boolean display)
      • smoothCurve

        private WildMagic.LibFoundation.Curves.NaturalSpline3 smoothCurve​(VOIContour curve,
                                                                          float[] time)
      • createTube

        private WildMagic.LibGraphics.Surfaces.TubeSurface createTube​(VOIContour neurite)
      • createNeuriteSurface

        private WildMagic.LibGraphics.SceneGraph.TriMesh createNeuriteSurface​(VOIContour neurite,
                                                                              WildMagic.LibFoundation.Mathematics.ColorRGB color,
                                                                              float radius)
      • writeImage

        public boolean writeImage()
        Description copied from class: GPURenderBase
        Writes a the frame buffer as a .jpg image to disk. The file name is captureImage + the image number.
        Overrides:
        writeImage in class GPURenderBase
        Returns:
        true on successful write.
      • annotationVOIsUpdate

        public void annotationVOIsUpdate​(int value)
      • updateSceneNodePoint

        public void updateSceneNodePoint​(java.lang.String name,
                                         WildMagic.LibFoundation.Mathematics.Vector3f position)
        Currently only being used to update the picking point
        Parameters:
        name - surface name
        position - surface location
      • updateSlicesCenter

        public void updateSlicesCenter​(WildMagic.LibFoundation.Mathematics.Vector3f loc)
        Update the bottom 3 planar view center
      • setCameraCenter

        public void setCameraCenter​(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
        Update the camera in 3D view window.
        Parameters:
        kCenter - center in image space
      • addAnnotationPoint

        public void addAnnotationPoint​(WildMagic.LibFoundation.Mathematics.Vector3f point,
                                       WildMagic.LibFoundation.Mathematics.Vector3f scannerPt)
        Add the annotation point
        Parameters:
        point -
      • setCameraViewRotationDegree

        public void setCameraViewRotationDegree​(int degree)
        Set camera view rotation degree
        Parameters:
        degree -
      • generatePath

        public void generatePath()
        Generate the path planning path.
      • clearPath

        public void clearPath()
        Clear the annotated path
      • createBranchPathGeometryScaled

        private WildMagic.LibGraphics.SceneGraph.Polyline createBranchPathGeometryScaled​(int iBranch)
        Translate the path points from image coordinate to view volume coordinate.
        Parameters:
        iBranch -
        Returns:
      • createAnnotatePoint

        private void createAnnotatePoint​(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
        Create a new Annotation point at the position specified.
        Parameters:
        kPosition - position of new annotation point.