java.lang.Object
gov.nih.mipav.view.renderer.J3D.surfaceview.rfaview.Probe
All Implemented Interfaces:
MouseBehaviorCallback

public class Probe extends Object implements MouseBehaviorCallback

Title: Probe

Description: This class defines the basic geometry structures of the probe, such as Java3D image scene graph, detection entry point, bone detection point, and probe detection guide line. The class also constructs three types of probe, default type, thermal heat type, and regular type. Each probe has its own geometry shape and appearance. The probe detection is used only by the 3D texture render for the current development phase. Raycast based renderer will have the RFA probe detection later.

Author:
Ruida Cheng
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) javax.vecmath.Color3f
    DOCUMENT ME!
    protected javax.media.j3d.BranchGroup
    The blue sphere branch group that branches underneath the vasculatureBG, and represents the blue sphere branch group.
    protected com.sun.j3d.utils.geometry.Sphere
    The geometry group of the blue sphere.
    protected javax.media.j3d.TransformGroup
    blue sphere transform group that set up the translation.
    protected javax.media.j3d.BranchGroup
    The root branch group of the bone.
    protected javax.media.j3d.BranchGroup
    The root branch group of the probe burning geometry shape.
    static int
    The cool-tip type probe, which trys to mimic the real CoolTip probe.
    protected CoolTipProbe
    Reference to the cool-tip probe geometry structures.
    private com.sun.j3d.utils.geometry.Cylinder
    X cylinder of the red target sign.
    private javax.media.j3d.TransformGroup
    X cylinder transform group that hold the X cylinder translation.
    private com.sun.j3d.utils.geometry.Cylinder
    Y cylinder of the red target sign.
    private javax.media.j3d.TransformGroup
    Y cylinder transform group that hold the Y cylinder translation.
    private com.sun.j3d.utils.geometry.Cylinder
    Z cylinder of the red target sign.
    private javax.media.j3d.TransformGroup
    Z cylinder transform group that hold the Z cylinder translation.
    protected com.sun.j3d.utils.geometry.Sphere[]
    Spheres hold the probe detetion starting and ending point geometry shapes.
    static int
    The default probe type probe, which is in cyan color.
    protected DefaultProbe
    Reference to the default probe geometry structures.
    (package private) javax.vecmath.Color3f
    DOCUMENT ME!
    protected javax.media.j3d.TransformGroup
    Probe detection ending point transform group that represents the probe guide line ending point.
    private javax.vecmath.Point3f
    The vector record the translation coordinate of the entry point.
    protected javax.media.j3d.BranchGroup
    The root branch group of the enty point.
    (package private) javax.vecmath.Color3f
    DOCUMENT ME!
    protected javax.media.j3d.BranchGroup
    The green sphere branch group that branches underneath the entryPointBG, and represents the green sphere.
    protected com.sun.j3d.utils.geometry.Sphere
    The geometry group of the green sphere.
    protected javax.media.j3d.TransformGroup
    Green sphere transform group that set up the translation.
    protected javax.media.j3d.BranchGroup
    The root branch group of the indicator.
    private javax.media.j3d.BranchGroup
    Red guide line branch group.
    private float
    DOCUMENT ME!
    private javax.media.j3d.Transform3D
    Transform3D to twist the volume about the Probe axis:.
    private javax.media.j3d.BranchGroup
    Normal rotation red line branch group.
    private javax.media.j3d.Shape3D
    Nomal red line shape.
    private int
    Since we have three type of probes, we set three the number of probes.
    (package private) javax.vecmath.Color3f
    DOCUMENT ME!
    protected com.sun.j3d.utils.picking.PickCanvas
    Used to set the probe red guiding line pickable.
    private javax.media.j3d.TransformGroup
    The probe's root transform group, which holds the red target sign, guide line, and the actual probe geometry shape.
    protected javax.media.j3d.BranchGroup
    The probe mouse behavior branchgroup root.
    protected javax.media.j3d.BranchGroup
    The root branch group of the probe.
    protected javax.media.j3d.BranchGroup
    Branch group for all the probes.
    protected javax.media.j3d.TransformGroup
    Transform group for all the probes.
    protected MouseRotate
    The probe mouse rotation behavior.
    protected javax.media.j3d.BranchGroup[]
    Parent of each light bulb.
    protected javax.media.j3d.BranchGroup
    Parent of all the light bulbs.
    private javax.media.j3d.Transform3D
    The current tranform positioning the probe in java3d space.
    protected MouseTranslate
    The probe translation behavior.
    private int
    Initialize the probe type to default probe type.
    protected MouseZoom
    The probe zoom behavior.
    (package private) javax.vecmath.Color3f
    Basic color scheme.
    static int
    The regular type probe, which is in gray color.
    protected RegularProbe
    Reference to the regular probe geometry structures.
    private javax.media.j3d.BranchGroup
    Entry point rotation redline branch group.
    private javax.media.j3d.Shape3D
    roation red guide line shape.
    protected javax.media.j3d.TransformGroup
    Probe detection starting point transform group that represents the probe guide line starting point.
    protected SurfaceRender
    The surface render reference.
    static int
    The thermal heat type probe, which is in blue color.
    protected ThermalProbe
    Reference to the thermal heat probe geometry structures.
    protected javax.media.j3d.BranchGroup
    The root branch group of the vasculatureBG.
    (package private) javax.vecmath.Color3f
    DOCUMENT ME!
    protected javax.media.j3d.BranchGroup
    The yellow sphere branch group that branches underneath the boneBG, and repreents the yellow sphere branch group.
    protected com.sun.j3d.utils.geometry.Sphere
    The geometry group of the yellow sphere.
    protected javax.media.j3d.TransformGroup
    Yellow sphere transform group that set up the translation.
    private float
    Y original coordinate value.

    Fields inherited from interface gov.nih.mipav.view.renderer.J3D.surfaceview.rfaview.mouse.MouseBehaviorCallback

    ORBIT, PROPERTIES, ROTATE, ROTATE_LEFTBUTTON, SELECTION, TRANSLATE, ZOOM
  • Constructor Summary

    Constructors
    Constructor
    Description
    Probe(SurfaceRender _surfaceRender)
    The probe contructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    activeProbe(int type)
    Active the corresponding probe with the given probe type.
    void
    Draw the red guiding line along the start and end point.
    void
    Build the bone ( yellow sphere ) branch group image scene graph.
    void
    Build the entry point ( green sphere ) branch group image scene graph.
    private void
    buildProbes(int iNumProbes)
    Build the three types of probe.
    void
    Build the vasculature ( blue sphere ) branch group image scene graph.
    private void
    createImageSceneGraph(int iNumProbes)
    Create Java3D image scene graph structure.
    void
    Enable the probe to rotate around the entry point.
    void
    enableProbeBehavior(boolean flag)
    Enable probe mouse behavior.
    boolean
    findProbe(javax.media.j3d.Shape3D pickedShape)
    Find the probe with the given geometry shape.
    javax.media.j3d.Transform3D
    The red target sign's x cylinder transform group, which regards as the center of the burning point.
    javax.media.j3d.TransformGroup
    Get the red target sign x cylinder transform group.
    javax.media.j3d.Transform3D
    Get the end point transform.
    javax.vecmath.Point3f
    Get the entry pont transform group.
    javax.media.j3d.BranchGroup
    Return the root to the probes branches.
    javax.media.j3d.Transform3D
    Return the probe position transformation.
    int
    Return the current active probe type.
    javax.media.j3d.TransformGroup
    Get the probe's transform group.
    javax.media.j3d.Transform3D
    Get the start point transform.
    javax.media.j3d.Transform3D
    Get the current probe transform position.
    void
    Create image scene graph.
    boolean
    Check the probe root branch group is attached or not.
    void
    Detach and attach the probe root branch group.
    void
    Detach all the detection sphere branches.
    void
    Resets the probe navigation (rotation, translation, zoom) to the origin.
    protected void
    setProbeCoordinate(float value)
    Set the probe translation in its local coordinate.
    void
    setProbeGreenColor(boolean flag)
    When the probe is picked, change the probe geometry shape color to green to indicate picked.
    void
    transformChanged(int type, javax.media.j3d.Transform3D transform)
    When the probe is picked and rotated by mouse, detecting the probing tissue along the probing path.
    void
    twist(float fValue, boolean bIsAdjusting)
    Called when the JPanelProbe twist slider is changed.
    void
    updateBoneBG(float x, float y, float z)
    Update the yellow sphere's tranlation component with the given x, y, z coordinates.
    void
    updateEntryPointBG(float x, float y, float z)
    Update the green sphere's translation component with the given x, y, z coordinate.
    void
    updatePosition(javax.vecmath.Point3f kPosition)
    Set the probe's translation.
    private void
    updateRotationRedline(javax.vecmath.Vector3f startPtTransVector, javax.vecmath.Vector3f endPtTransVector)
    Update the shape of the entry point rotation red line.
    void
    updateVasculatureBG(float x, float y, float z)
    Update the blue sphere's translation component with the given x, y, z coordinate.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_PROBE

      public static int DEFAULT_PROBE
      The default probe type probe, which is in cyan color.
    • THERMAL_HEAT_PROBE

      public static int THERMAL_HEAT_PROBE
      The thermal heat type probe, which is in blue color.
    • REGULAR_PROBE

      public static int REGULAR_PROBE
      The regular type probe, which is in gray color.
    • COOLTIP_PROBE

      public static int COOLTIP_PROBE
      The cool-tip type probe, which trys to mimic the real CoolTip probe.
    • blueBG

      protected javax.media.j3d.BranchGroup blueBG
      The blue sphere branch group that branches underneath the vasculatureBG, and represents the blue sphere branch group.
    • blueSphere

      protected com.sun.j3d.utils.geometry.Sphere blueSphere
      The geometry group of the blue sphere.
    • blueSphereTG

      protected javax.media.j3d.TransformGroup blueSphereTG
      blue sphere transform group that set up the translation.
    • boneBG

      protected javax.media.j3d.BranchGroup boneBG
      The root branch group of the bone.
    • burnBG

      protected javax.media.j3d.BranchGroup burnBG
      The root branch group of the probe burning geometry shape.
    • coolTipProbe

      protected CoolTipProbe coolTipProbe
      Reference to the cool-tip probe geometry structures.
    • dashSpheres

      protected com.sun.j3d.utils.geometry.Sphere[] dashSpheres
      Spheres hold the probe detetion starting and ending point geometry shapes.
    • defaultProbe

      protected DefaultProbe defaultProbe
      Reference to the default probe geometry structures.
    • endPointTG

      protected javax.media.j3d.TransformGroup endPointTG
      Probe detection ending point transform group that represents the probe guide line ending point.
    • entryPointBG

      protected javax.media.j3d.BranchGroup entryPointBG
      The root branch group of the enty point.
    • greenBG

      protected javax.media.j3d.BranchGroup greenBG
      The green sphere branch group that branches underneath the entryPointBG, and represents the green sphere.
    • greenSphere

      protected com.sun.j3d.utils.geometry.Sphere greenSphere
      The geometry group of the green sphere.
    • greenSphereTG

      protected javax.media.j3d.TransformGroup greenSphereTG
      Green sphere transform group that set up the translation.
    • indicatorBG

      protected javax.media.j3d.BranchGroup indicatorBG
      The root branch group of the indicator. The group is the parent root of boneBG, entryPointBG, vascaulatureBG.
    • pickCanvas

      protected com.sun.j3d.utils.picking.PickCanvas pickCanvas
      Used to set the probe red guiding line pickable.
    • probeBehaviorBG

      protected javax.media.j3d.BranchGroup probeBehaviorBG
      The probe mouse behavior branchgroup root.
    • probeRootBG

      protected javax.media.j3d.BranchGroup probeRootBG
      The root branch group of the probe.
    • probeRootParentBG

      protected javax.media.j3d.BranchGroup probeRootParentBG
      Branch group for all the probes.
    • probeRootParentTG

      protected javax.media.j3d.TransformGroup probeRootParentTG
      Transform group for all the probes.
    • probeRotate

      protected MouseRotate probeRotate
      The probe mouse rotation behavior.
    • probeShapeBG

      protected javax.media.j3d.BranchGroup[] probeShapeBG
      Parent of each light bulb.
    • probesRootBG

      protected javax.media.j3d.BranchGroup probesRootBG
      Parent of all the light bulbs.
    • probeTranslate

      protected MouseTranslate probeTranslate
      The probe translation behavior.
    • probeZoom

      protected MouseZoom probeZoom
      The probe zoom behavior.
    • regularProbe

      protected RegularProbe regularProbe
      Reference to the regular probe geometry structures.
    • startPointTG

      protected javax.media.j3d.TransformGroup startPointTG
      Probe detection starting point transform group that represents the probe guide line starting point.
    • surfaceRender

      protected SurfaceRender surfaceRender
      The surface render reference.
    • thermalProbe

      protected ThermalProbe thermalProbe
      Reference to the thermal heat probe geometry structures.
    • vasculatureBG

      protected javax.media.j3d.BranchGroup vasculatureBG
      The root branch group of the vasculatureBG.
    • yellowBG

      protected javax.media.j3d.BranchGroup yellowBG
      The yellow sphere branch group that branches underneath the boneBG, and repreents the yellow sphere branch group.
    • yellowSphere

      protected com.sun.j3d.utils.geometry.Sphere yellowSphere
      The geometry group of the yellow sphere.
    • yellowSphereTG

      protected javax.media.j3d.TransformGroup yellowSphereTG
      Yellow sphere transform group that set up the translation.
    • blue

      javax.vecmath.Color3f blue
      DOCUMENT ME!
    • emissiveColor

      javax.vecmath.Color3f emissiveColor
      DOCUMENT ME!
    • green

      javax.vecmath.Color3f green
      DOCUMENT ME!
    • orange

      javax.vecmath.Color3f orange
      DOCUMENT ME!
    • red

      javax.vecmath.Color3f red
      Basic color scheme.
    • yellow

      javax.vecmath.Color3f yellow
      DOCUMENT ME!
    • cylinderX

      private com.sun.j3d.utils.geometry.Cylinder cylinderX
      X cylinder of the red target sign.
    • cylinderXTG

      private javax.media.j3d.TransformGroup cylinderXTG
      X cylinder transform group that hold the X cylinder translation.
    • cylinderY

      private com.sun.j3d.utils.geometry.Cylinder cylinderY
      Y cylinder of the red target sign.
    • cylinderYTG

      private javax.media.j3d.TransformGroup cylinderYTG
      Y cylinder transform group that hold the Y cylinder translation.
    • cylinderZ

      private com.sun.j3d.utils.geometry.Cylinder cylinderZ
      Z cylinder of the red target sign.
    • cylinderZTG

      private javax.media.j3d.TransformGroup cylinderZTG
      Z cylinder transform group that hold the Z cylinder translation.
    • entryPoint

      private javax.vecmath.Point3f entryPoint
      The vector record the translation coordinate of the entry point.
    • lineBG

      private javax.media.j3d.BranchGroup lineBG
      Red guide line branch group.
    • m_fTwistAmount

      private float m_fTwistAmount
      DOCUMENT ME!
    • m_kTwist

      private javax.media.j3d.Transform3D m_kTwist
      Transform3D to twist the volume about the Probe axis:.
    • nomalRedlineBG

      private javax.media.j3d.BranchGroup nomalRedlineBG
      Normal rotation red line branch group.
    • nomalRedLineShape

      private javax.media.j3d.Shape3D nomalRedLineShape
      Nomal red line shape.
    • numProbes

      private int numProbes
      Since we have three type of probes, we set three the number of probes.
    • probe

      private javax.media.j3d.TransformGroup probe
      The probe's root transform group, which holds the red target sign, guide line, and the actual probe geometry shape.
    • probeTransform

      private javax.media.j3d.Transform3D probeTransform
      The current tranform positioning the probe in java3d space.
    • probeType

      private int probeType
      Initialize the probe type to default probe type.
    • rotationRedlineBG

      private javax.media.j3d.BranchGroup rotationRedlineBG
      Entry point rotation redline branch group.
    • rotationRedLineshape

      private javax.media.j3d.Shape3D rotationRedLineshape
      roation red guide line shape.
    • yOrigin

      private float yOrigin
      Y original coordinate value.
  • Constructor Details

    • Probe

      public Probe(SurfaceRender _surfaceRender)
      The probe contructor. Initialize the image scene graph and build the three types of probe.
      Parameters:
      _surfaceRender - SurfaceRender parent reference.
  • Method Details

    • activeProbe

      public void activeProbe(int type)
      Active the corresponding probe with the given probe type.
      Parameters:
      type - probe type.
    • addGuideLine

      public void addGuideLine()
      Draw the red guiding line along the start and end point.
    • buildBoneBG

      public void buildBoneBG()
      Build the bone ( yellow sphere ) branch group image scene graph.
    • buildEntryPointBG

      public void buildEntryPointBG()
      Build the entry point ( green sphere ) branch group image scene graph.
    • buildVasculatureBG

      public void buildVasculatureBG()
      Build the vasculature ( blue sphere ) branch group image scene graph.
    • enableEntryPointRotation

      public void enableEntryPointRotation(boolean flag)
      Enable the probe to rotate around the entry point.
      Parameters:
      flag - boolean true means around the entry point, false around the origin.
    • enableProbeBehavior

      public void enableProbeBehavior(boolean flag)
      Enable probe mouse behavior.
      Parameters:
      flag - true means turn on, false means turn off.
    • findProbe

      public boolean findProbe(javax.media.j3d.Shape3D pickedShape)
      Find the probe with the given geometry shape.
      Parameters:
      pickedShape - geometry shape of the probe.
      Returns:
      boolean find the probe shape or not
    • getCoordinate

      public javax.media.j3d.Transform3D getCoordinate()
      The red target sign's x cylinder transform group, which regards as the center of the burning point.
      Returns:
      Transform3D burning point's transform in world coordinate.
    • getCylinderXTG

      public javax.media.j3d.TransformGroup getCylinderXTG()
      Get the red target sign x cylinder transform group.
      Returns:
      TransformGroup x cylidner transform gorup.
    • getEndPointCoordinate

      public javax.media.j3d.Transform3D getEndPointCoordinate()
      Get the end point transform. Used by the burning process to decide the recorded probing path.
      Returns:
      Transform3D end point transform in world coordinate.
    • getEntryPoint

      public javax.vecmath.Point3f getEntryPoint()
      Get the entry pont transform group. Used by the burning process to decide the recorded probing entry point.
      Returns:
      Point3f get the entry point transform in world coordinate.
    • getProbesRootBG

      public javax.media.j3d.BranchGroup getProbesRootBG()
      Return the root to the probes branches.
      Returns:
      BranchGroup probes branch group
    • getProbeTransform

      public javax.media.j3d.Transform3D getProbeTransform()
      Return the probe position transformation.
      Returns:
      the probe transform
    • getProbeType

      public int getProbeType()
      Return the current active probe type.
      Returns:
      int probe type.
    • getProbRootParentTG

      public javax.media.j3d.TransformGroup getProbRootParentTG()
      Get the probe's transform group.
      Returns:
      TransformGroup the probe's transform group.
    • getStartPointCoordinate

      public javax.media.j3d.Transform3D getStartPointCoordinate()
      Get the start point transform. Used by the burning process to decide the recorded probing path.
      Returns:
      Transform3D start point transform in world coordinate.
    • getTransform

      public javax.media.j3d.Transform3D getTransform()
      Get the current probe transform position.
      Returns:
      Transform3D probe tranform
    • init

      public void init()
      Create image scene graph.
    • isProbeRootParentBGLive

      public boolean isProbeRootParentBGLive()
      Check the probe root branch group is attached or not. JPanelProbe call this method during probe detection and burning.
      Returns:
      boolean probe branch group live or not.
    • resetProbeTransform

      public void resetProbeTransform()
      Resets the probe navigation (rotation, translation, zoom) to the origin. Updates the SurfaceRender with the reset probe position.
    • removeIndicator

      public void removeIndicator()
      Detach all the detection sphere branches.
    • setProbeGreenColor

      public void setProbeGreenColor(boolean flag)
      When the probe is picked, change the probe geometry shape color to green to indicate picked.
      Parameters:
      flag - boolean picked or not.
    • transformChanged

      public void transformChanged(int type, javax.media.j3d.Transform3D transform)
      When the probe is picked and rotated by mouse, detecting the probing tissue along the probing path.
      Specified by:
      transformChanged in interface MouseBehaviorCallback
      Parameters:
      type - not used.
      transform - Transform3D not used.
    • twist

      public void twist(float fValue, boolean bIsAdjusting)
      Called when the JPanelProbe twist slider is changed. The twist transform is updated based on the input value fValue, and passed to the SurfaceRender class for display.
      Parameters:
      fValue - float rotation angle in degree
      bIsAdjusting - boolean adjusting flag
    • updateBoneBG

      public void updateBoneBG(float x, float y, float z)
      Update the yellow sphere's tranlation component with the given x, y, z coordinates.
      Parameters:
      x - x position in the world coordinate.
      y - y position in the world coordinate.
      z - z position in the world coordinate.
    • updateEntryPointBG

      public void updateEntryPointBG(float x, float y, float z)
      Update the green sphere's translation component with the given x, y, z coordinate.
      Parameters:
      x - x position in the world coordinate.
      y - y position in the world coordinate.
      z - z position in the world coordinate.
    • updatePosition

      public void updatePosition(javax.vecmath.Point3f kPosition)
      Set the probe's translation.
      Parameters:
      kPosition - the probe's translation component.
    • updateVasculatureBG

      public void updateVasculatureBG(float x, float y, float z)
      Update the blue sphere's translation component with the given x, y, z coordinate.
      Parameters:
      x - x position in the world coordinate.
      y - y position in the world coordinate.
      z - z position in the world coordinate.
    • setProbeCoordinate

      protected void setProbeCoordinate(float value)
      Set the probe translation in its local coordinate.
      Parameters:
      value - translation component y value.
    • buildProbes

      private void buildProbes(int iNumProbes)
      Build the three types of probe. The basic geometry structure of the probes include the red target, entry and ending point, the red guide line, etc.
      Parameters:
      iNumProbes - total different types of the probe.
    • createImageSceneGraph

      private void createImageSceneGraph(int iNumProbes)
      Create Java3D image scene graph structure.
      Parameters:
      iNumProbes - number of the probe types.
    • updateRotationRedline

      private void updateRotationRedline(javax.vecmath.Vector3f startPtTransVector, javax.vecmath.Vector3f endPtTransVector)
      Update the shape of the entry point rotation red line.
      Parameters:
      startPtTransVector - red line start point vector
      endPtTransVector - red line end point vector