Class VolumeClip
- java.lang.Object
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClip
-
public class VolumeClip extends VolumeObject
Displays the Clipping frames in the VolumeViewer.- See Also:
VolumeObject.java
,GPUVolumeRender.java
-
-
Field Summary
Fields Modifier and Type Field Description static int
CLIP_A
static int
CLIP_EYE
static int
CLIP_EYE_INV
static int
CLIP_X
static int
CLIP_X_INV
static int
CLIP_Y
static int
CLIP_Y_INV
static int
CLIP_Z
static int
CLIP_Z_INV
private boolean[]
m_abDisplayPolyline
enables/disables displaying clip planesprivate WildMagic.LibGraphics.SceneGraph.Polyline[]
m_akPolyline
axis-aligned clip plane polylines:private float
m_fMax
Maximum dimension.private WildMagic.LibGraphics.SceneGraph.Node
m_kArbRotate
Node for rotating the arbitrary clip plane with the mouse trackball:private WildMagic.LibGraphics.Effects.VertexColor3Effect
m_kVertexColor3Shader
ShaderEffect for displaying the clip planes.private WildMagic.LibGraphics.Rendering.Camera
m_spkEyeCamera
Screen camera for displaying the eye clip planes in screen-coordinates:static int
MAX_CLIP_PLANES
-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
m_bDisplay, m_bPickable, m_bTransparent, m_fVolumeDiv, m_fVolumeMult, m_fX, m_fY, m_fZ, m_kAlpha, m_kAlphaTransparency, m_kCull, m_kDeleteList, m_kLightShader, m_kLocalScale, m_kPolygonOffset, m_kResolutions, m_kScene, m_kTranslate, m_kVolumeImageA, m_kVolumeImageB, m_kVolumeScale, m_kVolumeTrans, m_kWireframe, m_kZBuffer, m_kZBufferTransparency
-
-
Constructor Summary
Constructors Constructor Description VolumeClip(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
Creates a new VolumeClip object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WildMagic.LibGraphics.SceneGraph.Node
ArbRotate()
Scene-graph node for rotating the arbitrary clipping plane.private void
CreateClipPlanes()
Creates the clipping planes.boolean
DisplayArb()
Return true if the arbitrary clip plane is current being displayed.void
DisplayArb(boolean bDisplay)
Turns displaying the arbitrary clip plane on/off.void
displayClipPlane(int iWhich, boolean bDisplay)
Called from JPanelClip.void
DisplayEye(boolean bDisplay)
Turns displaying the eye clip plane on/off.void
DisplayEyeInv(boolean bDisplay)
Turns displaying the inverse-eye clip plane on/off.void
dispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer)
Delete local memory.WildMagic.LibFoundation.Mathematics.Vector3f
GetArbInverse(float fX)
java.awt.Color[]
getClipColor()
boolean[]
getDisplay()
boolean
getDisplayArb()
boolean[]
getDisplayEye()
boolean[]
getDisplayInv()
float
GetValue(int iWhich)
Returns the value of the specified axis-aligend clip plane.void
PostRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller)
Render the object after all other objects have been rendererd.private void
reCreateClipPlanes()
void
reCreateScene(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
void
Render(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid)
Render the object.void
setArbColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the arbitrary clip plane color.WildMagic.LibFoundation.Mathematics.Vector3f
SetArbPlane(float fX)
Set the position of the arbitrary clipping plane, before rotation.void
setClipPlane(int iWhich, float fValue)
Sets the axis-aligned clip plane clipping position.void
setClipPlaneColor(int iWhich, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the axis-aligned clip plane color.void
setEyeClipPlane(float fZ)
Sets the eye clip plane position.void
setEyeInvClipPlane(float fZ)
Sets the eye clip plane position.-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
Blend, Dropper, Erase, GetBackface, getDepth, GetDisplay, GetMesh, GetName, GetPickable, GetPolygonMode, GetScene, getTexCoord, GetTranslate, localToScannerCoords, localToVolumeCoords, Paint, scale, SetBackface, SetColor, SetDisplay, SetFrontface, setImageB, SetLight, SetPickable, SetPolygonMode, SetTranslate, Translate, volumeToLocalCoords
-
-
-
-
Field Detail
-
CLIP_X
public static final int CLIP_X
- See Also:
- Constant Field Values
-
CLIP_X_INV
public static final int CLIP_X_INV
- See Also:
- Constant Field Values
-
CLIP_Y
public static final int CLIP_Y
- See Also:
- Constant Field Values
-
CLIP_Y_INV
public static final int CLIP_Y_INV
- See Also:
- Constant Field Values
-
CLIP_Z
public static final int CLIP_Z
- See Also:
- Constant Field Values
-
CLIP_Z_INV
public static final int CLIP_Z_INV
- See Also:
- Constant Field Values
-
CLIP_EYE
public static final int CLIP_EYE
- See Also:
- Constant Field Values
-
CLIP_EYE_INV
public static final int CLIP_EYE_INV
- See Also:
- Constant Field Values
-
CLIP_A
public static final int CLIP_A
- See Also:
- Constant Field Values
-
MAX_CLIP_PLANES
public static final int MAX_CLIP_PLANES
- See Also:
- Constant Field Values
-
m_kVertexColor3Shader
private WildMagic.LibGraphics.Effects.VertexColor3Effect m_kVertexColor3Shader
ShaderEffect for displaying the clip planes.
-
m_akPolyline
private WildMagic.LibGraphics.SceneGraph.Polyline[] m_akPolyline
axis-aligned clip plane polylines:
-
m_abDisplayPolyline
private boolean[] m_abDisplayPolyline
enables/disables displaying clip planes
-
m_spkEyeCamera
private WildMagic.LibGraphics.Rendering.Camera m_spkEyeCamera
Screen camera for displaying the eye clip planes in screen-coordinates:
-
m_kArbRotate
private WildMagic.LibGraphics.SceneGraph.Node m_kArbRotate
Node for rotating the arbitrary clip plane with the mouse trackball:
-
m_fMax
private float m_fMax
Maximum dimension.
-
-
Constructor Detail
-
VolumeClip
public VolumeClip(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
Creates a new VolumeClip object.- Parameters:
kImageA
- the VolumeImage containing shared data and textures for rendering.kTranslate
- translation in the scene-graph for this object.fX
- the size of the volume in the x-dimension (extent * resolutions)fY
- the size of the volume in the y-dimension (extent * resolutions)fZ
- the size of the volume in the z-dimension (extent * resolutions)
-
-
Method Detail
-
ArbRotate
public WildMagic.LibGraphics.SceneGraph.Node ArbRotate()
Scene-graph node for rotating the arbitrary clipping plane.- Returns:
- Scene-graph node for rotating the arbitrary clipping plane.
-
DisplayArb
public boolean DisplayArb()
Return true if the arbitrary clip plane is current being displayed.- Returns:
- true if the arbitrary clip plane is current being displayed.
-
DisplayArb
public void DisplayArb(boolean bDisplay)
Turns displaying the arbitrary clip plane on/off.- Parameters:
bDisplay
- when true display the arbitrary clip plane.
-
displayClipPlane
public void displayClipPlane(int iWhich, boolean bDisplay)
Called from JPanelClip. Sets the axis-aligned clip plane display on/off.- Parameters:
iWhich
- the clip plane to set.bDisplay
- on/off.
-
DisplayEye
public void DisplayEye(boolean bDisplay)
Turns displaying the eye clip plane on/off.- Parameters:
bDisplay
- when true display the eye clip plane.
-
DisplayEyeInv
public void DisplayEyeInv(boolean bDisplay)
Turns displaying the inverse-eye clip plane on/off.- Parameters:
bDisplay
- when true display the inverse-eye clip plane.
-
dispose
public void dispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer)
Delete local memory.- Overrides:
dispose
in classVolumeObject
-
getDisplay
public boolean[] getDisplay()
-
getDisplayInv
public boolean[] getDisplayInv()
-
getClipColor
public java.awt.Color[] getClipColor()
-
getDisplayEye
public boolean[] getDisplayEye()
-
getDisplayArb
public boolean getDisplayArb()
-
GetValue
public float GetValue(int iWhich)
Returns the value of the specified axis-aligend clip plane.- Parameters:
iWhich
- one of the 6 clip planes- Returns:
- the value of the specified axis-aligend clip plane.
-
PostRender
public void PostRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller)
Render the object after all other objects have been rendererd. Useful for screen-space objects such as the eye-clip plane.- Overrides:
PostRender
in classVolumeObject
- Parameters:
kRenderer
- the OpenGLRenderer object.kCuller
- the Culler object.
-
Render
public void Render(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid)
Render the object.- Specified by:
Render
in classVolumeObject
- Parameters:
kRenderer
- the OpenGLRenderer object.kCuller
- the Culler object.
-
setArbColor
public void setArbColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the arbitrary clip plane color.- Parameters:
kColor
- the new color.
-
SetArbPlane
public WildMagic.LibFoundation.Mathematics.Vector3f SetArbPlane(float fX)
Set the position of the arbitrary clipping plane, before rotation.- Parameters:
fX
- the position of the arbitrary clipping plane, before rotation.
-
GetArbInverse
public WildMagic.LibFoundation.Mathematics.Vector3f GetArbInverse(float fX)
-
setClipPlane
public void setClipPlane(int iWhich, float fValue)
Sets the axis-aligned clip plane clipping position.- Parameters:
iWhich
- one of the 6 clip planesfValue
- the clipping position.
-
setClipPlaneColor
public void setClipPlaneColor(int iWhich, WildMagic.LibFoundation.Mathematics.ColorRGB kColor)
Sets the axis-aligned clip plane color.- Parameters:
iWhich
- one of the 6 clip planeskColor
- the new color.
-
setEyeClipPlane
public void setEyeClipPlane(float fZ)
Sets the eye clip plane position.- Parameters:
f4
- clip position (same value as sSlice in JPanelClip)bDisplay
- on/off.
-
setEyeInvClipPlane
public void setEyeInvClipPlane(float fZ)
Sets the eye clip plane position.- Parameters:
f4
- clip position (same value as sSlice in JPanelClip)bDisplay
- on/off.
-
CreateClipPlanes
private void CreateClipPlanes()
Creates the clipping planes.
-
reCreateScene
public void reCreateScene(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ)
-
reCreateClipPlanes
private void reCreateClipPlanes()
-
-