Class ViewJFrameVolumeView

  • All Implemented Interfaces:
    ViewImageUpdateInterface, java.awt.event.ActionListener, java.awt.event.ComponentListener, java.awt.event.ItemListener, java.awt.event.MouseListener, java.awt.event.WindowListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.event.ChangeListener, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class ViewJFrameVolumeView
    extends ViewJFrameBase
    implements java.awt.event.MouseListener, java.awt.event.ItemListener, javax.swing.event.ChangeListener
    The volume view frame of the visualization. The frame includes the surface renderer, the raycast renderer, the shearwarp renderer and the flythru renderer.
    Author:
    Ruida Cheng
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • BRAINSURFACE_FLATTENER

        public static final int BRAINSURFACE_FLATTENER
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • rendererProgressBar

        protected static javax.swing.JProgressBar rendererProgressBar
        The small bar on the top right corner the volume view frame.
      • config

        protected java.awt.GraphicsConfiguration config
        Configuration param, which will pass down to each render's constructor.
      • isoImageA

        protected ModelImage isoImageA
        Isotropic version image A, B, used by the shear warp renderer.
      • isoImageB

        protected ModelImage isoImageB
        Isotropic version image A, B, used by the shear warp renderer.
      • modelViewLabel

        protected javax.swing.JLabel modelViewLabel
        Labels for the current position in 3D ModelView coordinates:.
      • modelViewLabelVals

        protected javax.swing.JLabel[] modelViewLabelVals
        DOCUMENT ME!
      • orient

        protected int[] orient
        Orientations of the three axes.
      • panelToolbar

        protected javax.swing.JPanel panelToolbar
        Panel that holds the toolbars.
      • patientSliceLabel

        protected javax.swing.JLabel patientSliceLabel
        Labels for the current position in PatientSlice coordinates:.
      • patientSliceLabelVals

        protected javax.swing.JLabel[] patientSliceLabelVals
        DOCUMENT ME!
      • RGBTA

        protected ModelRGB RGBTA
        Lookup table of the color imageA, B.
      • RGBTB

        protected ModelRGB RGBTB
        Lookup table of the color imageA, B.
      • serif12

        protected java.awt.Font serif12
        Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
      • serif12B

        protected java.awt.Font serif12B
        Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
      • panelLabels

        javax.swing.JPanel panelLabels
        Panel containing the position labels:.
      • axialOrientation

        private boolean axialOrientation
        Indicates that image orientation is unknown type or not.
      • brainsurfaceFlattenerRender

        private MjCorticalAnalysis brainsurfaceFlattenerRender
        Rendering the brainsurfaceFlattener objects.
      • cameraPanel

        private javax.swing.JPanel cameraPanel
        DOCUMENT ME!
      • clipBox

        private javax.swing.JPanel clipBox
        DOCUMENT ME!
      • clipButton

        private javax.swing.JButton clipButton
        Button to invoke all the six clipping planes.
      • clipDisableButton

        private javax.swing.JButton clipDisableButton
        Button to disable all the six clipping planes.
      • clipMaskButton

        private javax.swing.JButton clipMaskButton
        Button to crop the clip volume.
      • clipMaskUndoButton

        private javax.swing.JButton clipMaskUndoButton
        Button to undo crop the clip volume.
      • clipPanel

        private javax.swing.JPanel clipPanel
        DOCUMENT ME!
      • clipPlaneButton

        private javax.swing.JButton clipPlaneButton
        Button to invoke clipping planes.
      • clipSaveButton

        private javax.swing.JButton clipSaveButton
        Button to save clipped region.
      • displayPanel

        private javax.swing.JPanel displayPanel
        DOCUMENT ME!
      • dualImagePane

        private javax.swing.JSplitPane dualImagePane
        dual image pane that holds the left and right panel.
      • dualImagePanel

        private javax.swing.JPanel dualImagePanel
        The image panel to hold two Canvas3D.
      • dualLeftPanel

        private javax.swing.JPanel dualLeftPanel
        Left panel of the dual panel view.
      • dualRightPanel

        private javax.swing.JPanel dualRightPanel
        Right panel of the dual panel view.
      • firstTimeVolView

        private boolean firstTimeVolView
        Keep track of whether we're switching to the volume renderer for the first time.
      • flythruMoveControl

        private JPanelFlythruMove flythruMoveControl
        Fly through movement control panel.
      • flythruMovePanel

        private javax.swing.JPanel flythruMovePanel
        View panel contains the fly thru control panel.
      • flythruPanel

        private javax.swing.JPanel flythruPanel
        Fly through panel.
      • flythruRender

        private FlythruRender flythruRender
        Reference to fly through renderer.
      • flythruSurfaceButton

        private javax.swing.JButton flythruSurfaceButton
        Surface load button.
      • flythruTabVector

        private java.util.Vector flythruTabVector
        DOCUMENT ME!
      • flyThruToolbar

        private javax.swing.JToolBar flyThruToolbar
        Flythru toolbar.
      • histoLUTPanel

        private javax.swing.JPanel histoLUTPanel
        Control panel for the surface renderer.
      • imageAOriginal

        private ModelImage imageAOriginal
        Reference to the imageA original copy.
      • imageOrientation

        private int imageOrientation
        Image orientation: coronal, sagittal, axial, unknown.
      • imagePanel

        private javax.swing.JPanel imagePanel
        The image panel to hold one Canvas3D.
      • isBrainsurfaceFlattenerEnable

        private boolean isBrainsurfaceFlattenerEnable
        Indicate if the brainsurface flattener render is enabled from the resample dialog or not.
      • isEndoscopyEnable

        private boolean isEndoscopyEnable
        Indicate if the fly through render is enabled from the resample dialog or not.
      • isRayCastEnable

        private boolean isRayCastEnable
        Indicate if the raycast render is enabled from the resample dialog or not.
      • isShearWarpEnable

        private boolean isShearWarpEnable
        Indicate if the shear warp render is enabled from the resample dialog or not.
      • isSurfaceRenderEnable

        private boolean isSurfaceRenderEnable
        Indicate if the surface render is enabled from the resample dialog or not.
      • isSurfaceViewEnable

        private boolean isSurfaceViewEnable
        Indicate if the surface view is enabled from the resample dialog or not.
      • leftPanelRenderMode

        private int leftPanelRenderMode
        The left panel renderer mode.
      • lightPanel

        private javax.swing.JPanel lightPanel
        DOCUMENT ME!
      • m_akPlaneRender

        private PlaneRender[] m_akPlaneRender
        The three slice views displayed as texture-mapped polygons:.
      • m_kBrainsurfaceFlattenerPanel

        private javax.swing.JPanel m_kBrainsurfaceFlattenerPanel
        Control panels for the Brainsurface Flattener:.
      • m_kGeodesicPanel

        private javax.swing.JPanel m_kGeodesicPanel
        Control panel for drawing geodesic curves.
      • m_kSculptPanel

        private javax.swing.JPanel m_kSculptPanel
        Control panel for volume sculpting.
      • maxPanelWidth

        private int maxPanelWidth
        The max width of the control panels.
      • menuBar

        private javax.swing.JMenuBar menuBar
        Menu bar.
      • mousePanel

        private javax.swing.JPanel mousePanel
        DOCUMENT ME!
      • opacityPanel

        private javax.swing.JPanel opacityPanel
        DOCUMENT ME!
      • paddingImageA

        private ModelImage paddingImageA
        Padding imageA with blank images feeding.
      • paddingImageB

        private ModelImage paddingImageB
        Padding imageB with blank images feeding.
      • paintGrowDialog

        private JDialogPaintGrow paintGrowDialog
        Control panels of the triplanar view.
      • panelHistogram

        private JFrameHistogram panelHistogram
        LUT control panel of the gray scale image.
      • parallelButton

        private javax.swing.JToggleButton parallelButton
        Rendering parallel rotation button.
      • probePanel

        private javax.swing.JPanel probePanel
        DOCUMENT ME!
      • radioCOMPOSITE

        private javax.swing.JRadioButton radioCOMPOSITE
        Radio button of the COMPOSITE mode option.
      • radioCOMPOSITEShear

        private javax.swing.JRadioButton radioCOMPOSITEShear
        Radio button of the COMPOSITE mode option.
      • radioMIP

        private javax.swing.JRadioButton radioMIP
        Radio button of the MIP mode option.
      • radioMIPShear

        private javax.swing.JRadioButton radioMIPShear
        Radio button of the MIP mode option.
      • radioSURFACE

        private javax.swing.JRadioButton radioSURFACE
        Radio button of the SURFACE mode option.
      • radioSURFACEFAST

        private javax.swing.JRadioButton radioSURFACEFAST
        Radio button of the SURFACE mode option.
      • radioSURFACEShear

        private javax.swing.JRadioButton radioSURFACEShear
        Radio button of the SURFACE mode option.
      • radioSurrenderCOMPOSITE

        private javax.swing.JRadioButton radioSurrenderCOMPOSITE
        Radio button of the surface render composite mode.
      • radioSurrenderLIGHT

        private javax.swing.JRadioButton radioSurrenderLIGHT
        Radio button of the surface render lighting mode.
      • radioXRAY

        private javax.swing.JRadioButton radioXRAY
        Radio button of the XRAY mode option.
      • radioXRAYShear

        private javax.swing.JRadioButton radioXRAYShear
        Radio button of the XRAY mode option.
      • raisedbevel

        private javax.swing.border.Border raisedbevel
        Panel Border view.
      • loweredbevel

        private javax.swing.border.Border loweredbevel
        Panel Border view.
      • compound

        private javax.swing.border.Border compound
        Panel Border view.
      • redBorder

        private javax.swing.border.Border redBorder
        Panel Border view.
      • etchedBorder

        private javax.swing.border.Border etchedBorder
        Panel Border view.
      • pressedBorder

        private javax.swing.border.Border pressedBorder
        Panel Border view.
      • raycastCameraPanel

        private javax.swing.JPanel raycastCameraPanel
        DOCUMENT ME!
      • raycastOptionsPanel

        private javax.swing.JPanel raycastOptionsPanel
        Control panels for the raycast render.
      • raycastTabVector

        private java.util.Vector raycastTabVector
        DOCUMENT ME!
      • rayCastToolBar

        private javax.swing.JToolBar rayCastToolBar
        Raycast toolbar.
      • resampleDialog

        private JDialogVolViewResample resampleDialog
        Reference to resample dialog, use to null out the resample dialog in this frame.
      • rfaButton

        private javax.swing.JButton rfaButton
        Button for RFA.
      • rfaSeparator

        private javax.swing.JButton rfaSeparator
        RFA separator.
      • rightPane

        private javax.swing.JSplitPane rightPane
        The view pane that contains the image view and tri-planar view panels.
      • rightPanelRenderMode

        private int rightPanelRenderMode
        The right panel renderer mode.
      • screenWidth

        private int screenWidth
        Screen width, screen height.
      • screenHeight

        private int screenHeight
        Screen width, screen height.
      • sculptHeight

        private int sculptHeight
        Sculpt region height.
      • sculptWidth

        private int sculptWidth
        Sculpt region width.
      • shearwarpCameraPanel

        private javax.swing.JPanel shearwarpCameraPanel
        DOCUMENT ME!
      • shearwarpOptionsPanel

        private javax.swing.JPanel shearwarpOptionsPanel
        Control panels for the shearwarp render.
      • shearwarpTabVector

        private java.util.Vector shearwarpTabVector
        DOCUMENT ME!
      • shearWarpToolBar

        private javax.swing.JToolBar shearWarpToolBar
        Shearwarp toolbar.
      • slicePanel

        private javax.swing.JPanel slicePanel
        DOCUMENT ME!
      • storeTabbedPaneIndex

        private int storeTabbedPaneIndex
        Previoius tab index recorder.
      • surfacePanel

        private javax.swing.JPanel surfacePanel
        DOCUMENT ME!
      • surRender

        private SurfaceRender surRender
        Three types of renderer.
      • surView

        private SurfaceView surView
        Surface View reference
      • surTabVector

        private java.util.Vector surTabVector
        For each render, use the vector to store the currently active tabs.
      • triImagePanel

        private javax.swing.JPanel triImagePanel
        Tri image planar render panels.
      • unparallelButton

        private javax.swing.JToggleButton unparallelButton
        Rendering unparallel rotaion button.
      • viewPanel

        private javax.swing.JPanel viewPanel
        DOCUMENT ME!
      • viewToolBar

        private javax.swing.JToolBar viewToolBar
        The top one render view switch toolbar.
      • volToolBar

        private javax.swing.JToolBar volToolBar
        Surface Render toolbar.
    • Constructor Detail

      • ViewJFrameVolumeView

        public ViewJFrameVolumeView​(ModelImage _imageA,
                                    ModelLUT LUTa,
                                    ModelRGB _RGBTA,
                                    ModelImage _imageB,
                                    ModelLUT LUTb,
                                    ModelRGB _RGBTB,
                                    int _leftPanelRenderMode,
                                    int _rightPanelRenderMode,
                                    JDialogVolViewResample _resampleDialog)
        Make a volume rendering frame, which contains the toolbars on the top, control panel on the left, the volume rendering panel on the right, and the three orthogonal view ( axial, sagittal, coronal, views) on the bottom right.
        Parameters:
        _imageA - First image to display
        LUTa - LUT of the imageA (if null grayscale LUT is constructed)
        _RGBTA - RGB table of imageA
        _imageB - Second loaded image
        LUTb - LUT of the imageB
        _RGBTB - RGB table of imageB
        _leftPanelRenderMode - shear warp render mode enabled or not
        _rightPanelRenderMode - volume rendering panel render mode ( Raycast, shearwarp, etc).
        _resampleDialog - resample dialog reference.
    • Method Detail

      • getRendererProgressBar

        public static final javax.swing.JProgressBar getRendererProgressBar()
        Retrieve the progress bar used in the volume renderer (the one in the upper right hand corner).
        Returns:
        the volume renderer progress bar
      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Calls various methods depending on the action.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Specified by:
        actionPerformed in class ViewJFrameBase
        Parameters:
        event - Event that triggers function.
      • addAttachedSurfaces

        public void addAttachedSurfaces()
        Add any attached surfaces the current image has in its file info (if the file info is in the xml format).
      • addBranch

        public void addBranch​(javax.media.j3d.BranchGroup kBranch,
                              ModelTriangleMesh kMesh,
                              javax.vecmath.Point3f kCenter)
        Updates the surRender -- adds a BranchGroup to the main Display.
        Parameters:
        kBranch - BranchGroup branch group
        kMesh - ModelTriangleMesh surface mesh
        kCenter - Point3f center of mass
      • addFlightPath

        public void addFlightPath()
        Updates the surRender to display the flythru flight path from the flythruRender.
      • addSurface

        public void addSurface​(java.lang.String dir,
                               java.io.File file)
        Adding surface to the 3D texuture volume.
        Parameters:
        dir - surface file direcotry
        file - surface file name
      • buildBrainsurfaceFlattener

        public void buildBrainsurfaceFlattener()
        Build the Brainsurface Flattener panel:
      • buildCameraPanel

        public void buildCameraPanel()
        Build the camera control panel for the surface render.
      • buildClipPanel

        public void buildClipPanel()
        Build the clipping control panel for the surface render.
      • buildDisplayPanel

        public void buildDisplayPanel()
        Build the display control panel for the surface render.
      • buildFlythruMovePanel

        public void buildFlythruMovePanel()
        Build the flythru move control panel.
      • buildFlythruPanel

        public void buildFlythruPanel()
        Build the flythru control panel.
      • buildGeodesic

        public void buildGeodesic()
        Build the Geodesic control panel.
      • buildHistoLUTPanel

        public void buildHistoLUTPanel()
        The histogram control panel of the lookup table.
      • buildLabelPanel

        public void buildLabelPanel()
        The label panel of the x, y, z slider position.
        Overrides:
        buildLabelPanel in class ViewJFrameBase
      • buildLightPanel

        public void buildLightPanel()
        Build the light control panel for the surface render.
      • buildMousePanel

        public void buildMousePanel()
        Build the mouse control panel for the raycast render.
      • buildOpacityPanel

        public void buildOpacityPanel()
        Build the volume opacity control panel for the surface render.
      • buildProbePanel

        public void buildProbePanel()
        Build the adding surface control panel for the surface render.
      • buildRayCastCameraPanel

        public void buildRayCastCameraPanel()
        Build the camera control panel for the raycast render.
      • buildRayCastOptions

        public void buildRayCastOptions()
        Build the view control panel for the raycast render.
      • buildSculpt

        public void buildSculpt()
        Build the Sculpturing control panel.
      • buildShearWarpCameraPanel

        public void buildShearWarpCameraPanel()
        Build the camera control panel for the shearwarp render.
      • buildShearWarpOptions

        public void buildShearWarpOptions()
        Build the view control panel for the shearwarp render.
      • buildSlicePanel

        public void buildSlicePanel()
        Build the slices control panel for the surface render.
      • buildSurfacePanel

        public void buildSurfacePanel()
        Build the adding surface control panel for the surface render.
      • buildViewPanel

        public void buildViewPanel()
        Build the view control panel for the surface render.
      • calcShearWarpImage

        public void calcShearWarpImage​(ModelImage _imageA,
                                       ModelImage _imageB)
        Transform the image into shear warp image, which has the same resolution.
        Parameters:
        _imageA - the reference to image A.
        _imageB - the reference to image B.
      • componentResized

        public void componentResized​(java.awt.event.ComponentEvent event)
        Method called when a component resize event is generated. This method snaps the size of the frame and pagePanel to the nearest row, column sizing (so the gridRow and gridColumn and page layout may change).
        Specified by:
        componentResized in interface java.awt.event.ComponentListener
        Overrides:
        componentResized in class ViewJFrameBase
        Parameters:
        event - frame resize event
      • constructRenderers

        public void constructRenderers()
        Construct the volume rendering methods based on the choices made from the resample dialog. This method is called by the Resample dialog.
      • disableTargetPointPicking

        public void disableTargetPointPicking()
        Disable target point for the RFA probe from within the plane renderer.
      • disposeLocal

        public void disposeLocal​(boolean flag)
        Dispose memory.
        Parameters:
        flag - call super dispose or not
      • doPadding

        public void doPadding​(int[] extents,
                              int[] volExtents)
        Insert the blank images to the end of image. Padding the image to power of 2.
        Parameters:
        extents - int[] original extents
        volExtents - int[] padding to power of 2 extents.
      • doResample

        public void doResample​(int[] volExtents,
                               float[] newRes,
                               boolean forceResample,
                               int nDim,
                               int iFilterType)
        Resample the images to power of 2.
        Parameters:
        volExtents - resampled volume extents
        newRes - new resampled resolution
        forceResample - resampled or not
        nDim - number of dimensions
        iFilterType - type of sample filter, may be one of 7 different filters: TriLinear Interpolation, NearestNeighbor, CubicBSpline, QuadraticBSpline, CubicLagragian, QuinticLagragian, HepticLagragian, or WindowedSinc (see AlgorithmTransform.java).
      • drawBrainSurfaceFlattenerPoint

        public void drawBrainSurfaceFlattenerPoint​(javax.vecmath.Point3f kStart,
                                                   int[] aiIndex,
                                                   int iWhich)
        Draws the point selected on the Mesh for the brainsurfaceFlattener.
        Parameters:
        kStart - Ruida please add comment
        aiIndex - Ruida please add comment
        iWhich - Ruida please add comment
      • drawRFAPoint

        public void drawRFAPoint​(javax.vecmath.Point3f kPoint)
        Called from the PlaneRender class when a new Probe Entry Point has been selected. The point is passed into each PlaneRender class for display, and to the SurfaceRender class for display
        Parameters:
        kPoint - target point position
      • enableTargetPointPicking

        public void enableTargetPointPicking()
        Enable target point for the RFA probe from within the plane renderer.
      • getBlendValue

        public int getBlendValue()
        Get the imageA and imageB blending value from the PlaneRender.
        Returns:
        blendValue blender slider value.
      • getHistoLUTActiveImage

        public ModelImage getHistoLUTActiveImage()
        Returns which image is active in the HistoLUT -- either imageA or imageB. Called by the PlaneRenderer object to determine which LUT to update based on dragging the right-mouse in the PlaneRender window:
        Returns:
        ModelImage, either imageA or imageB, depending on which is selected in the HistoLUT
      • getHistoRGBActiveImage

        public ModelImage getHistoRGBActiveImage()
        Returns which image is active in the HistoRGB -- either imageA or imageB. Called by the PlaneRenderer object to determine which LUT to update based on dragging the right-mouse in the PlaneRender window:
        Returns:
        ModelImage, either imageA or imageB, depending on which is selected in the HistoLUT
      • getImageOriginal

        public ModelImage getImageOriginal()
        Get a reference to the original image we passed into the renderer from MIPAV (non-cloned).
        Returns:
        the original image
      • getLUTDialog

        public JPanelHistoLUT getLUTDialog()
        Deprecated.
        Get the LUT panel (only should be used with grayscale images).
        Returns:
        the histo LUT panel
      • getProbeDialog

        public JPanelProbe getProbeDialog()
        Return the rfa probe panel.
        Returns:
        the rfa probe panel
      • getRGBDialog

        public JPanelHistoRGB getRGBDialog()
        Deprecated.
        Get the RGB panel (only should be used with color images).
        Returns:
        the histo RGB panel
      • getSegmentationImage

        public ModelImage getSegmentationImage()
        Return the segmentation region map image which contains info on where the vascualture, etc are located.
        Returns:
        (vessel, etc) segmentation image
      • getViewPanel

        public javax.swing.JSplitPane getViewPanel()
        Return the image panel.
        Returns:
        JSplitPane
      • insertFlythruTab

        public void insertFlythruTab​(java.lang.String _name,
                                     javax.swing.JPanel _panel)
        Insert tab into the flythru tab list ( flythru render ) for backup.
        Parameters:
        _name - flythru render control panel name
        _panel - flythru render control panel
      • insertRaycastTab

        public void insertRaycastTab​(java.lang.String _name,
                                     javax.swing.JPanel _panel)
        Insert tab into the raycast tab list ( raycast render ) for backup.
        Parameters:
        _name - raycast render control panel name
        _panel - raycast render control panel
      • insertShearwarpTab

        public void insertShearwarpTab​(java.lang.String _name,
                                       javax.swing.JPanel _panel)
        Insert tab into the shear warp tab list ( shear warp render ) for backup.
        Parameters:
        _name - shear warp render control panel name
        _panel - shear warp render control panel
      • insertSurfaceTab

        public void insertSurfaceTab​(java.lang.String _name,
                                     javax.swing.JPanel _panel)
        Insert tab into the surface tab list ( SurfaceRender ) for backup.
        Parameters:
        _name - surface render control panel name
        _panel - surface render control panel
      • insertTab

        public void insertTab​(java.lang.String _name,
                              javax.swing.JPanel _panel)
        Insert the new tab into the current visible tab list.
        Parameters:
        _name - control panel name
        _panel - control panel
      • isBrainSurfaceFlattenerPickEnabled

        public boolean isBrainSurfaceFlattenerPickEnabled()
        Returns the pick enabled state of the brainsurfaceFlattener.
        Returns:
        flag brain surface pickable or not.
      • isGeodesicEnable

        public boolean isGeodesicEnable()
        Check whether the Geodesic drawing is enabled or not.
        Returns:
        boolean true Geodesic drawing enabled, false Geodesic disable.
      • itemStateChanged

        public void itemStateChanged​(java.awt.event.ItemEvent event)
        Sets the flags for the getOptionses and resets labels.
        Specified by:
        itemStateChanged in interface java.awt.event.ItemListener
        Parameters:
        event - Event that triggered this function.
      • mouseClicked

        public void mouseClicked​(java.awt.event.MouseEvent e)
        Handle the double mouse click event when the use swith between the dual image panel view.
        Specified by:
        mouseClicked in interface java.awt.event.MouseListener
        Parameters:
        e - MouseEvent
      • mouseEntered

        public void mouseEntered​(java.awt.event.MouseEvent e)
        Methods do nothing, implemented mouseListener.
        Specified by:
        mouseEntered in interface java.awt.event.MouseListener
        Parameters:
        e - MouseEvent
      • mouseExited

        public void mouseExited​(java.awt.event.MouseEvent e)
        Methods do nothing, implemented mouseListener.
        Specified by:
        mouseExited in interface java.awt.event.MouseListener
        Parameters:
        e - MouseEvent
      • mousePressed

        public void mousePressed​(java.awt.event.MouseEvent e)
        Methods do nothing, implemented mouseListener.
        Specified by:
        mousePressed in interface java.awt.event.MouseListener
        Parameters:
        e - MouseEvent
      • mouseReleased

        public void mouseReleased​(java.awt.event.MouseEvent e)
        Methods do nothing, implemented mouseListener.
        Specified by:
        mouseReleased in interface java.awt.event.MouseListener
        Parameters:
        e - MouseEvent
      • removeBranch

        public void removeBranch​(javax.media.j3d.BranchGroup kBranch,
                                 boolean bRemoveMesh)
        Updates the surRender -- removes a BranchGroup to the main Display.
        Parameters:
        kBranch - BranchGroup surface branch group reference.
        bRemoveMesh - boolean flag to remove the surface mesh or not
      • removeControls

        public void removeControls()
        Required by the parent super class, do nothing.
        Specified by:
        removeControls in class ViewJFrameBase
      • removeProbeLine

        public void removeProbeLine()
        Remove the red line showing where the probe will pass through. Used when changing the probe target point through the tri-images.
      • resetAxisX

        public void resetAxisX()
        Reset image volume orieint along X axis.
      • resetAxisY

        public void resetAxisY()
        Reset image volume orieint along Y axis.
      • resetImage

        public void resetImage()
        Reset image volume orieint along Z axis.
      • setActiveImage

        public void setActiveImage​(int active)
        Required by the parent super class, do nothing.
        Specified by:
        setActiveImage in class ViewJFrameBase
        Parameters:
        active - int
      • setAlphaBlend

        public void setAlphaBlend​(int value)
        Required by the parent super class, do nothing.
        Specified by:
        setAlphaBlend in class ViewJFrameBase
        Parameters:
        value - DOCUMENT ME!
      • setControls

        public void setControls()
        Required by the parent super class, do nothing.
        Specified by:
        setControls in class ViewJFrameBase
      • setEnabled

        public void setEnabled​(boolean flag)
        Do nothing methods, just extend the ViewJframeBase.
        Specified by:
        setEnabled in class ViewJFrameBase
        Parameters:
        flag - DOCUMENT ME!
      • setFlythruColor

        public void setFlythruColor​(java.awt.Color _color)
        Set the flythru surface color.
        Parameters:
        _color - ModelLUT table
      • setImageB

        public void setImageB​(ModelImage _imageB)
        Required by the parent super class, do nothing.
        Specified by:
        setImageB in class ViewJFrameBase
        Parameters:
        _imageB - image to set the frame to
      • setImageOriginal

        public void setImageOriginal​(ModelImage img)
        Set the reference to the original image we passed into the renderer from MIPAV (non-cloned).
        Parameters:
        img - the original image
      • setLUTa

        public void setLUTa​(ModelLUT LUT)
        Accessor that sets the LUT.
        Overrides:
        setLUTa in class ViewJFrameBase
        Parameters:
        LUT - the LUT
      • setLUTb

        public void setLUTb​(ModelLUT LUT)
        Accessor that sets the LUT.
        Overrides:
        setLUTb in class ViewJFrameBase
        Parameters:
        LUT - the LUT
      • setMaterialShininess

        public void setMaterialShininess​(float value)
        Set material ( texture or voxels ) shininess value.
        Parameters:
        value - float
      • setPaintBitmapSwitch

        public void setPaintBitmapSwitch​(boolean paintBitmapSwitch)
        Required by the parent super class, do nothing.
        Specified by:
        setPaintBitmapSwitch in class ViewJFrameBase
        Parameters:
        paintBitmapSwitch - boolean
      • setPathPosition

        public void setPathPosition​(javax.vecmath.Point3f kPosition,
                                    javax.vecmath.Point3f kScaledPosition)
        Called when the view position changes in the FlyThruRenderer, updates the position representation in the Slice views:
        Parameters:
        kPosition - center position.
        kScaledPosition - position of the flythru view point along the flythru path.
      • setPositionLabels

        public void setPositionLabels​(WildMagic.LibFoundation.Mathematics.Vector3f position)
        Sets the position labels.
        Parameters:
        position - the slice positions in FileCoordinates.
      • setRGBTA

        public void setRGBTA​(ModelRGB RGBT)
        Sets the RGB table for ARGB image A.
        Specified by:
        setRGBTA in class ViewJFrameBase
        Parameters:
        RGBT - RGB table
      • setRGBTB

        public void setRGBTB​(ModelRGB RGBT)
        Sets the RGB table for image B.
        Specified by:
        setRGBTB in class ViewJFrameBase
        Parameters:
        RGBT - RGB table
      • setRightPanelCanvas

        public void setRightPanelCanvas()
        Update the right panel when finish loading Endoscopy images.
      • setSegmentationImage

        public void setSegmentationImage​(ModelImage img)
        Set the image which we can check to see if the probe is hitting anything important (such as vessels, etc).
        Parameters:
        img - segmentation image
      • setSlice

        public void setSlice​(int slice)
        Required by the parent super class, do nothing.
        Specified by:
        setSlice in interface ViewImageUpdateInterface
        Parameters:
        slice - int
      • setSliceFromPlane

        public void setSliceFromPlane​(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
        Sets the position of the slices in the SurfaceRender and PlaneRender objects. Called from the PlaneRender class.
        Parameters:
        center - the new slice positions in FileCoordinates
      • setSliceFromSurface

        public void setSliceFromSurface​(WildMagic.LibFoundation.Mathematics.Vector3f center)
        Sets the position of the slices in the PlaneRender. Called from the SurfaceRender class.
        Parameters:
        center - the new slice positions in FileCoordinates
      • setSliceHairColor

        public void setSliceHairColor​(int iView,
                                      java.awt.Color color)
        Sets the color for the PlaneRender iView (AXIAL, SAGITTAL, CORONAL) slice.
        Parameters:
        iView - (AXIAL, SAGITTAL, CORONAL)
        color - the new axis color attribute.
      • setTimeSlice

        public void setTimeSlice​(int slice)
        Required by the parent super class, do nothing.
        Specified by:
        setTimeSlice in interface ViewImageUpdateInterface
        Parameters:
        slice - int
      • setTitle

        public void setTitle()
        Set the title of the frame with the image name of slice location.
        Specified by:
        setTitle in class ViewJFrameBase
      • stateChanged

        public void stateChanged​(javax.swing.event.ChangeEvent event)
        Switch between slices control button and surface render button of the surface toolbar.
        Specified by:
        stateChanged in interface javax.swing.event.ChangeListener
        Overrides:
        stateChanged in class ViewJFrameBase
        Parameters:
        event - ChangeEvent
      • switchTabList

        public void switchTabList​(java.lang.String command)
        Update the tabbed pane when switch view buttons in the View toolbar.
        Parameters:
        command - command of the renderer's view toolbar button click.
      • updateImages

        public boolean updateImages()
        Update images in surface render, raycast render and shearwarp render.
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Returns:
        boolean boolean confirming successful update
      • updateImages

        public boolean updateImages​(boolean forceShow)
        This methods calls corresponding render to update images without LUT changes.
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Parameters:
        forceShow - forces show to reimport image and calc. java image
        Returns:
        boolean confirming successful update
      • updateImages

        public boolean updateImages​(ModelLUT LUTa,
                                    ModelLUT LUTb,
                                    boolean forceShow,
                                    int interpMode)
        This methods calls corresponding render to update images with LUT changes.
        Specified by:
        updateImages in interface ViewImageUpdateInterface
        Parameters:
        LUTa - LUT used to update imageA
        LUTb - LUT used to update imageB
        forceShow - forces show to reimport image and calc. java image
        interpMode - image interpolation method (Nearest or Smooth)
        Returns:
        boolean confirming successful update
      • updateProbePos

        public void updateProbePos()
        The navigation mode update the probe position in 3D texture volume. Not used now. Might be used later on.
      • updateSliceData

        public void updateSliceData()
        Causes the PlaneRender objects to update the texture maps when the underlying ModelImage changes.
      • updateSurRenderWinlevel

        public void updateSurRenderWinlevel​(boolean flag)
        Hack. Update the the surface render win-level from the plane renderer.
        Parameters:
        flag - true update win-level, false not update.
      • volumeRepaint

        public void volumeRepaint()
        Repaint the volume.
      • windowClosing

        public void windowClosing​(java.awt.event.WindowEvent event)
        Closes window and disposes of frame and component.
        Specified by:
        windowClosing in interface java.awt.event.WindowListener
        Overrides:
        windowClosing in class ViewJFrameBase
        Parameters:
        event - Event that triggered function
      • buildMenu

        protected javax.swing.JMenuBar buildMenu()
        Builds menus for the tri-planar view.
        Returns:
        DOCUMENT ME!
      • buildToolbars

        protected void buildToolbars()
        Builds the toolbars for the tri-planar view.
      • configureFrame

        protected void configureFrame()
        Constructs main frame structures for image canvas.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Cleans up memory from gc.
        Overrides:
        finalize in class ViewJFrameBase
        Throws:
        java.lang.Throwable - DOCUMENT ME!
      • addToolbar

        private void addToolbar()
        Add surface volume renderer control buttons.
      • buildFlyThruToolbar

        private void buildFlyThruToolbar()
        Build the fly through toolbar.
      • buildRayCastToolbar

        private void buildRayCastToolbar()
        Build the raycast toolbar.
      • buildShearWarpToolbar

        private void buildShearWarpToolbar()
        Build the shearwarp toolbar.
      • buildSurRenderToolbar

        private void buildSurRenderToolbar()
        Build the surface render toolbar.
      • buildSurfaceViewToolbar

        private void buildSurfaceViewToolbar()
        The the top one volume view toolbar.
      • buildViewToolbar

        private void buildViewToolbar()
        The the top one volume view toolbar.
      • enableDualPanelRender

        private void enableDualPanelRender()
        Enable dual panel renders.
      • enableFlyThruRender

        private void enableFlyThruRender()
        Enable the fly through frame layout.
      • enableShearWarpRender

        private void enableShearWarpRender()
        Enable the shear warp render.
      • enableSurfaceRender

        private void enableSurfaceRender()
        Enable surface render.
      • enableVolumeRender

        private void enableVolumeRender()
        Enable volume render.
      • resetLUTMinMax

        private void resetLUTMinMax​(ModelImage image,
                                    ModelLUT lut)
        Calculate the LUT from the resampled image.
        Parameters:
        image - ModelImage reference
        lut - ModelLUT reference
      • resizePanel

        private void resizePanel()
        Method that resizes the frame and adjusts the rows, columns as needed.
      • set3DModelPosition

        private void set3DModelPosition​(WildMagic.LibFoundation.Mathematics.Vector3f kPosition)
        Sets the 3DModel position label.
        Parameters:
        position - DOCUMENT ME!
      • setPatientSlicePosition

        private void setPatientSlicePosition​(WildMagic.LibFoundation.Mathematics.Vector3f position)
        Sets the PatientSlice position label.
        Parameters:
        position - DOCUMENT ME!
      • setRFAToolbarVisible

        private void setRFAToolbarVisible​(boolean flag)
        Set the RFA button visible or not.
        Parameters:
        flag - Set the RFA button visible or not
      • setRenderPerspective

        public void setRenderPerspective​(boolean bEnable)