Class JPanelClip

All Implemented Interfaces:
com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback, ActionListener, FocusListener, ItemListener, KeyListener, MouseListener, MouseMotionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, ChangeListener

public class JPanelClip extends JPanelRendererJ3D implements ChangeListener, MouseListener, com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback, MouseMotionListener

Title: JPanelClip

Description: Clip panel control of the surface renderer. The clipping control includes x, y, z clipping sliders; the arbitrary and static eye clipping sliders.

Author:
Ruida Cheng
See Also:
  • Field Details

    • serialVersionUID

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

      boolean[] enables
      Enable flags for the 6 ( X, Y, Z and inverse ) clipping planes.
    • enablesArbi

      boolean[] enablesArbi
      Enable flags for the arbitrary clipping planes.
    • enablesStatic

      boolean[] enablesStatic
      Enable flags for the static clipping planes.
    • AclipPlanePts

      private javax.vecmath.Vector4f[] AclipPlanePts
      Arbitrary clipping plane four corners points.
    • arbiMouseRotateBehavior

      private com.sun.j3d.utils.behaviors.mouse.MouseRotate arbiMouseRotateBehavior
      Mouse Rotate behavior of the arbitrary clipping plane.
    • arbiTG

      private javax.media.j3d.TransformGroup arbiTG
      Tranform group for arbitrary clipping plane.
    • arbiTrans3d

      private javax.media.j3d.Transform3D arbiTrans3d
      Transform3D group for clipSliceA frame box and ModelClip arbitrary clipping plane.
    • mcArbiTrans3D

      private javax.media.j3d.Transform3D mcArbiTrans3D
      Transform3D group for clipSliceA frame box and ModelClip arbitrary clipping plane.
    • arbitrary_SG

      private javax.media.j3d.Switch arbitrary_SG
      Arbitrary clipping plane switch group.
    • aSlice

      private int aSlice
      Which arbitray clipping slice is currently displayed.
    • axisX

      private float axisX
      Value attribute for the roation axis.
    • axisY

      private float axisY
      Value attribute for the roation axis.
    • axisZ

      private float axisZ
      Value attribute for the roation axis.
    • axisAngle

      private float axisAngle
      Value attribute for the roation axis.
    • behaviorBG

      private javax.media.j3d.BranchGroup behaviorBG
      The BranchGroup to which the arbitrary behaviors are attached and rotate.
    • boundingCheckA

      private JCheckBox boundingCheckA
      Arbitrary and static clipping plane check box.
    • boundingCheckStatic

      private JCheckBox boundingCheckStatic
      Arbitrary and static clipping plane check box.
    • boundingCheckStaticInv

      private JCheckBox boundingCheckStaticInv
      Arbitrary and static clipping plane check box.
    • boundingCheckX

      private JCheckBox boundingCheckX
      Check box to turn the clipping plane frame on and off.
    • boundingCheckY

      private JCheckBox boundingCheckY
      Check box to turn the clipping plane frame on and off.
    • boundingCheckZ

      private JCheckBox boundingCheckZ
      Check box to turn the clipping plane frame on and off.
    • boundingCheckXInv

      private JCheckBox boundingCheckXInv
      X,Y,Z inverse clipping plane check box.
    • boundingCheckYInv

      private JCheckBox boundingCheckYInv
      X,Y,Z inverse clipping plane check box.
    • boundingCheckZInv

      private JCheckBox boundingCheckZInv
      X,Y,Z inverse clipping plane check box.
    • boxStatic

      private JCheckBox boxStatic
      Static and static inverse, arbitrary clipping plane check box.
    • boxStaticInv

      private JCheckBox boxStaticInv
      Static and static inverse, arbitrary clipping plane check box.
    • boxA

      private JCheckBox boxA
      Static and static inverse, arbitrary clipping plane check box.
    • boxX

      private JCheckBox boxX
      Check boxes that turn the image plane and the sliders on and off.
    • boxY

      private JCheckBox boxY
      Check boxes that turn the image plane and the sliders on and off.
    • boxZ

      private JCheckBox boxZ
      Check boxes that turn the image plane and the sliders on and off.
    • boxXInv

      private JCheckBox boxXInv
      Check boxes that turn the image plane and the sliders on and off.
    • boxYInv

      private JCheckBox boxYInv
      Check boxes that turn the image plane and the sliders on and off.
    • boxZInv

      private JCheckBox boxZInv
      Check boxes that turn the image plane and the sliders on and off.
    • clipCount

      private int clipCount
      Counters show the event number in the mouse recorder.
    • rotationCount

      private int rotationCount
      Counters show the event number in the mouse recorder.
    • clipEvents

      private MouseEventVector clipEvents
      Mouse event vector that record the clipping plane sliders changes.
    • clipSliceAIndicator

      private ViewJComponentBoxSlice clipSliceAIndicator
      Arbitrary clipping plane yellow boundary indicator box.
    • clipSliceA

      private ViewJComponentBoxSlice clipSliceA
      Arbitrary clipping plane yellow boundary indicator box.
    • clipSliceStatic

      private ViewJComponentBoxSlice clipSliceStatic
      Static clipping plane boundary box.
    • clipSliceStaticInv

      private ViewJComponentBoxSlice clipSliceStaticInv
      Static clipping plane boundary box.
    • clipSliceX

      private ViewJComponentBoxSlice clipSliceX
      The bounding box frame around the clipping planes.
    • clipSliceY

      private ViewJComponentBoxSlice clipSliceY
      The bounding box frame around the clipping planes.
    • clipSliceZ

      private ViewJComponentBoxSlice clipSliceZ
      The bounding box frame around the clipping planes.
    • clipSliceXInv

      private ViewJComponentBoxSlice clipSliceXInv
      X, Y, Z inverse clipping slice boundary box.
    • clipSliceYInv

      private ViewJComponentBoxSlice clipSliceYInv
      X, Y, Z inverse clipping slice boundary box.
    • clipSliceZInv

      private ViewJComponentBoxSlice clipSliceZInv
      X, Y, Z inverse clipping slice boundary box.
    • clipSliderStatic

      private JSlider clipSliderStatic
      Static, static inverse and arbitrary clipping plane boundary box.
    • clipSliderStaticInv

      private JSlider clipSliderStaticInv
      Static, static inverse and arbitrary clipping plane boundary box.
    • sliderA

      private JSlider sliderA
      Static, static inverse and arbitrary clipping plane boundary box.
    • clipSliderX

      private JSlider clipSliderX
      Sliders for the image planes.
    • clipSliderY

      private JSlider clipSliderY
      Sliders for the image planes.
    • clipSliderZ

      private JSlider clipSliderZ
      Sliders for the image planes.
    • sliderXInv

      private JSlider sliderXInv
      Sliders for the image planes.
    • sliderYInv

      private JSlider sliderYInv
      Sliders for the image planes.
    • sliderZInv

      private JSlider sliderZInv
      Sliders for the image planes.
    • colorButtonA

      private JButton colorButtonA
      Color button for the arbitrary clipping plane frame.
    • colorButtonStatic

      private JButton colorButtonStatic
      Color button for the static clipping plane frame.
    • colorButtonStaticInv

      private JButton colorButtonStaticInv
      Color button for the static clipping plane frame.
    • colorButtonX

      private JButton colorButtonX
      Color button for X clipping plane frame.
    • colorButtonXInv

      private JButton colorButtonXInv
      Color button for X clipping plane frame.
    • colorButtonY

      private JButton colorButtonY
      Color button for Y clipping plane frame.
    • colorButtonYInv

      private JButton colorButtonYInv
      Color button for Y clipping plane frame.
    • colorButtonZ

      private JButton colorButtonZ
      Color button for Z clipping plane frame.
    • colorButtonZInv

      private JButton colorButtonZInv
      Color button for Z clipping plane frame.
    • colorChooser

      private ViewJColorChooser colorChooser
      Color chooser dialog.
    • eqnPlanes

      private javax.vecmath.Vector4d[] eqnPlanes
      Vetor holding the clipping plane equations.
    • eqnPlanesArbi

      private javax.vecmath.Vector4d[] eqnPlanesArbi
      Vetor holding the clipping plane equations.
    • eqnPlanesStatic

      private javax.vecmath.Vector4d[] eqnPlanesStatic
      Vetor holding the clipping plane equations.
    • eqnX

      private javax.vecmath.Vector4d eqnX
      Vector4D clipping equation of each clipping plane.
    • eqnXInv

      private javax.vecmath.Vector4d eqnXInv
      Vector4D clipping equation of each clipping plane.
    • eqnY

      private javax.vecmath.Vector4d eqnY
      Vector4D clipping equation of each clipping plane.
    • eqnYInv

      private javax.vecmath.Vector4d eqnYInv
      Vector4D clipping equation of each clipping plane.
    • eqnZ

      private javax.vecmath.Vector4d eqnZ
      Vector4D clipping equation of each clipping plane.
    • eqnZInv

      private javax.vecmath.Vector4d eqnZInv
      Vector4D clipping equation of each clipping plane.
    • eqnA

      private javax.vecmath.Vector4d eqnA
      Vector4D clipping equation of each clipping plane.
    • extractButtonA

      private JButton extractButtonA
      Extract arbitrary cliping plane button.
    • extractButtonS

      private JButton extractButtonS
      Extract static eye cliping plane button.
    • intersectionPts

      private javax.vecmath.Point3f[] intersectionPts
      intersectioin points coordinate.
    • iNumLights

      private int iNumLights
      12 possible intersection points.
    • is6PlaneClipping

      private boolean is6PlaneClipping
      Flag to indicate 6 plane clipping is active.
    • isClipArbiPicked

      private boolean isClipArbiPicked
      Arbitrary clipping plane frame being picked or not.
    • isFirstTimeBuildTree

      private boolean isFirstTimeBuildTree
      First time to build the clipping plane tree.
    • isStateChangedEvent

      private boolean isStateChangedEvent
      Flag to indicate StateChangeEvent invoked.
    • isTransformChanged

      private boolean isTransformChanged
      Flag to indicate tranformChanged event invoked.
    • labelAStart

      private JLabel labelAStart
      Arbitrary clipping slider labels.
    • labelAMid

      private JLabel labelAMid
      Arbitrary clipping slider labels.
    • labelAEnd

      private JLabel labelAEnd
      Arbitrary clipping slider labels.
    • labelStatic

      private JLabel labelStatic
      Static cliiping slider labels.
    • labelStaticInv

      private JLabel labelStaticInv
      Static cliiping slider labels.
    • labelA

      private JLabel labelA
      Static cliiping slider labels.
    • labelStaticInvStart

      private JLabel labelStaticInvStart
      Static inverse clipping plane labels.
    • labelStaticInvMid

      private JLabel labelStaticInvMid
      Static inverse clipping plane labels.
    • labelStaticInvEnd

      private JLabel labelStaticInvEnd
      Static inverse clipping plane labels.
    • labelStaticStart

      private JLabel labelStaticStart
      Static clipping plane labels.
    • labelStaticMid

      private JLabel labelStaticMid
      Static clipping plane labels.
    • labelStaticEnd

      private JLabel labelStaticEnd
      Static clipping plane labels.
    • labelX

      private JLabel labelX
      Sliders labels.
    • labelY

      private JLabel labelY
      Sliders labels.
    • labelZ

      private JLabel labelZ
      Sliders labels.
    • labelXInv

      private JLabel labelXInv
      Sliders labels.
    • labelYInv

      private JLabel labelYInv
      Sliders labels.
    • labelZInv

      private JLabel labelZInv
      Sliders labels.
    • labelXStart

      private JLabel labelXStart
      Slider tick labels.
    • labelXMid

      private JLabel labelXMid
      Slider tick labels.
    • labelXEnd

      private JLabel labelXEnd
      Slider tick labels.
    • labelXStartInv

      private JLabel labelXStartInv
      X clipping slider labels.
    • labelXMidInv

      private JLabel labelXMidInv
      X clipping slider labels.
    • labelXEndInv

      private JLabel labelXEndInv
      X clipping slider labels.
    • labelYStart

      private JLabel labelYStart
      Y clipping slider labels.
    • labelYMid

      private JLabel labelYMid
      Y clipping slider labels.
    • labelYEnd

      private JLabel labelYEnd
      Y clipping slider labels.
    • labelYStartInv

      private JLabel labelYStartInv
      Y inverse clipping slider labels.
    • labelYMidInv

      private JLabel labelYMidInv
      Y inverse clipping slider labels.
    • labelYEndInv

      private JLabel labelYEndInv
      Y inverse clipping slider labels.
    • labelZStart

      private JLabel labelZStart
      Z clipping slider labels.
    • labelZMid

      private JLabel labelZMid
      Z clipping slider labels.
    • labelZEnd

      private JLabel labelZEnd
      Z clipping slider labels.
    • labelZStartInv

      private JLabel labelZStartInv
      Z clipping slider labels.
    • labelZMidInv

      private JLabel labelZMidInv
      Z clipping slider labels.
    • labelZEndInv

      private JLabel labelZEndInv
      Z clipping slider labels.
    • m_aiImageA_backup

      private int[] m_aiImageA_backup
      Backup of the data for undo:.
    • m_aiImageB_backup

      private int[] m_aiImageB_backup
      ImageB backup buffer.
    • m_akLightBG

      private javax.media.j3d.BranchGroup[] m_akLightBG
      Parent of each light bulb.
    • m_akLightMaterials

      private javax.media.j3d.Material[] m_akLightMaterials
      Material properties for each light bulb.
    • m_akLightSpheres

      private com.sun.j3d.utils.geometry.Sphere[] m_akLightSpheres
      Shapes representing light bulbs.
    • m_akLightTransformGroup

      private javax.media.j3d.TransformGroup[] m_akLightTransformGroup
      Parent transform group.
    • m_kLightRoot

      private javax.media.j3d.BranchGroup m_kLightRoot
      Parent of all the light bulbs.
    • maxBox

      private float maxBox
      The largest of xBox,yBox,and zBox.
    • maxDim

      private int maxDim
      The largest dimension of xDim, yDim and zDim.
    • mc

      private javax.media.j3d.ModelClip mc
      Global model clip object.
    • mcArbi

      private javax.media.j3d.ModelClip mcArbi
      Global model clip object.
    • mcStatic

      private javax.media.j3d.ModelClip mcStatic
      Global model clip object.
    • mcArbiBG

      private javax.media.j3d.BranchGroup mcArbiBG
      Branch group of the arbitrary clipping plane.
    • mcExtendBG

      private javax.media.j3d.BranchGroup mcExtendBG
      Branch group of the arbitrary clipping plane.
    • mcArbiExtendBG

      private javax.media.j3d.BranchGroup mcArbiExtendBG
      Branch group of the arbitrary clipping plane.
    • mcArbiTG

      private javax.media.j3d.TransformGroup mcArbiTG
      ModelClip arbitrary TransformGroup.
    • mcBG

      private javax.media.j3d.BranchGroup mcBG
      Branch group of the 6 clipping planes.
    • mcStaticBG

      private javax.media.j3d.BranchGroup mcStaticBG
      Branch group of the static clipping plane.
    • objClipSliceA_BG

      private javax.media.j3d.BranchGroup objClipSliceA_BG
      Arbitrary clipping branch group.
    • clipSliceA_BG

      private javax.media.j3d.BranchGroup clipSliceA_BG
      Arbitrary clipping branch group.
    • clipSliceAIndicator_BG

      private javax.media.j3d.BranchGroup clipSliceAIndicator_BG
      Arbitrary clipping branch group.
    • objClipSlices_BG

      private javax.media.j3d.BranchGroup objClipSlices_BG
      root of all the clipping slices branch group.
    • objClipSliceStatic_BG

      private javax.media.j3d.BranchGroup objClipSliceStatic_BG
      Static clipping branch group.
    • objClipSliceStaticInv_BG

      private javax.media.j3d.BranchGroup objClipSliceStaticInv_BG
      Static clipping branch group.
    • objClipSliceX_BG

      private javax.media.j3d.BranchGroup objClipSliceX_BG
      Parent for each individual clip slices branch group, childen of objClipSlices_BG.
    • objClipSliceY_BG

      private javax.media.j3d.BranchGroup objClipSliceY_BG
      Parent for each individual clip slices branch group, childen of objClipSlices_BG.
    • objClipSliceZ_BG

      private javax.media.j3d.BranchGroup objClipSliceZ_BG
      Parent for each individual clip slices branch group, childen of objClipSlices_BG.
    • objClipSliceXInv_BG

      private javax.media.j3d.BranchGroup objClipSliceXInv_BG
      Parent of the -x, -y, -z clip slices branchgroup.
    • objClipSliceYInv_BG

      private javax.media.j3d.BranchGroup objClipSliceYInv_BG
      Parent of the -x, -y, -z clip slices branchgroup.
    • objClipSliceZInv_BG

      private javax.media.j3d.BranchGroup objClipSliceZInv_BG
      Parent of the -x, -y, -z clip slices branchgroup.
    • panelA

      private JPanel panelA
      Arbitrary and static control panels.
    • panelS

      private JPanel panelS
      Arbitrary and static control panels.
    • panelSInv

      private JPanel panelSInv
      Arbitrary and static control panels.
    • panelX

      private JPanel panelX
      Declare each clipping plane control panel.
    • panelXInv

      private JPanel panelXInv
      Declare each clipping plane control panel.
    • panelY

      private JPanel panelY
      Declare each clipping plane control panel.
    • panelYInv

      private JPanel panelYInv
      Declare each clipping plane control panel.
    • panelZ

      private JPanel panelZ
      Declare each clipping plane control panel.
    • panelZInv

      private JPanel panelZInv
      Declare each clipping plane control panel.
    • radicalRatio

      private float radicalRatio
      Arbitrary clipping plane expanding ratio.
    • recordEventName

      private boolean recordEventName
      Flag indicates whether to record the clip event name.
    • rotationAxis

      private javax.vecmath.AxisAngle4f rotationAxis
      Rotation axis to sync up the action for both ModelClip arbitrary clipping plane and the clipSliceA frame box transformGroup.
    • rotationEvent

      private MouseEventVector rotationEvent
      mouse rotation event vector for the arbitrary clipping plane.
    • scroller

      private JScrollPane scroller
      The scroll pane holding the panel content. Used when the screen is small.
    • scrollPanel

      private JPanelClip.DrawingPanel scrollPanel
      Scroll panel that holding all the control components.
    • sSlice

      private int sSlice
      Record the current static clipping slice number.
    • sSliceInv

      private int sSliceInv
      Record the current static clipping slice number.
    • tabbedPane

      private JTabbedPane tabbedPane
      Tabbed Panel that hold the each clipping planes control box.
    • textStatic

      private JTextField textStatic
      Static and arbitrary text field.
    • textStaticInv

      private JTextField textStaticInv
      Static and arbitrary text field.
    • textA

      private JTextField textA
      Static and arbitrary text field.
    • textX

      private JTextField textX
      Text fields that display the slice number when slider moves.
    • textY

      private JTextField textY
      Text fields that display the slice number when slider moves.
    • textZ

      private JTextField textZ
      Text fields that display the slice number when slider moves.
    • textXInv

      private JTextField textXInv
      X, Y, Z inverse text field.
    • textYInv

      private JTextField textYInv
      X, Y, Z inverse text field.
    • textZInv

      private JTextField textZInv
      X, Y, Z inverse text field.
    • xBox

      private float xBox
      xBox, yBox, zBox from the parent scene.
    • yBox

      private float yBox
      xBox, yBox, zBox from the parent scene.
    • zBox

      private float zBox
      xBox, yBox, zBox from the parent scene.
    • xDim

      private int xDim
      Image X, Y, Z dimension.
    • yDim

      private int yDim
      Image X, Y, Z dimension.
    • zDim

      private int zDim
      Image X, Y, Z dimension.
    • xSlice

      private int xSlice
      Which slice is currently displayed in the ZY plane.
    • xSliceInv

      private int xSliceInv
      Which slice is currently displayed in the ZY plane.
    • ySlice

      private int ySlice
      Which slice is currently displayed in the XZ plane.
    • ySliceInv

      private int ySliceInv
      Which slice is currently displayed in the XZ plane.
    • zSlice

      private int zSlice
      Which slice is currently displayed in the XY plane.
    • zSliceInv

      private int zSliceInv
      Which slice is currently displayed in the XY plane.
  • Constructor Details

    • JPanelClip

      public JPanelClip(SurfaceRender parent, float xBox, float yBox, float zBox)
      3D texture surface renderer clipping dialog control.
      Parameters:
      parent - SurfaceRender Surface renderer reference
      xBox - float unit box x length
      yBox - float unit box y length
      zBox - float unit box z length
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      Changes color of slices box frame and button if color button was pressed; turns bounding box on and off if checkbox was pressed.
      Specified by:
      actionPerformed in interface ActionListener
      Specified by:
      actionPerformed in class JPanelRendererBase
      Parameters:
      event - Event that triggered function.
    • addClipSlice

      public void addClipSlice()
      Attach clipping plane branch group.
    • addClipSliceA

      public void addClipSliceA()
      Attach arbitrary clip slice bounding frame.
    • addClipSliceStatic

      public void addClipSliceStatic()
      Attach static clip slice bounding frame.
    • addClipSliceStaticInv

      public void addClipSliceStaticInv()
      Attach static inverse clip slice bounding frame.
    • addClipSliceX

      public void addClipSliceX()
      Attach X clip slice bounding frame.
    • addClipSliceXInv

      public void addClipSliceXInv()
      Attach X Invative clip slice bounding frame.
    • addClipSliceY

      public void addClipSliceY()
      Attach Y clip slice bounding frame.
    • addClipSliceYInv

      public void addClipSliceYInv()
      Attach Y Invative clip slice bounding frame.
    • addClipSliceZ

      public void addClipSliceZ()
      Attach Z clip slice bounding frame.
    • addClipSliceZInv

      public void addClipSliceZInv()
      Attach Z Invative clip slice bounding frame.
    • addToModelClip

      public void addToModelClip(javax.media.j3d.BranchGroup root)
      Add a new branch group to model clip for clipping.
      Parameters:
      root - BranchGroup Node.
    • buildClipPlanesTree

      public void buildClipPlanesTree()
      Build cliping planes tree structure. This method being called when clipping plane menu selected in the surface render.
    • buildPanelA

      public void buildPanelA()
      Build the arbitrary clipping slider control panel.
    • buildPanelS

      public void buildPanelS()
      Build static clipping slider control panel.
    • buildPanelSInv

      public void buildPanelSInv()
      Build static inverse clipping slider control panel.
    • buildPanelX

      public void buildPanelX()
      Build x slider control panel.
    • buildPanelXInv

      public void buildPanelXInv()
      Build x negative clipping slider control panel.
    • buildPanelY

      public void buildPanelY()
      Build the y clipping slider control panel.
    • buildPanelYInv

      public void buildPanelYInv()
      Build the y negative clipping slider control panel.
    • buildPanelZ

      public void buildPanelZ()
      Build the z clipping slider control panel.
    • buildPanelZInv

      public void buildPanelZInv()
      Build the z negative clipping slider control panel.
    • cropVolume

      public void cropVolume()
      Mask the clipped volume region with image min intensity value.
    • disable6Planes

      public void disable6Planes()
      Disable the 6 clipping planes.
    • disableClipA

      public void disableClipA()
      Disable the arbitrary clipping.
    • disableClipPlanes

      public void disableClipPlanes()
      Disable clipping planes when dialog window closed.
    • disableClipPlanesArbi

      public void disableClipPlanesArbi()
      Disable arbitrary clipping planes.
    • disableStaticClipping

      public void disableStaticClipping()
      Disable the eye clipping plane.
    • disableStaticInvClipping

      public void disableStaticInvClipping()
      Disable the eye inverse clipping plane.
    • displayAClipPlanePts

      public void displayAClipPlanePts()
      Display the abitrary clipping plane corner points.
    • displaySClipPlanePts

      public void displaySClipPlanePts()
      Display the static(eye) clipping plane corner points.
    • dispose

      public void dispose()
      Dispose memory.
    • enableClipArbiBehavior

      public void enableClipArbiBehavior(boolean flag)
      Enable arbitrary clipping plane behavior.
      Parameters:
      flag - true enable arbitrary clipping mouse behavior, disable the scene graph mouse behavior; false disable arbitrary clipping mouse behavior, enable the scene graph mouse behavior.
    • enableStaticClipping

      public void enableStaticClipping()
      Enable the eye clipping plane.
    • enableStaticInvClipping

      public void enableStaticInvClipping()
      Enable the eye inverse clipping plane.
    • EulerToQuat

      public final void EulerToQuat(javax.vecmath.Vector3d v, javax.vecmath.Quat4d q)
      Transform Euler angle to quaterion. Not used for now.
      Parameters:
      v - Vector3d Euler angles
      q - Quat4d quaternion
    • getAClipPlanePts

      public WildMagic.LibFoundation.Mathematics.Vector3f[] getAClipPlanePts()
      Get the arbitrary clipping plane four corners points.
      Returns:
      Vector3f[]
    • getAVisible

      public boolean getAVisible()
      Return check box arbitrary selection value.
      Returns:
      boxA.isSelected() box arbitrary slection value.
    • getAxisAngle

      public float getAxisAngle()
      Get rotation axis alpha value.
      Returns:
      aixsAngle alpha value.
    • getAxisX

      public float getAxisX()
      Get rotation axis X value.
      Returns:
      aixsX x value.
    • getAxisY

      public float getAxisY()
      Get rotation axis Y value.
      Returns:
      aixsY y value.
    • getAxisZ

      public float getAxisZ()
      Get rotation axis Z value.
      Returns:
      aixsZ z value.
    • getBoundXInv

      public float getBoundXInv()
      Get the location of the negative X slice bound.
      Returns:
      float Value in normalized range of [0,1].
    • getBoundXPos

      public float getBoundXPos()
      Get the location of the positive X slice bound.
      Returns:
      float Value in normalized range of [0,1].
    • getBoundYInv

      public float getBoundYInv()
      Get the location of the negative Y slice bound.
      Returns:
      float Value in normalized range of [0,1].
    • getBoundYPos

      public float getBoundYPos()
      Get the location of the positive Y slice bound.
      Returns:
      float Value in normalized range of [0,1].
    • getBoundZInv

      public float getBoundZInv()
      Get the location of the negative Z slice bound.
      Returns:
      float Value in normalized range of [0,1].
    • getBoundZPos

      public float getBoundZPos()
      Get the location of the positive Z slice bound.
      Returns:
      float Value in normalized range of [0,1].
    • getMainPanel

      public JPanel getMainPanel()
      Get the main control panel.
      Specified by:
      getMainPanel in class JPanelRendererBase
      Returns:
      mainPanel the whole control panel.
    • getSliceA

      public int getSliceA()
      Get arbitray slider value.
      Returns:
      Arbitrary slider value.
    • getSliceX

      public int getSliceX()
      Get x slider value.
      Returns:
      X clipping slider value.
    • getSliceXInv

      public int getSliceXInv()
      Get x negative slider value.
      Returns:
      Get y clipping slider value
    • getSliceY

      public int getSliceY()
      Get y slider value.
      Returns:
      Get y clipping slider value.
    • getSliceYInv

      public int getSliceYInv()
      Get y negative slider value.
      Returns:
      Get y inverse clipping slider value.
    • getSliceZ

      public int getSliceZ()
      Get z slider value.
      Returns:
      Get Z clippig slider value.
    • getSliceZInv

      public int getSliceZInv()
      Get z negative slider value.
      Returns:
      get z inverse clipping slider value.
    • getSliderA

      public JSlider getSliderA()
      Get arbitrary slider.
      Returns:
      get arbitrary clipping slider value.
    • getSliderX

      public JSlider getSliderX()
      Get x slider.
      Returns:
      get x clipping slider value.
    • getSliderXInv

      public JSlider getSliderXInv()
      Get x negative slider.
      Returns:
      get X inverse clipping slider value.
    • getSliderY

      public JSlider getSliderY()
      Get y slider.
      Returns:
      get Y clipping slider value.
    • getSliderYInv

      public JSlider getSliderYInv()
      Get y negative slider.
      Returns:
      get y inverse clipping slider value.
    • getSliderZ

      public JSlider getSliderZ()
      Get z slider.
      Returns:
      get z clipping slider value.
    • getSliderZInv

      public JSlider getSliderZInv()
      Get z negative slider.
      Returns:
      get z inverse clipping slider value.
    • getStaticInvVisible

      public boolean getStaticInvVisible()
      Return check box static inverse selection value.
      Returns:
      boxZInv.isSelected() box z negative slection value.
    • getStaticVisible

      public boolean getStaticVisible()
      Return check box static selection value.
      Returns:
      boxZInv.isSelected() box z negative slection value.
    • getXVisible

      public boolean getXVisible()
      Return check box X selection value.
      Returns:
      boxX.isSelected() box X selection value.
    • getXVisibleInv

      public boolean getXVisibleInv()
      Return check box X negative selection value.
      Returns:
      boxXInv.isSelected() box x negative slection value.
    • getYVisible

      public boolean getYVisible()
      Return check box Y selection value.
      Returns:
      boxY.isSelected() box Y selection value.
    • getYVisibleInv

      public boolean getYVisibleInv()
      Return check box Y negative selection value.
      Returns:
      boxYInv.isSelected() box y negative slection value.
    • getZVisible

      public boolean getZVisible()
      Return check box Z selection value.
      Returns:
      boxZ.isSelected() box z selection value.
    • getZVisibleInv

      public boolean getZVisibleInv()
      Return check box Z negative selection value.
      Returns:
      boxZInv.isSelected() box z negative slection value.
    • hideClipSliceA

      public void hideClipSliceA()
      Hides the slice frame on arbitrary clipping plane slice.
    • hideClipSliceStatic

      public void hideClipSliceStatic()
      Hides the static clipping plane box frame.
    • hideClipSliceStaticInv

      public void hideClipSliceStaticInv()
      Hides the static inverset clipping plane box frame.
    • hideClipSliceX

      public void hideClipSliceX()
      Hides the slice frame on clipping plane slice x.
    • hideClipSliceXInv

      public void hideClipSliceXInv()
      Hides the slice frame on clipping plane slice -x.
    • hideClipSliceY

      public void hideClipSliceY()
      Hides the slice frame on clipping plane slice y.
    • hideClipSliceYInv

      public void hideClipSliceYInv()
      Hides the slice frame on clipping plane slice -y.
    • hideClipSliceZ

      public void hideClipSliceZ()
      Hides the slice frame on clipping plane slice z.
    • hideClipSliceZInv

      public void hideClipSliceZInv()
      Hides the slice frame on clipping plane slice -z.
    • init

      public void init()
      Initializes GUI components.
    • initClipSliceA

      public void initClipSliceA()
      Move the arbitrary clipping bounding frame to initial position.
    • initClipSliceStatic

      public void initClipSliceStatic()
      Move the static clipping bounding frame to initial position.
    • initClipSliceStaticInv

      public void initClipSliceStaticInv()
      Move the static inverse clipping bounding frame to initial position.
    • initClipSliceX

      public void initClipSliceX()
      Move the X clipping bounding frame to initial position.
    • initClipSliceXInv

      public void initClipSliceXInv()
      Move the X Invative clipping bounding frame to initial position.
    • initClipSliceY

      public void initClipSliceY()
      Move the Y clipping bounding frame to initial position.
    • initClipSliceYInv

      public void initClipSliceYInv()
      Move the Y Nagative clipping bounding frame to initial position.
    • initClipSliceZ

      public void initClipSliceZ()
      Move the Z clipping bounding frame to initial position.
    • initClipSliceZInv

      public void initClipSliceZInv()
      Move the Z Invative clipping bounding frame to initial position.
    • invokeClippingPlanes

      public void invokeClippingPlanes()
      Invokes all the 6 clipping when 6 clipping checkbox is checked.
    • is6PlaneClipping

      public boolean is6PlaneClipping()
      Indicate whether the 6 clipping plane is active or not.
      Returns:
      is6PlaneClipping true 6 clipping plane active, false arbitrary clippiing plane active.
    • isArbitraryClipping

      public boolean isArbitraryClipping(javax.media.j3d.Shape3D pickeObject)
      Called by the JDialogSurface to find the current mouse event is from the arbitrary frame box moving or not.
      Parameters:
      pickeObject - Shape3D picked object from the JDialogSurface.
      Returns:
      true arbitrary frame box moves, false not moves
    • isClipArbiPicked

      public boolean isClipArbiPicked()
      Return the flag for the arbitrary clipping plane frame being picked or not.
      Returns:
      isClipArbiPicked true picked, false not picked.
    • isFirstTimeBuildTree

      public boolean isFirstTimeBuildTree()
      Return whether the clipping planes tree branch being built the first time.
      Returns:
      isFirstTimeBuildTree if true first time build the tree, false already built.
    • mouseClicked

      public void mouseClicked(MouseEvent event)
      Unchanged.
      Specified by:
      mouseClicked in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseDragged

      public void mouseDragged(MouseEvent event)
      If recording, adds this mouse event to the mouseEvents vector found at location current.
      Specified by:
      mouseDragged in interface MouseMotionListener
      Parameters:
      event - Original mouse event.
    • mouseEntered

      public void mouseEntered(MouseEvent event)
      Unchanged.
      Specified by:
      mouseEntered in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseExited

      public void mouseExited(MouseEvent event)
      Unchanged.
      Specified by:
      mouseExited in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseMoved

      public void mouseMoved(MouseEvent event)
      Unchanged.
      Specified by:
      mouseMoved in interface MouseMotionListener
      Parameters:
      event - Original mouse event.
    • mousePressed

      public void mousePressed(MouseEvent event)
      Unchanged.
      Specified by:
      mousePressed in interface MouseListener
      Parameters:
      event - Original mouse event.
    • mouseReleased

      public void mouseReleased(MouseEvent event)
      Used in MouseRecorder to stop one series of slide moves.
      Specified by:
      mouseReleased in interface MouseListener
      Parameters:
      event - Original mouse event.
    • QuatToEuler

      public void QuatToEuler(javax.vecmath.Quat4d q1, javax.vecmath.Vector3d v)
      Transform a quaternion to euler. This method get the Euler angles from the volume rotation.
      Parameters:
      q1 - Quat4d quaternion.
      v - Vector3d euler
    • removeClipSlice

      public void removeClipSlice()
      Removes the clip slices.
    • removeClipSliceA

      public void removeClipSliceA()
      Detaches the slice frame on arbitrary clipping plane slice.
    • removeClipSliceStatic

      public void removeClipSliceStatic()
      remove the static clipping plane box frame.
    • removeClipSliceStaticInv

      public void removeClipSliceStaticInv()
      remove the static inverse clipping plane box frame.
    • removeClipSliceX

      public void removeClipSliceX()
      Detaches the slice frame on clipping plane slice x.
    • removeClipSliceXInv

      public void removeClipSliceXInv()
      Detaches the slice frame on clipping plane slice -x.
    • removeClipSliceY

      public void removeClipSliceY()
      Detaches the slice frame on clipping plane slice y.
    • removeClipSliceYInv

      public void removeClipSliceYInv()
      Detaches the slice frame on clipping plane slice -y.
    • removeClipSliceZ

      public void removeClipSliceZ()
      Detaches the slice frame on clipping plane slice z.
    • removeClipSliceZInv

      public void removeClipSliceZInv()
      Detaches the slice frame on clipping plane slice -z.
    • removeFromModelClip

      public void removeFromModelClip(javax.media.j3d.BranchGroup root)
      Remove the branch group passed in.
      Parameters:
      root - BranchGroup node to be removed.
    • resizePanel

      public void resizePanel(int panelWidth, int frameHeight)
      Resizig the control panel with ViewJFrameVolumeView's frame width and height.
      Overrides:
      resizePanel in class JPanelRendererBase
      Parameters:
      panelWidth - panel width
      frameHeight - parent frame height.
    • saveCropImage

      public void saveCropImage()
      Save the cropped image.
    • setArbiPlanePickable

      public void setArbiPlanePickable(boolean _picked)
      setGUI setup the flag of the arbitary clipping frame box.
      Parameters:
      _picked - true picked, false not picked.
    • setASliderEnabled

      public void setASliderEnabled(boolean flag)
      Sets the arbitray clip slider and the labels. state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setCheckBoxA

      public void setCheckBoxA(boolean isSelected)
      Set the slider arbitrary checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxStatic

      public void setCheckBoxStatic(boolean isSelected)
      Set the slider Static checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxStaticInv

      public void setCheckBoxStaticInv(boolean isSelected)
      Set the slider Static inverse checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxX

      public void setCheckBoxX(boolean isSelected)
      Set the slider X checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxXInv

      public void setCheckBoxXInv(boolean isSelected)
      Set the slider X inverse checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxY

      public void setCheckBoxY(boolean isSelected)
      Set the slider Y checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxYInv

      public void setCheckBoxYInv(boolean isSelected)
      Set the slider Y inverse checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxZ

      public void setCheckBoxZ(boolean isSelected)
      Set the slider Z checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setCheckBoxZInv

      public void setCheckBoxZInv(boolean isSelected)
      Set the slider Z inverse checkBox with the passed in value.
      Parameters:
      isSelected - if true selected, otherwise not selected.
    • setClipSliceAColor

      public void setClipSliceAColor(Color color)
      Sets the color of the arbitrary clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceAwithRotate

      public void setClipSliceAwithRotate(float _axisX, float _axisY, float _axisZ, float _axisAngle)
      During mouse recorder diaplay, setup the rotatino axis for both arbiTG and mcArbiTG.
      Parameters:
      _axisX - rotation axis x value.
      _axisY - rotation axis y value.
      _axisZ - rotation axis z value.
      _axisAngle - rotation axis alpha value.
    • setClipSliceSColor

      public void setClipSliceSColor(Color color)
      Sets the color of the static clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceSInvColor

      public void setClipSliceSInvColor(Color color)
      Sets the color of the static inverse clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceXColor

      public void setClipSliceXColor(Color color)
      Sets the color of the x clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceXInvColor

      public void setClipSliceXInvColor(Color color)
      Sets the color of the -x clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceYColor

      public void setClipSliceYColor(Color color)
      Sets the color of the y cliping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceYInvColor

      public void setClipSliceYInvColor(Color color)
      Sets the color of the -y cliping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceZColor

      public void setClipSliceZColor(Color color)
      Sets the color of the z clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setClipSliceZInvColor

      public void setClipSliceZInvColor(Color color)
      Sets the color of the -z clipping plane slice frame.
      Parameters:
      color - Color to set to.
    • setStaticInvSliderEnabled

      public void setStaticInvSliderEnabled(boolean flag)
      Sets the static inverse slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setStaticSliderEnabled

      public void setStaticSliderEnabled(boolean flag)
      Sets the static slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setXSliderEnabled

      public void setXSliderEnabled(boolean flag)
      Sets the x slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setXSliderInvEnabled

      public void setXSliderInvEnabled(boolean flag)
      Sets the x slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setYSliderEnabled

      public void setYSliderEnabled(boolean flag)
      Sets the y slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setYSliderInvEnabled

      public void setYSliderInvEnabled(boolean flag)
      Sets the y slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setZSliderEnabled

      public void setZSliderEnabled(boolean flag)
      Sets the z slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • setZSliderInvEnabled

      public void setZSliderInvEnabled(boolean flag)
      Sets the z slider and the labels beside and beneath it to the state given by flag.
      Parameters:
      flag - if true enable, otherwise disable.
    • stateChanged

      public void stateChanged(ChangeEvent e)
      Sets how the image plane should be displayed depending on value of slider.
      Specified by:
      stateChanged in interface ChangeListener
      Parameters:
      e - Event that triggered this function.
    • swapModelClipBG

      public void swapModelClipBG(boolean flag)
      Swap ModelClip Branch group between the 6 clipping plane and the arbitray clipping plane.
      Parameters:
      flag - true enable the 6 clipping planes, false enable the arbitrary clipping plane.
    • transformChanged

      public void transformChanged(int type, javax.media.j3d.Transform3D transform)
      Needed for this to implement MouseBehaviorCallback.
      Specified by:
      transformChanged in interface com.sun.j3d.utils.behaviors.mouse.MouseBehaviorCallback
      Parameters:
      type - transformation type.
      transform - transformation matrix.
    • undoCrop

      public void undoCrop()
      Undo the crop of the volume.
    • updateClipPlanesEqn

      public void updateClipPlanesEqn()
      Upadate six clipping planes' plane equation.
    • updateClipSlice

      public void updateClipSlice()
      Update clipping planes.
    • updateClipSliceA

      public void updateClipSliceA()
      Sets new frame around arbitrary clip plane slice based on the new position.
    • updateClipSliceAwithRotate

      public void updateClipSliceAwithRotate(javax.media.j3d.Transform3D transform)
      Update arbitrary clip plane's transform.
      Parameters:
      transform - The current transform with the mouse moves.
    • updateClipSliceStatic

      public void updateClipSliceStatic()
      Sets new frame around clip plane slice -z based on the new position.
    • updateClipSliceStaticInv

      public void updateClipSliceStaticInv()
      Sets new frame around clip plane slice -z based on the new position.
    • updateClipSliceX

      public void updateClipSliceX()
      Sets new frame around clip plane slice x based on the new position.
    • updateClipSliceXInv

      public void updateClipSliceXInv()
      Sets new frame around clip plane slice -x based on the new position.
    • updateClipSliceY

      public void updateClipSliceY()
      Sets new frame around clip plane slice y based on the new position.
    • updateClipSliceYInv

      public void updateClipSliceYInv()
      Sets new frame around clip plane slice -y based on the new position.
    • updateClipSliceZ

      public void updateClipSliceZ()
      Sets new frame around clip plane slice z based on the new position.
    • updateClipSliceZInv

      public void updateClipSliceZInv()
      Sets new frame around clip plane slice -z based on the new position.
    • windowClosing

      public void windowClosing(WindowEvent e)
      Accessor that closing the mouse recorder window frame.
      Parameters:
      e - Window event.
    • backupImage

      protected void backupImage(ModelImage kImageA, ModelImage kImageB)
      Called by the TextureSculptor or VolumeSculptor objects. The function stores the original volume data back to the original values in the m_aiImage_backup data members.
      Parameters:
      kImageA - image A reference.
      kImageB - image B reference.
    • setBoxColor

      protected void setBoxColor(JButton button, Color color)
      Calls the appropriate method in the parent frame.
      Parameters:
      button - color button.
      color - color reference.
    • addControlPanel

      private void addControlPanel(JPanel panel, Component c, GridBagConstraints gbc, int x, int y, int w, int h)
      Helper method that adds components to the control panel for the grid bag layout.
      Parameters:
      panel - control panel.
      c - Component added to the control panel.
      gbc - GridBagConstraints of added component.
      x - Gridx location
      y - Gridy location
      w - Gridwidth
      h - Gridheight
    • drawSphere

      private void drawSphere(int index, float x, float y, float z)
      Draw the red sphere with the given coordinate.
      Parameters:
      index - sphere index
      x - float x position
      y - float y position
      z - float z position
    • initSphereBranch

      private void initSphereBranch()
      Initialize the red sphere image scene graph structure.
    • transform

      private void transform(javax.vecmath.Vector4f vIn)
      Transform a point rotation inverse to the volume rotation.
      Parameters:
      vIn - point position in vector
    • updateVolumeRenderClipPlane

      private void updateVolumeRenderClipPlane()
      Update the volume render's clip plane with all new positions.