Class VolumeTriPlanarInterface

java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
gov.nih.mipav.view.renderer.WildMagic.VolumeTriPlanarInterface
All Implemented Interfaces:
VOIManagerInterfaceListener, ViewImageUpdateInterface, ActionListener, ComponentListener, WindowListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, ChangeListener, RootPaneContainer, WindowConstants
Direct Known Subclasses:
VolumeTriPlanarInterfaceDTI

See Also:
  • Field Details

    • serialVersionUID

      protected static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • rendererProgressBar

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

      private JSplitPane mainPane
    • panelToolbar

      protected JPanel panelToolbar
      Panel that holds the toolbars.
    • panelToolBarGBC

      protected GridBagConstraints panelToolBarGBC
      Constraints on panelToolbar layout:
    • brainsurfaceFlattenerRender

      protected CorticalAnalysisRender brainsurfaceFlattenerRender
      Rendering the brainsurfaceFlattener objects.
    • m_kFlyThroughRender

      protected FlyThroughRender m_kFlyThroughRender
      Flythrough renderer:
    • flythruControl

      protected JPanelVirtualEndoscopySetup_WM flythruControl
      Flythough setup panel:
    • flythruMoveControl

      protected JPanelFlythruMove flythruMoveControl
      Flythough Move panel:
    • clipGUI

      protected JPanelClip_WM clipGUI
      Clipping user-interface panel:
    • positionsPanel

      protected JPanelPositions positionsPanel
    • sliceGUI

      protected JPanelSlices_WM sliceGUI
      3D Slice-view user-interface panel:
    • surfaceGUI

      protected JPanelSurface_WM surfaceGUI
      3D Surface user-interface panel:
    • displayGUI

      protected JPanelDisplay_WM displayGUI
      Display options panel:
    • geodesicGUI

      protected JPanelGeodesic_WM geodesicGUI
      Geodesic user-interface panel:
    • sculptGUI

      protected JPanelSculptor_WM sculptGUI
      Sculpting user-interface panel:
    • surfaceTextureGUI

      protected JPanelSurfaceTexture_WM surfaceTextureGUI
      Surface Texture user-interface panel:
    • rendererGUI

      protected JPanelRenderMode_WM rendererGUI
      Renderer mode user-interface panel
    • multiHistogramGUI

      protected JPanelMultiDimensionalTransfer multiHistogramGUI
      Multihistogram panel:
    • customBlendGUI

      protected JPanelCustomBlend customBlendGUI
      Multihistogram panel:
    • clipButton

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

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

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

      protected JButton clipMaskUndoButton
      Button to undo crop the clip volume.
    • clipPlaneButton

      protected JButton clipPlaneButton
      Button to invoke clipping planes.
    • clipSaveButton

      protected JButton clipSaveButton
      Button to save clipped region.
    • gpuPanel

      protected JPanel gpuPanel
      The image panel to hold one Canvas3D.
    • bf_flyPanel

      protected JPanel bf_flyPanel
      Panel to hold the BrainSurfaceFlattener or Flythrough views.
    • m_kLightsPanel

      protected JPanelLights_WM m_kLightsPanel
      Light panel
    • m_kAnnotationAnimationPanel

      protected JPanelAnnotationAnimation m_kAnnotationAnimationPanel
    • m_akPlaneRender

      protected PlaneRender_WM[] m_akPlaneRender
      The three slice views displayed as texture-mapped polygons:.
    • maxPanelWidth

      protected int maxPanelWidth
      The max width of the control panels.
    • voiMenu

      protected JMenu voiMenu
    • frameHistogram

      protected JFrameHistogram frameHistogram
    • m_kVolumeImageA

      protected VolumeImage m_kVolumeImageA
      VolumeImage contains data and textures for ModelImage A.
    • m_kVolumeImageB

      protected VolumeImage m_kVolumeImageB
      VolumeImage contains data and textures for ModelImage B.
    • raycastRenderWM

      protected VolumeTriPlanarRender raycastRenderWM
      Volume/Slice/Surface renderer.
    • rightPane

      protected JSplitPane rightPane
      The view pane that contains the image view and tri-planar view panels.
    • dualPane

      protected JSplitPane dualPane
      For displaying the BrainSurfaceFlattener or Flythrough renderers.
    • toolbarBuilder

      protected ViewToolBarBuilder toolbarBuilder
      Toolbar builder reference.
    • triImagePanel

      protected JPanel triImagePanel
      Tri image planar render panels.
    • viewToolBar

      protected JToolBar viewToolBar
      The top one render view switch toolbar.
    • m_kVolOpacityPanel

      protected JPanelVolumeOpacity m_kVolOpacityPanel
      Opacity panel.
    • panelAxial

      protected JPanel panelAxial
      Axial view panel.
    • panelSagittal

      protected JPanel panelSagittal
      Sagittal view panel.
    • panelCoronal

      protected JPanel panelCoronal
      Coronal view panel.
    • mouseGUI

      protected JPanel3DMouse_WM mouseGUI
      3D mouse user-interface panel:
    • screenWidth

      protected int screenWidth
      Current frame width and height.
    • screenHeight

      protected int screenHeight
      Current frame width and height.
    • m_kVOIInterface

      protected VOILatticeManagerInterface m_kVOIInterface
    • m_iVOICount

      protected int m_iVOICount
    • m_kVolume4DGUI

      private JPanelVolume4D m_kVolume4DGUI
    • m_b4D

      private boolean m_b4D
    • m_kRecordToggle

      private JToggleButton m_kRecordToggle
    • m_kSaveButton

      private JButton m_kSaveButton
    • m_kLoadButton

      private JButton m_kLoadButton
    • tabbedPane

      private JTabbedPane tabbedPane
      The main tabbed pane in the volume view frame.
    • userInterface

      protected ViewUserInterface userInterface
      Reference to the user interface.
    • m_bDependentInterfaceInit

      protected boolean m_bDependentInterfaceInit
    • prevHeight

      int prevHeight
  • Constructor Details

    • VolumeTriPlanarInterface

      public VolumeTriPlanarInterface()
      Specific constructor call from the VolumeViewerDTI.
    • VolumeTriPlanarInterface

      public VolumeTriPlanarInterface(ModelImage _imageA, ModelImage _imageB)
    • VolumeTriPlanarInterface

      public VolumeTriPlanarInterface(ModelImage _imageA, ModelImage _imageB, boolean cloneImage)
  • 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
    • addConfiguredListener

      public void addConfiguredListener(RendererListener listener)
    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Specified by:
      actionPerformed in interface ActionListener
    • addGeodesic

      public void addGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, WildMagic.LibGraphics.SceneGraph.Geometry kNew, int iGroup)
      Add a geodesic element to the surface display.
      Parameters:
      kSurface - the surface the geodesic element is attached to.
      kNew - the new geodesic element.
      iGroup - the Node index.
    • addNode

      public VolumeObject addNode(WildMagic.LibGraphics.SceneGraph.Node kNode)
      Add a new display node to the volume/surface display list. This is done from the other renderers: BrainSurfaceFlattener and Flythrough.
      Parameters:
      kNode -
    • addPolyline

      public void addPolyline(VOIContour kContour, WildMagic.LibGraphics.SceneGraph.Polyline akPolyline, int groupIndex)
      Add a polyline to the VolumeDTI display.
      Parameters:
      akPolyline - new polyline.
      groupIndex - Node index.
    • addSlices

      public void addSlices(VolumeSlices kSlices)
      Pass the VolumeSlices from the Volume Renderer to the PlaneRender objects.
      Parameters:
      kSlices -
    • addSurface

      public void addSurface(WildMagic.LibGraphics.SceneGraph.TriMesh mesh)
    • addSurface

      public void addSurface(SurfaceState kSurface)
    • addSurface

      public void addSurface(SurfaceState kSurface, boolean fileCoords)
      Add TriMesh surfaces to the Volume Renderer.
      Parameters:
      akSurfaces - new surfaces.
    • display3DWindowOnly

      public void display3DWindowOnly()
    • displayAnnotationSpheres

      public void displayAnnotationSpheres()
    • addVOIS

      public void addVOIS(VOIVector vois, Vector<String> annotationNames)
    • addSphereVOIs

      public void addSphereVOIs(VOI annotations)
      Specified by:
      addSphereVOIs in interface VOIManagerInterfaceListener
    • buildClipPanel

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

      public void buildCustomBlendPanel()
    • buildDisplayPanel

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

      public void buildFlythroughPanel()
      Build the flythru move 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()
    • buildLightPanel

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

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

      public void buildRenderModePanel()
      Builds the render mode control panel.
    • buildNavigationModePanel

      public void buildNavigationModePanel()
      Builds the navigation mode control panel.
    • buildSculpt

      public void buildSculpt()
      Build the Sculpturing control panel.
    • 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.
    • buildSurfaceTexturePanel

      public void buildSurfaceTexturePanel()
      Builds the Surface texture panel.
    • build3DMousePanel

      public void build3DMousePanel()
      Build the clipping control panel for the surface render.
    • close

      public void close()
      Closes both image A and image B (if it exists). It ensures the images are un-registered from the main-frame then removes any display listeners.
    • componentHidden

      public void componentHidden(ComponentEvent arg0)
      Specified by:
      componentHidden in interface ComponentListener
    • componentMoved

      public void componentMoved(ComponentEvent event)
      Specified by:
      componentMoved in interface ComponentListener
    • 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
      Parameters:
      event - frame resize event
    • componentShown

      public void componentShown(ComponentEvent arg0)
      Specified by:
      componentShown in interface ComponentListener
    • create3DVOI

      public void create3DVOI(boolean bIntersection)
      Specified by:
      create3DVOI in interface VOIManagerInterfaceListener
    • CustomBlendMode

      public void CustomBlendMode()
    • displayAll

      public void displayAll()
      Causes redisplay of all components.
    • disposeLocal

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

      public void enableGeodesic(boolean bEnable)
      Enable geodesic calculations and display.
      Parameters:
      bEnable - when true geodesic curves are enabled.
    • enablePaint

      public void enablePaint(WildMagic.LibFoundation.Mathematics.ColorRGBA kPaintColor, int iBrushSize, boolean bEnabled, boolean bPaint, boolean bDropper, boolean bPaintCan, boolean bErase)
      Enable painting on TriMesh surfaces.
      Parameters:
      kPaintColor - paint color.
      iBrushSize - brush size.
      bEnabled - painting on/off.
      bPaint - when true apply paint.
      bDropper - when true do dropper mode.
      bPaintCan - when true do paint can mode.
      bErase - when true erase.
    • eraseAllPaint

      public void eraseAllPaint()
      Erase all surface paint.
    • getActiveImage

      public ModelImage getActiveImage()
      Specified by:
      getActiveImage in interface VOIManagerInterfaceListener
    • getActiveLookupTable

      public ModelStorageBase getActiveLookupTable(ModelImage kImage)
      Returns the ModelLUT or ModelRGB based on which image is currently active, either imageA or imageB and they type of image (color or grayscale).
      Returns:
      the active LUT/RGB table.
    • getActiveLUT

      public ModelLUT getActiveLUT()
      Specified by:
      getActiveLUT in interface VOIManagerInterfaceListener
    • getActiveRGB

      public ModelRGB getActiveRGB()
      Specified by:
      getActiveRGB in interface VOIManagerInterfaceListener
    • getLUTPanel

      public JPanel getLUTPanel()
    • getOpacityPanel

      public JPanel getOpacityPanel()
    • getBlendValue

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

      public WildMagic.LibFoundation.Mathematics.Vector3f getCameraLocation()
      Get the camera current location
      Returns:
      camera position vector
    • getCameraParameters

      public float[] getCameraParameters()
      Get the camera parameters.
      Returns:
      camera parameters array.
    • getCenterPt

      public WildMagic.LibFoundation.Mathematics.Vector3f getCenterPt()
      Specified by:
      getCenterPt in interface VOIManagerInterfaceListener
    • getControls

      public ViewControlsImage getControls()
    • getFrame

      public JFrame getFrame()
      Specified by:
      getFrame in interface VOIManagerInterfaceListener
    • 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.
      Returns:
      imageA model image A reference.
    • getImageB

      public ModelImage getImageB()
      Get the imageB reference.
      Returns:
      imageB model image B reference.
    • getVolumeImageA

      public VolumeImage getVolumeImageA()
    • getVolumeImageB

      public VolumeImage getVolumeImageB()
    • GetLights

      public WildMagic.LibGraphics.Rendering.Light[] GetLights()
      Return the Light[] used in the volume/surface display.
      Returns:
    • getLUTDialog

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

      public WildMagic.LibGraphics.Rendering.MaterialState getMaterial(String kSurfaceName)
      Return the material properties of the given surface.
      Parameters:
      kSurfaceName - the surface to query.
      Returns:
      the material properties of the surface.
    • getNode

      public VolumeNode getNode(String kSurfaceName)
    • getObjectParameters

      public float[] getObjectParameters()
      Get the object parameters.
      Returns:
      Get the object rotation parameters array.
    • getObjectRotation

      public WildMagic.LibFoundation.Mathematics.Matrix3f getObjectRotation()
      Get the object rotation matrix.
      Returns:
      rotation matrix
    • getOpacity

      public float getOpacity(String kSurfaceName)
      Return the opacity properties of the given surface.
      Parameters:
      kSurfaceName - the surface to query.
      Returns:
      the opacity value of the surface.
    • getRendererGUI

      public JPanelRenderMode_WM getRendererGUI()
      Get the render mode interface panel.
      Returns:
      render mode interface panel.
    • getNavigationGUI

      public JPanelNavigation getNavigationGUI()
      Get the navigation mode interface panel.
      Returns:
      navigation mode interface panel.
    • getSurfaceArea

      public float getSurfaceArea(String kSurfaceName)
      Return the size of the surface-area of the given surface.
      Parameters:
      kSurfaceName - the surface to calculate the surface-area for.
      Returns:
      the surface-area of the surface.
    • getSurfaceAreaString

      public String getSurfaceAreaString(String kSurfaceName)
      Return the size of the surface-area of the given surface.
      Parameters:
      kSurfaceName - the surface to calculate the surface-area for.
      Returns:
      the surface-area of the surface.
    • getSurfacePanel

      public JPanelSurface_WM getSurfacePanel()
      Return the surface panel.
    • getTranslateSurface

      public WildMagic.LibFoundation.Mathematics.Vector3f getTranslateSurface(String kSurfaceName)
      Return the translation vector for the surface with the given name.
      Parameters:
      kSurfaceName - the surface to move.
      Returns:
      the translation vector
    • getVOIManager

      public VOIManagerInterface getVOIManager()
      Specified by:
      getVOIManager in interface VOIManagerInterfaceListener
    • getVolume

      public float getVolume(String kSurfaceName)
      Return the size of the volume of the given surface.
      Parameters:
      kSurfaceName - the surface to calculate the volume for.
      Returns:
      the volume of the surface.
    • getVolumeString

      public String getVolumeString(String kSurfaceName)
    • getVolumeGPU

      public VolumeTriPlanarRender getVolumeGPU()
      Returns:
      VolumeTriPlanarRender object.
    • hideMenus

      public void hideMenus()
    • 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
    • maskToPaint

      public void maskToPaint()
      Specified by:
      maskToPaint in interface VOIManagerInterfaceListener
    • paintToShortMask

      public void paintToShortMask()
      Specified by:
      paintToShortMask in interface VOIManagerInterfaceListener
    • paintToUbyteMask

      public void paintToUbyteMask()
      Specified by:
      paintToUbyteMask in interface VOIManagerInterfaceListener
    • patientToScreen

      public WildMagic.LibFoundation.Mathematics.Vector3f patientToScreen(int iActive, WildMagic.LibFoundation.Mathematics.Vector3f kPatient)
    • PickCorrespondence

      public void PickCorrespondence(boolean bOn)
      Enables picking correspondence points between the surface renderer and the BrainSurfaceFlattener renderer.
      Parameters:
      bOn - true enables, false disables.
    • PickCorrespondence

      public void PickCorrespondence(int iV0, int iV1, int iV2)
      Passes the triangle indices of the picked triangle to the BrainSurfaceFlattener renderer for display.
      Parameters:
      iV0 - index 0 of the picked triangle.
      iV1 - index 1 of the picked triangle.
      iV2 - index 2 of the picked triangle.
    • play4D

      public void play4D(boolean bOn)
    • PointerActive

      public void PointerActive(boolean bActive)
      Specified by:
      PointerActive in interface VOIManagerInterfaceListener
    • PropDown

      public WildMagic.LibFoundation.Mathematics.Vector3f PropDown(int iActive)
      Specified by:
      PropDown in interface VOIManagerInterfaceListener
    • PropUp

      public WildMagic.LibFoundation.Mathematics.Vector3f PropUp(int iActive)
      Specified by:
      PropUp in interface VOIManagerInterfaceListener
    • refreshLighting

      public void refreshLighting()
    • removeAllGeodesic

      public void removeAllGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface)
      Removes all geodesic curves for the given surface.
      Parameters:
      kSurface - the surface to modify.
    • removeControls

      public void removeControls()
    • removeGeodesic

      public void removeGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kSurface, int iNode, int iGroup)
      Remove the specific geodesic curves from the given surface.
      Parameters:
      kSurface - the surface to modify.
      iNode - the node to remove.
      iGroup - the group the node belongs to.
    • removeNode

      public VolumeObject removeNode(String kNodeName)
    • removePolyline

      public void removePolyline(int groupIndex)
      Remove the polyline from the volume DTI display.
      Parameters:
      groupIndex - the polyline to remove.
    • removeSurface

      public void removeSurface(String kSurfaceName)
      Remove the given surface from the render display list.
      Parameters:
      kSurfaceName - the name of the surface to remove.
    • replaceGeodesic

      public void replaceGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kOld, WildMagic.LibGraphics.SceneGraph.TriMesh kNew)
      When the Geodesic object cuts the mesh along an open curve, the old mesh changes, but does not need to be deleted and no new mesh needs to be added. This function allows the Geodesic object to replace the original mesh with the sliced mesh in the surface renderer. ReplaceMesh is also used to undo cutting operations.
      Parameters:
      kOld - TriMesh old surface mesh
      kNew - TriMesh new surface mesh
    • rollbackToImageCenter

      public void rollbackToImageCenter()
      When the mouse tranlation moves the object out of the Viewing bounding box, click the home button to bring the image back to center.
    • resetAxisX

      public void resetAxisX()
      Reset image volume orientation along X axis.
    • resetAxisXInv

      public void resetAxisXInv()
      Reset image volume orientation along X axis.
    • resetAxisY

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

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

      public void setActiveImage(int active)
      Specified by:
      setActiveImage in interface VOIManagerInterfaceListener
    • setActiveImage

      public void setActiveImage(ModelImage kImage)
      Specified by:
      setActiveImage in interface VOIManagerInterfaceListener
    • setAnimationSpeed

      public void setAnimationSpeed(float fValue)
    • setBackface

      public void setBackface(String kSurfaceName, boolean bOn)
      Enables backface culling for the given surface.
      Parameters:
      kSurfaceName - the surface to modify.
      bOn - when true back-face culling is enabled, false disables backface culling.
    • setBackgroundColor

      public void setBackgroundColor(Color color)
      Sets the background color.
      Parameters:
      color -
    • setBlendValue

      public void setBlendValue(int iValue)
      Sets the blend value between images A and B.
      Parameters:
      iValue -
    • setBoundingBoxColor

      public void setBoundingBoxColor(Color color)
      Sets the volume bounding box color.
      Parameters:
      color -
    • setCameraLocation

      public void setCameraLocation(WildMagic.LibFoundation.Mathematics.Vector3f v)
      Set the camera location.
      Parameters:
      v - camera position vector
    • setCameraParameters

      public void setCameraParameters()
      Display the camera parameters in the user-interface.
    • setCenter

      public void setCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter)
      Specified by:
      setCenter in interface VOIManagerInterfaceListener
    • setClipping

      public void setClipping(String kSurfaceName, boolean bClip)
      Enable clipping for the given surface.
      Parameters:
      kSurfaceName - the surface to modify.
      bClip - true enables clipping, false disables clipping.
    • setColor

      public void setColor(String kSurfaceName, WildMagic.LibFoundation.Mathematics.ColorRGB kColor, boolean bUpdate)
      Set the color for the given surface.
      Parameters:
      kSurfaceName - the surface to modify.
      kColor - the new color.
    • setControls

      public void setControls()
    • SetCustomBlend

      public void SetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
    • setDefaultCursor

      public void setDefaultCursor()
    • setDropperColor

      public void setDropperColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kDropperColor, WildMagic.LibFoundation.Mathematics.Vector3f kPickPoint)
      Passes the picked dropper color to the surface interface.
      Parameters:
      kDropperColor - the color of the surface at the picked point.
      kPickPoint - the picked point for use in the region-grow operation.
    • setEnabled

      public void setEnabled(boolean flag)
      Overrides:
      setEnabled in class Component
    • setGeodesic

      public void setGeodesic(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh, WildMagic.LibGraphics.Collision.PickRecord kPickPoint)
      Passes the picked point to the Geodesic object for calculating the geodesic curve on the TriMesh surface.
      Parameters:
      kMesh - the surface that was picked.
      kPickPoint - the picked point.
    • setGradientMagnitude

      public void setGradientMagnitude(boolean bShow)
      Turn the gradient magnitude filter on/off for volume shaders.
      Parameters:
      bShow - on/off.
    • setImage

      public void setImage(ModelImage kImageA, ModelImage kImageB, ModelLUT kLUTA, ModelLUT kLUTB, boolean updateRenderer)
      Changes the underlying images displayed in the VolumeTriPlanarInteface.
      Parameters:
      kImageA - new imageA
      kImageB - new imageB
      kLUTA - new lut for imageA.
      kLUTB - new lut for imageB
      updateRenderer - flag indicating if the image dimensions have changed size. If so recreate the image on the GPU, otherwise just reload the data.
    • updateHistoLUTPanels

      private void updateHistoLUTPanels(boolean updateImageB)
      Creates or updates the histogram / LUT panel and opacity panels when a new image is loaded.
    • SetImageNew

      public void SetImageNew(String kSurfaceName, ModelImage kImage)
      Sets the ModelImage to use as an alternative to the volume ModelImage for surface texturing.
      Parameters:
      kSurfaceName - the surface to modify.
      kImage - the alternate ModelImage to use for the surface texture.
    • setIPD

      public void setIPD(float fIPD)
      Sets the inter-pupillary distance for stereo rendering.
      Parameters:
      fIPD - the IPD value.
    • SetLUTNew

      public void SetLUTNew(String kSurfaceName, ModelStorageBase kLUT)
      Sets the LUT to use as an alternative to the volume lut for surface texturing.
      Parameters:
      kSurfaceName - the surface to modify.
      kLUT - the new LUT.
      kRGBT - the new ModelRGB (for color images).
    • setMaterial

      public void setMaterial(String kSurfaceName, WildMagic.LibGraphics.Rendering.MaterialState kMaterial, boolean bUpdate)
      Sets the material for the given surface.
      Parameters:
      kSurfaceName - the surface to update.
      kMaterial - the new material.
    • setModified

      public void setModified()
      Causes the bottom three panels to re-display.
      Specified by:
      setModified in interface VOIManagerInterfaceListener
    • setObjectParameters

      public void setObjectParameters()
      Set the object rotation parameters for displaying.
    • setObjectRotation

      public void setObjectRotation(WildMagic.LibFoundation.Mathematics.Matrix3f rot)
      Set the object rotation matrix
      Parameters:
      rot - rotation matrix
    • setPaintMask

      public void setPaintMask(BitSet mask)
      Specified by:
      setPaintMask in interface VOIManagerInterfaceListener
    • setPickable

      public void setPickable(String kSurfaceName, boolean bOn)
      Turn picking on/off for the given surface.
      Parameters:
      kSurfaceName - the surface to modify.
      bOn - when true enable picking, false disables picking.
    • setPolygonMode

      public void setPolygonMode(String kSurfaceName, WildMagic.LibGraphics.Rendering.WireframeState.FillMode eMode)
      Set the polygon mode (FILL, LINE, POINT) for the given surface.
      Parameters:
      kSurfaceName - the surface to modify.
      eMode - FILL, LINE, or POINT.
    • setPositionLabels

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

      public void setRadiological(boolean bOn)
      Toggles between radiological and neurological views of the data.
      Parameters:
      bOn - when true display using radiological coordinates, when false use neurological.
    • setRenderPerspective

      public void setRenderPerspective(boolean bEnable)
      Switches between orthographic and perspective projection.
      Parameters:
      bEnable - when true enable perspective projection, when false use orthographic projection.
    • setRGBTA

      public void setRGBTA(ModelRGB RGBT)
    • setRGBTB

      public void setRGBTB(ModelRGB RGBT)
    • setShowBoxFrame

      public void setShowBoxFrame(boolean bShow)
      Turn the volume bounding box frame on/off.
      Parameters:
      bShow - when true display the bounding box.
    • setShowOrientationCube

      public void setShowOrientationCube(boolean bShow)
      Turn the orientation cube on/off.
      Parameters:
      bShow - when true display the orientation cube, when false do not display the cube.
    • setSlice

      public void setSlice(int slice)
      Description copied from interface: ViewImageUpdateInterface
      setSlice.
      Specified by:
      setSlice in interface ViewImageUpdateInterface
      Parameters:
      slice - Current slice
    • setSliceFromPlane

      public void setSliceFromPlane(WildMagic.LibFoundation.Mathematics.Vector3f center)
      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
    • setCamera

      public void setCamera(WildMagic.LibFoundation.Mathematics.Vector3f center)
      When the mouse move in bottom three planar view, need to update the camera view location to the indicated image center.
      Parameters:
      center - image center
    • 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.
    • setSliceOpacity

      public void setSliceOpacity(int i, float fAlpha)
      Set the transparency value for the slice.
      Parameters:
      i - the slice to modify.
      fAlpha - the new transparency value.
    • setSurfaceTexture

      public void setSurfaceTexture(String kSurfaceName, boolean bOn, boolean bUseNewImage, boolean bUseNewLUT)
      Turns on surface texture display for the given surface. The user can use a separate ModelImage and LUT than the one displayed in the volume renderer.
      Parameters:
      kSurfaceName - the name of the surface to texture.
      bOn - texture on/off.
      bUseNewImage - when false use the current ModelImage, when true the user specifies the model image.
      bUseNewLUT - when false use the current LUT, when true the user specifies the LUT.
    • setTimeSlice

      public void setTimeSlice(int slice)
      Description copied from interface: ViewImageUpdateInterface
      setTimeSlice.
      Specified by:
      setTimeSlice in interface ViewImageUpdateInterface
      Parameters:
      slice - Current time volume
    • setTransparency

      public void setTransparency(String kSurfaceName, float fValue)
      Set the transparency for the given surface.
      Parameters:
      kSurfaceName - the name of the surface to modify.
      fValue - transparency value.
    • showBoundingBox

      public void showBoundingBox(int i, boolean bShow)
      Turns showing the slice bounding box on/off.
      Parameters:
      i - which slice bounding box to turn off.
      bShow - on/off.
    • showSlice

      public void showSlice(int i, boolean bShow)
      Turns showing the slice on/off.
      Parameters:
      i - which slice to turn off.
      bShow - on/off.
    • smoothMesh

      public void smoothMesh(String kSurfaceName, int iteration, float alpha, boolean volumeLimit, float volumePercent)
      Smooth the given surface.
      Parameters:
      kSurfaceName - the name of the surface to smooth.
      iteration - smooth iterations.
      alpha - smooth factor.
      volumeLimit - whether to use a volume % change limit.
      volumePercent - the % volume change limiting factor
    • smoothThree

      public void smoothThree(String kSurfaceName, int iteration, float lambda, float mu)
      Smooth the given surface.
      Parameters:
      kSurfaceName - the name of the surface to smooth.
      iteration - smooth iterations.
      lambda - smooth factor.
      mu - smooth factor.
    • smoothTwo

      public void smoothTwo(String kSurfaceName, int iteration, float fStiffness, boolean volumeLimit, float volumePercent)
      Smooth the given surface.
      Parameters:
      kSurfaceName - the name of the surface to smooth.
      iteration - smooth iterations.
      fStiffness - stiffness factor.
      volumeLimit - whether to use a volume % change limit.
      volumePercent - the % volume change limiting factor.
    • stateChanged

      public void stateChanged(ChangeEvent event)
      Does nothing.
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      event - the change event
    • SURMode

      public void SURMode(boolean bSURFast)
    • toggleGeodesicPathDisplay

      public void toggleGeodesicPathDisplay(String kSurfaceName, int iWhich)
      Switches between different ways of displaying the geodesic path (Euclidean, Geodesic, or Mesh).
      Parameters:
      kSurfaceName - the surface the path is on.
      iWhich - the type of display.
    • toggleNode

      public void toggleNode(WildMagic.LibGraphics.SceneGraph.Node kNode, boolean bDisplay)
      Toggle the display on/off for the given Node.
      Parameters:
      kNode - node to toggle on/off.
      bDisplay - display toggle on/off.
    • translateSurface

      public void translateSurface(String kSurfaceName, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate)
      Changes the translation vector for the surface with the given name.
      Parameters:
      kSurfaceName - the surface to move.
      kTranslate - the new translation vector
    • updateABBlend

      public void updateABBlend()
      update blending between images A/B.
    • updateData

      public void updateData()
      Causes the PlaneRender objects to update the texture maps when the underlying ModelImage changes.
      Specified by:
      updateData in interface VOIManagerInterfaceListener
    • updateImageExtents

      public boolean updateImageExtents()
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's REPAINT method to redraw the screen. The extents on this image have changed, so the extents need to be read in again and menus, panes and slide bars adjusted accordingly.
      Specified by:
      updateImageExtents in interface ViewImageUpdateInterface
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages()
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's REPAINT method to redraw the screen. Without LUT changes or image changes
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Returns:
      boolean confirming successful update
    • updateImages

      public boolean updateImages(boolean forceShow)
      Description copied from interface: ViewImageUpdateInterface
      This methods calls the componentImage's update method to redraw the screen. Without LUT changes.
      Specified by:
      updateImages in interface ViewImageUpdateInterface
      Parameters:
      forceShow - forces show to re import 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
    • updateLevWidgetState

      public void updateLevWidgetState(Vector<ClassificationWidget> kLWS)
    • updateLighting

      public void updateLighting(WildMagic.LibGraphics.Rendering.Light[] akGLights)
    • updateMultihistoTab

      public void updateMultihistoTab(boolean flag)
      Update the multi-histogram tab when the MultiHistogram checkbox is checked in the renderMode panel.
      Parameters:
      flag - MultiHistogram Check box checked or not.
    • updatePlanes

      public void updatePlanes()
      Causes the texture representation of all the surface meshes to be recalculated.
    • windowActivated

      public void windowActivated(WindowEvent event)
      Specified by:
      windowActivated in interface WindowListener
    • windowClosed

      public void windowClosed(WindowEvent arg0)
      Specified by:
      windowClosed in interface WindowListener
    • windowClosing

      public void windowClosing(WindowEvent event)
      Specified by:
      windowClosing in interface WindowListener
    • windowDeactivated

      public void windowDeactivated(WindowEvent event)
      Does nothing.
      Specified by:
      windowDeactivated in interface WindowListener
      Parameters:
      event - the window event
    • windowDeiconified

      public void windowDeiconified(WindowEvent event)
      Specified by:
      windowDeiconified in interface WindowListener
    • windowIconified

      public void windowIconified(WindowEvent event)
      Specified by:
      windowIconified in interface WindowListener
    • windowOpened

      public void windowOpened(WindowEvent arg0)
      Specified by:
      windowOpened in interface WindowListener
    • buildImageIndependentComponents

      private void buildImageIndependentComponents()
    • disposeImageDependentComponents

      private void disposeImageDependentComponents()
    • disposeImageIndependentComponents

      private void disposeImageIndependentComponents()
    • disposeRenderers

      private void disposeRenderers()
    • getVolumeRenderStateFile

      private String getVolumeRenderStateFile(boolean bSave)
    • initVOI

      private void initVOI()
    • LoadState

      private void LoadState()
    • RestoreState

      private void RestoreState(VolumeRenderState kState)
    • RestoreTabs

      private void RestoreTabs(VolumeRenderState kState)
    • SaveState

      private void SaveState()
    • SaveTabs

      private void SaveTabs(VolumeRenderState kState)
    • StoreState

      private VolumeRenderState StoreState()
    • buildImageDependentComponents

      protected void buildImageDependentComponents()
    • buildMenu

      protected JMenuBar buildMenu()
      Builds menus for the tri-planar view.
      Returns:
      new menu bar containing menus.
    • buildViewToolbar

      protected void buildViewToolbar()
      The the top one volume view toolbar.
    • configureFrame

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

      public JSplitPane getVolumeSlicesPanel()
    • constructRenderers

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

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

      public void propertyChange(PropertyChangeEvent event)
      Specified by:
      propertyChange in interface PropertyChangeListener
    • setCameraNearPlane

      public void setCameraNearPlane(float distance)
    • setPlaneConstant

      public void setPlaneConstant(float distance)
    • setVisible

      public void setVisible(boolean b)
      Overrides:
      setVisible in class Window
    • setAnnotationMode

      public void setAnnotationMode(boolean _isAnnotationEnabled)
      Set the annotation mode
      Parameters:
      _isAnnotationEnabled -
    • setMouseFlythruMode

      public void setMouseFlythruMode(boolean _isMouseflythru)
      Set the flythru mode
      Parameters:
      _flythru -
    • setPathFlythruMode

      public void setPathFlythruMode(boolean _isPathflythru)
    • addAnnotationPoint

      public void addAnnotationPoint(WildMagic.LibFoundation.Mathematics.Vector3f point, WildMagic.LibFoundation.Mathematics.Vector3f scannerPt)
      When left mouse press with the control key down on the bottom three planar view, add the annotation point
      Parameters:
      point - annotation point in patient space