Class ViewJFrameVolumeView

All Implemented Interfaces:
ViewImageUpdateInterface, ActionListener, ComponentListener, ItemListener, MouseListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants

public class ViewJFrameVolumeView extends ViewJFrameBase implements MouseListener, ItemListener, 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • NONE

      public static final int NONE
      Render mode values.
      See Also:
    • RAYCAST

      public static final int RAYCAST
      DOCUMENT ME!
      See Also:
    • SHEARWARP

      public static final int SHEARWARP
      DOCUMENT ME!
      See Also:
    • SURFACE

      public static final int SURFACE
      DOCUMENT ME!
      See Also:
    • DUALPANEL

      public static final int DUALPANEL
      DOCUMENT ME!
      See Also:
    • ENDOSCOPY

      public static final int ENDOSCOPY
      DOCUMENT ME!
      See Also:
    • BRAINSURFACE_FLATTENER

      public static final int BRAINSURFACE_FLATTENER
      DOCUMENT ME!
      See Also:
    • SURFACEVIEW

      public static final int SURFACEVIEW
      DOCUMENT ME!
      See Also:
    • rendererProgressBar

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

      protected 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 JLabel modelViewLabel
      Labels for the current position in 3D ModelView coordinates:.
    • modelViewLabelVals

      protected JLabel[] modelViewLabelVals
      DOCUMENT ME!
    • orient

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

      protected JPanel panelToolbar
      Panel that holds the toolbars.
    • patientSliceLabel

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

      protected 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 Font serif12
      Fonts, same as MipavUtil.font12 and MipavUtil.font12B.
    • serif12B

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

      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 JPanel cameraPanel
      DOCUMENT ME!
    • clipBox

      private JPanel clipBox
      DOCUMENT ME!
    • clipButton

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

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

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

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

      private JPanel clipPanel
      DOCUMENT ME!
    • clipPlaneButton

      private JButton clipPlaneButton
      Button to invoke clipping planes.
    • clipSaveButton

      private JButton clipSaveButton
      Button to save clipped region.
    • displayPanel

      private JPanel displayPanel
      DOCUMENT ME!
    • dualImagePane

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

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

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

      private 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.
    • flythruControl

      private JPanelVirtualEndoscopySetup flythruControl
      Fly through setup control panel.
    • flythruMoveControl

      private JPanelFlythruMove flythruMoveControl
      Fly through movement control panel.
    • flythruMovePanel

      private JPanel flythruMovePanel
      View panel contains the fly thru control panel.
    • flythruOptions

      private FlythruRender.SetupOptions flythruOptions
      Fly through options.
    • flythruPanel

      private JPanel flythruPanel
      Fly through panel.
    • flythruRender

      private FlythruRender flythruRender
      Reference to fly through renderer.
    • flythruSurfaceButton

      private JButton flythruSurfaceButton
      Surface load button.
    • flythruTabVector

      private Vector flythruTabVector
      DOCUMENT ME!
    • flyThruToolbar

      private JToolBar flyThruToolbar
      Flythru toolbar.
    • histoLUTPanel

      private 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 JPanel imagePanel
      The image panel to hold one Canvas3D.
    • intensityDialog

      private JDialogIntensityPaint intensityDialog
      DOCUMENT ME!
    • 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 JPanel lightPanel
      DOCUMENT ME!
    • m_akPlaneRender

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

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

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

      private JPanel m_kSculptPanel
      Control panel for volume sculpting.
    • maxPanelWidth

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

      private JPanel mousePanel
      DOCUMENT ME!
    • opacityDialog

      private JDialogOpacityControls opacityDialog
      DOCUMENT ME!
    • opacityPanel

      private 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 JToggleButton parallelButton
      Rendering parallel rotation button.
    • probePanel

      private JPanel probePanel
      DOCUMENT ME!
    • radioCOMPOSITE

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

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

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

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

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

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

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

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

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

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

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

      private Border raisedbevel
      Panel Border view.
    • loweredbevel

      private Border loweredbevel
      Panel Border view.
    • compound

      private Border compound
      Panel Border view.
    • redBorder

      private Border redBorder
      Panel Border view.
    • etchedBorder

      private Border etchedBorder
      Panel Border view.
    • pressedBorder

      private Border pressedBorder
      Panel Border view.
    • raycastCameraPanel

      private JPanel raycastCameraPanel
      DOCUMENT ME!
    • raycastOptionsPanel

      private JPanel raycastOptionsPanel
      Control panels for the raycast render.
    • raycastRender

      private VolumeRendererRayCast raycastRender
      DOCUMENT ME!
    • raycastTabVector

      private Vector raycastTabVector
      DOCUMENT ME!
    • rayCastToolBar

      private JToolBar rayCastToolBar
      Raycast toolbar.
    • resampleDialog

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

      private JButton rfaButton
      Button for RFA.
    • rfaSeparator

      private JButton rfaSeparator
      RFA separator.
    • rightPane

      private 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 JPanel shearwarpCameraPanel
      DOCUMENT ME!
    • shearwarpOptionsPanel

      private JPanel shearwarpOptionsPanel
      Control panels for the shearwarp render.
    • shearwarpRender

      private VolumeRendererShearWarp shearwarpRender
      DOCUMENT ME!
    • shearwarpTabVector

      private Vector shearwarpTabVector
      DOCUMENT ME!
    • shearWarpToolBar

      private JToolBar shearWarpToolBar
      Shearwarp toolbar.
    • slicePanel

      private JPanel slicePanel
      DOCUMENT ME!
    • storeTabbedPaneIndex

      private int storeTabbedPaneIndex
      Previoius tab index recorder.
    • surfacePanel

      private JPanel surfacePanel
      DOCUMENT ME!
    • surRender

      private SurfaceRender surRender
      Three types of renderer.
    • surView

      private SurfaceView surView
      Surface View reference
    • surTabVector

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

      private ViewToolBarBuilder toolbarBuilder
      Toolbar builder reference.
    • triImagePanel

      private JPanel triImagePanel
      Tri image planar render panels.
    • unparallelButton

      private JToggleButton unparallelButton
      Rendering unparallel rotaion button.
    • viewPanel

      private JPanel viewPanel
      DOCUMENT ME!
    • viewToolBar

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

      private JToolBar volToolBar
      Surface Render toolbar.
  • Constructor Details

    • 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 Details

    • getRendererProgressBar

      public static final 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(ActionEvent event)
      Calls various methods depending on the action.
      Specified by:
      actionPerformed in interface 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(String dir, 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(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 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.
    • getControls

      public ViewControlsImage getControls()
      Required by the parent super class, do nothing.
      Specified by:
      getControls in class ViewJFrameBase
      Returns:
      null
    • 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
    • getImageA

      public ModelImage getImageA()
      Get the image A reference.
      Specified by:
      getImageA in class ViewJFrameBase
      Returns:
      imageA model image A reference.
    • getImageB

      public ModelImage getImageB()
      Get the imageB reference.
      Specified by:
      getImageB in class ViewJFrameBase
      Returns:
      imageB model image B reference.
    • 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
    • getHistogramDialog

      public JFrameHistogram getHistogramDialog()
    • 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 JSplitPane getViewPanel()
      Return the image panel.
      Returns:
      JSplitPane
    • insertFlythruTab

      public void insertFlythruTab(String _name, 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(String _name, 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(String _name, 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(String _name, 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(String _name, 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(ItemEvent event)
      Sets the flags for the getOptionses and resets labels.
      Specified by:
      itemStateChanged in interface ItemListener
      Parameters:
      event - Event that triggered this function.
    • mouseClicked

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

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

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

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

      public void mouseReleased(MouseEvent e)
      Methods do nothing, implemented mouseListener.
      Specified by:
      mouseReleased in interface 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(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, 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(ChangeEvent event)
      Switch between slices control button and surface render button of the surface toolbar.
      Specified by:
      stateChanged in interface ChangeListener
      Overrides:
      stateChanged in class ViewJFrameBase
      Parameters:
      event - ChangeEvent
    • switchTabList

      public void switchTabList(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.
    • updateImageExtents

      public boolean updateImageExtents()
      Update image extends from the ModelImage. Now, disabled.
      Specified by:
      updateImageExtents in interface ViewImageUpdateInterface
      Specified by:
      updateImageExtents in class ViewJFrameBase
      Returns:
      DOCUMENT ME!
      See Also:
    • 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(WindowEvent event)
      Closes window and disposes of frame and component.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class ViewJFrameBase
      Parameters:
      event - Event that triggered function
    • buildMenu

      protected 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 Throwable
      Cleans up memory from gc.
      Overrides:
      finalize in class ViewJFrameBase
      Throws:
      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)