Class Probe
java.lang.Object
gov.nih.mipav.view.renderer.J3D.surfaceview.rfaview.Probe
- All Implemented Interfaces:
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
FieldsModifier and TypeFieldDescription(package private) javax.vecmath.Color3fDOCUMENT ME!protected javax.media.j3d.BranchGroupThe blue sphere branch group that branches underneath the vasculatureBG, and represents the blue sphere branch group.protected com.sun.j3d.utils.geometry.SphereThe geometry group of the blue sphere.protected javax.media.j3d.TransformGroupblue sphere transform group that set up the translation.protected javax.media.j3d.BranchGroupThe root branch group of the bone.protected javax.media.j3d.BranchGroupThe root branch group of the probe burning geometry shape.static intThe cool-tip type probe, which trys to mimic the real CoolTip probe.protected CoolTipProbeReference to the cool-tip probe geometry structures.private com.sun.j3d.utils.geometry.CylinderX cylinder of the red target sign.private javax.media.j3d.TransformGroupX cylinder transform group that hold the X cylinder translation.private com.sun.j3d.utils.geometry.CylinderY cylinder of the red target sign.private javax.media.j3d.TransformGroupY cylinder transform group that hold the Y cylinder translation.private com.sun.j3d.utils.geometry.CylinderZ cylinder of the red target sign.private javax.media.j3d.TransformGroupZ 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 intThe default probe type probe, which is in cyan color.protected DefaultProbeReference to the default probe geometry structures.(package private) javax.vecmath.Color3fDOCUMENT ME!protected javax.media.j3d.TransformGroupProbe detection ending point transform group that represents the probe guide line ending point.private javax.vecmath.Point3fThe vector record the translation coordinate of the entry point.protected javax.media.j3d.BranchGroupThe root branch group of the enty point.(package private) javax.vecmath.Color3fDOCUMENT ME!protected javax.media.j3d.BranchGroupThe green sphere branch group that branches underneath the entryPointBG, and represents the green sphere.protected com.sun.j3d.utils.geometry.SphereThe geometry group of the green sphere.protected javax.media.j3d.TransformGroupGreen sphere transform group that set up the translation.protected javax.media.j3d.BranchGroupThe root branch group of the indicator.private javax.media.j3d.BranchGroupRed guide line branch group.private floatDOCUMENT ME!private javax.media.j3d.Transform3DTransform3D to twist the volume about the Probe axis:.private javax.media.j3d.BranchGroupNormal rotation red line branch group.private javax.media.j3d.Shape3DNomal red line shape.private intSince we have three type of probes, we set three the number of probes.(package private) javax.vecmath.Color3fDOCUMENT ME!protected com.sun.j3d.utils.picking.PickCanvasUsed to set the probe red guiding line pickable.private javax.media.j3d.TransformGroupThe probe's root transform group, which holds the red target sign, guide line, and the actual probe geometry shape.protected javax.media.j3d.BranchGroupThe probe mouse behavior branchgroup root.protected javax.media.j3d.BranchGroupThe root branch group of the probe.protected javax.media.j3d.BranchGroupBranch group for all the probes.protected javax.media.j3d.TransformGroupTransform group for all the probes.protected MouseRotateThe probe mouse rotation behavior.protected javax.media.j3d.BranchGroup[]Parent of each light bulb.protected javax.media.j3d.BranchGroupParent of all the light bulbs.private javax.media.j3d.Transform3DThe current tranform positioning the probe in java3d space.protected MouseTranslateThe probe translation behavior.private intInitialize the probe type to default probe type.protected MouseZoomThe probe zoom behavior.(package private) javax.vecmath.Color3fBasic color scheme.static intThe regular type probe, which is in gray color.protected RegularProbeReference to the regular probe geometry structures.private javax.media.j3d.BranchGroupEntry point rotation redline branch group.private javax.media.j3d.Shape3Droation red guide line shape.protected javax.media.j3d.TransformGroupProbe detection starting point transform group that represents the probe guide line starting point.protected SurfaceRenderThe surface render reference.static intThe thermal heat type probe, which is in blue color.protected ThermalProbeReference to the thermal heat probe geometry structures.protected javax.media.j3d.BranchGroupThe root branch group of the vasculatureBG.(package private) javax.vecmath.Color3fDOCUMENT ME!protected javax.media.j3d.BranchGroupThe yellow sphere branch group that branches underneath the boneBG, and repreents the yellow sphere branch group.protected com.sun.j3d.utils.geometry.SphereThe geometry group of the yellow sphere.protected javax.media.j3d.TransformGroupYellow sphere transform group that set up the translation.private floatY 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 -
Method Summary
Modifier and TypeMethodDescriptionvoidactiveProbe(int type) Active the corresponding probe with the given probe type.voidDraw the red guiding line along the start and end point.voidBuild the bone ( yellow sphere ) branch group image scene graph.voidBuild the entry point ( green sphere ) branch group image scene graph.private voidbuildProbes(int iNumProbes) Build the three types of probe.voidBuild the vasculature ( blue sphere ) branch group image scene graph.private voidcreateImageSceneGraph(int iNumProbes) Create Java3D image scene graph structure.voidenableEntryPointRotation(boolean flag) Enable the probe to rotate around the entry point.voidenableProbeBehavior(boolean flag) Enable probe mouse behavior.booleanfindProbe(javax.media.j3d.Shape3D pickedShape) Find the probe with the given geometry shape.javax.media.j3d.Transform3DThe red target sign's x cylinder transform group, which regards as the center of the burning point.javax.media.j3d.TransformGroupGet the red target sign x cylinder transform group.javax.media.j3d.Transform3DGet the end point transform.javax.vecmath.Point3fGet the entry pont transform group.javax.media.j3d.BranchGroupReturn the root to the probes branches.javax.media.j3d.Transform3DReturn the probe position transformation.intReturn the current active probe type.javax.media.j3d.TransformGroupGet the probe's transform group.javax.media.j3d.Transform3DGet the start point transform.javax.media.j3d.Transform3DGet the current probe transform position.voidinit()Create image scene graph.booleanCheck the probe root branch group is attached or not.voidDetach and attach the probe root branch group.voidDetach all the detection sphere branches.voidResets the probe navigation (rotation, translation, zoom) to the origin.protected voidsetProbeCoordinate(float value) Set the probe translation in its local coordinate.voidsetProbeGreenColor(boolean flag) When the probe is picked, change the probe geometry shape color to green to indicate picked.voidtransformChanged(int type, javax.media.j3d.Transform3D transform) When the probe is picked and rotated by mouse, detecting the probing tissue along the probing path.voidtwist(float fValue, boolean bIsAdjusting) Called when the JPanelProbe twist slider is changed.voidupdateBoneBG(float x, float y, float z) Update the yellow sphere's tranlation component with the given x, y, z coordinates.voidupdateEntryPointBG(float x, float y, float z) Update the green sphere's translation component with the given x, y, z coordinate.voidupdatePosition(javax.vecmath.Point3f kPosition) Set the probe's translation.private voidupdateRotationRedline(javax.vecmath.Vector3f startPtTransVector, javax.vecmath.Vector3f endPtTransVector) Update the shape of the entry point rotation red line.voidupdateVasculatureBG(float x, float y, float z) Update the blue sphere's translation component with the given x, y, z coordinate.
-
Field Details
-
DEFAULT_PROBE
public static int DEFAULT_PROBEThe default probe type probe, which is in cyan color. -
THERMAL_HEAT_PROBE
public static int THERMAL_HEAT_PROBEThe thermal heat type probe, which is in blue color. -
REGULAR_PROBE
public static int REGULAR_PROBEThe regular type probe, which is in gray color. -
COOLTIP_PROBE
public static int COOLTIP_PROBEThe cool-tip type probe, which trys to mimic the real CoolTip probe. -
blueBG
protected javax.media.j3d.BranchGroup blueBGThe blue sphere branch group that branches underneath the vasculatureBG, and represents the blue sphere branch group. -
blueSphere
protected com.sun.j3d.utils.geometry.Sphere blueSphereThe geometry group of the blue sphere. -
blueSphereTG
protected javax.media.j3d.TransformGroup blueSphereTGblue sphere transform group that set up the translation. -
boneBG
protected javax.media.j3d.BranchGroup boneBGThe root branch group of the bone. -
burnBG
protected javax.media.j3d.BranchGroup burnBGThe root branch group of the probe burning geometry shape. -
coolTipProbe
Reference to the cool-tip probe geometry structures. -
dashSpheres
protected com.sun.j3d.utils.geometry.Sphere[] dashSpheresSpheres hold the probe detetion starting and ending point geometry shapes. -
defaultProbe
Reference to the default probe geometry structures. -
endPointTG
protected javax.media.j3d.TransformGroup endPointTGProbe detection ending point transform group that represents the probe guide line ending point. -
entryPointBG
protected javax.media.j3d.BranchGroup entryPointBGThe root branch group of the enty point. -
greenBG
protected javax.media.j3d.BranchGroup greenBGThe green sphere branch group that branches underneath the entryPointBG, and represents the green sphere. -
greenSphere
protected com.sun.j3d.utils.geometry.Sphere greenSphereThe geometry group of the green sphere. -
greenSphereTG
protected javax.media.j3d.TransformGroup greenSphereTGGreen sphere transform group that set up the translation. -
indicatorBG
protected javax.media.j3d.BranchGroup indicatorBGThe root branch group of the indicator. The group is the parent root of boneBG, entryPointBG, vascaulatureBG. -
pickCanvas
protected com.sun.j3d.utils.picking.PickCanvas pickCanvasUsed to set the probe red guiding line pickable. -
probeBehaviorBG
protected javax.media.j3d.BranchGroup probeBehaviorBGThe probe mouse behavior branchgroup root. -
probeRootBG
protected javax.media.j3d.BranchGroup probeRootBGThe root branch group of the probe. -
probeRootParentBG
protected javax.media.j3d.BranchGroup probeRootParentBGBranch group for all the probes. -
probeRootParentTG
protected javax.media.j3d.TransformGroup probeRootParentTGTransform group for all the probes. -
probeRotate
The probe mouse rotation behavior. -
probeShapeBG
protected javax.media.j3d.BranchGroup[] probeShapeBGParent of each light bulb. -
probesRootBG
protected javax.media.j3d.BranchGroup probesRootBGParent of all the light bulbs. -
probeTranslate
The probe translation behavior. -
probeZoom
The probe zoom behavior. -
regularProbe
Reference to the regular probe geometry structures. -
startPointTG
protected javax.media.j3d.TransformGroup startPointTGProbe detection starting point transform group that represents the probe guide line starting point. -
surfaceRender
The surface render reference. -
thermalProbe
Reference to the thermal heat probe geometry structures. -
vasculatureBG
protected javax.media.j3d.BranchGroup vasculatureBGThe root branch group of the vasculatureBG. -
yellowBG
protected javax.media.j3d.BranchGroup yellowBGThe yellow sphere branch group that branches underneath the boneBG, and repreents the yellow sphere branch group. -
yellowSphere
protected com.sun.j3d.utils.geometry.Sphere yellowSphereThe geometry group of the yellow sphere. -
yellowSphereTG
protected javax.media.j3d.TransformGroup yellowSphereTGYellow sphere transform group that set up the translation. -
blue
javax.vecmath.Color3f blueDOCUMENT ME! -
emissiveColor
javax.vecmath.Color3f emissiveColorDOCUMENT ME! -
green
javax.vecmath.Color3f greenDOCUMENT ME! -
orange
javax.vecmath.Color3f orangeDOCUMENT ME! -
red
javax.vecmath.Color3f redBasic color scheme. -
yellow
javax.vecmath.Color3f yellowDOCUMENT ME! -
cylinderX
private com.sun.j3d.utils.geometry.Cylinder cylinderXX cylinder of the red target sign. -
cylinderXTG
private javax.media.j3d.TransformGroup cylinderXTGX cylinder transform group that hold the X cylinder translation. -
cylinderY
private com.sun.j3d.utils.geometry.Cylinder cylinderYY cylinder of the red target sign. -
cylinderYTG
private javax.media.j3d.TransformGroup cylinderYTGY cylinder transform group that hold the Y cylinder translation. -
cylinderZ
private com.sun.j3d.utils.geometry.Cylinder cylinderZZ cylinder of the red target sign. -
cylinderZTG
private javax.media.j3d.TransformGroup cylinderZTGZ cylinder transform group that hold the Z cylinder translation. -
entryPoint
private javax.vecmath.Point3f entryPointThe vector record the translation coordinate of the entry point. -
lineBG
private javax.media.j3d.BranchGroup lineBGRed guide line branch group. -
m_fTwistAmount
private float m_fTwistAmountDOCUMENT ME! -
m_kTwist
private javax.media.j3d.Transform3D m_kTwistTransform3D to twist the volume about the Probe axis:. -
nomalRedlineBG
private javax.media.j3d.BranchGroup nomalRedlineBGNormal rotation red line branch group. -
nomalRedLineShape
private javax.media.j3d.Shape3D nomalRedLineShapeNomal red line shape. -
numProbes
private int numProbesSince we have three type of probes, we set three the number of probes. -
probe
private javax.media.j3d.TransformGroup probeThe 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 probeTransformThe current tranform positioning the probe in java3d space. -
probeType
private int probeTypeInitialize the probe type to default probe type. -
rotationRedlineBG
private javax.media.j3d.BranchGroup rotationRedlineBGEntry point rotation redline branch group. -
rotationRedLineshape
private javax.media.j3d.Shape3D rotationRedLineshaperoation red guide line shape. -
yOrigin
private float yOriginY original coordinate value.
-
-
Constructor Details
-
Probe
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- booleantruemeans around the entry point,falsearound the origin.
-
enableProbeBehavior
public void enableProbeBehavior(boolean flag) Enable probe mouse behavior.- Parameters:
flag-truemeans turn on,falsemeans 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:
transformChangedin interfaceMouseBehaviorCallback- 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 degreebIsAdjusting- 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 vectorendPtTransVector- red line end point vector
-