Class VolumeClip
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClip
Displays the Clipping frames in the VolumeViewer.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprivate boolean[]enables/disables displaying clip planesprivate WildMagic.LibGraphics.SceneGraph.Polyline[]axis-aligned clip plane polylines:private floatMaximum dimension.private WildMagic.LibGraphics.SceneGraph.NodeNode for rotating the arbitrary clip plane with the mouse trackball:private WildMagic.LibGraphics.Effects.VertexColor3EffectShaderEffect for displaying the clip planes.private WildMagic.LibGraphics.Rendering.CameraScreen camera for displaying the eye clip planes in screen-coordinates:static final intFields 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
ConstructorsConstructorDescriptionVolumeClip(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Creates a new VolumeClip object. -
Method Summary
Modifier and TypeMethodDescriptionWildMagic.LibGraphics.SceneGraph.NodeScene-graph node for rotating the arbitrary clipping plane.private voidCreates the clipping planes.booleanReturn true if the arbitrary clip plane is current being displayed.voidDisplayArb(boolean bDisplay) Turns displaying the arbitrary clip plane on/off.voiddisplayClipPlane(int iWhich, boolean bDisplay) Called from JPanelClip.voidDisplayEye(boolean bDisplay) Turns displaying the eye clip plane on/off.voidDisplayEyeInv(boolean bDisplay) Turns displaying the inverse-eye clip plane on/off.voiddispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) Delete local memory.WildMagic.LibFoundation.Mathematics.Vector3fGetArbInverse(float fX) Color[]boolean[]booleanboolean[]boolean[]floatGetValue(int iWhich) Returns the value of the specified axis-aligend clip plane.voidPostRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller) Render the object after all other objects have been rendererd.private voidvoidreCreateScene(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) voidRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid) Render the object.voidsetArbColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the arbitrary clip plane color.WildMagic.LibFoundation.Mathematics.Vector3fSetArbPlane(float fX) Set the position of the arbitrary clipping plane, before rotation.voidsetClipPlane(int iWhich, float fValue) Sets the axis-aligned clip plane clipping position.voidsetClipPlaneColor(int iWhich, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the axis-aligned clip plane color.voidsetEyeClipPlane(float fZ) Sets the eye clip plane position.voidsetEyeInvClipPlane(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 Details
-
CLIP_X
public static final int CLIP_X- See Also:
-
CLIP_X_INV
public static final int CLIP_X_INV- See Also:
-
CLIP_Y
public static final int CLIP_Y- See Also:
-
CLIP_Y_INV
public static final int CLIP_Y_INV- See Also:
-
CLIP_Z
public static final int CLIP_Z- See Also:
-
CLIP_Z_INV
public static final int CLIP_Z_INV- See Also:
-
CLIP_EYE
public static final int CLIP_EYE- See Also:
-
CLIP_EYE_INV
public static final int CLIP_EYE_INV- See Also:
-
CLIP_A
public static final int CLIP_A- See Also:
-
MAX_CLIP_PLANES
public static final int MAX_CLIP_PLANES- See Also:
-
m_kVertexColor3Shader
private WildMagic.LibGraphics.Effects.VertexColor3Effect m_kVertexColor3ShaderShaderEffect for displaying the clip planes. -
m_akPolyline
private WildMagic.LibGraphics.SceneGraph.Polyline[] m_akPolylineaxis-aligned clip plane polylines: -
m_abDisplayPolyline
private boolean[] m_abDisplayPolylineenables/disables displaying clip planes -
m_spkEyeCamera
private WildMagic.LibGraphics.Rendering.Camera m_spkEyeCameraScreen camera for displaying the eye clip planes in screen-coordinates: -
m_kArbRotate
private WildMagic.LibGraphics.SceneGraph.Node m_kArbRotateNode for rotating the arbitrary clip plane with the mouse trackball: -
m_fMax
private float m_fMaxMaximum dimension.
-
-
Constructor Details
-
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 Details
-
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:
disposein classVolumeObject
-
getDisplay
public boolean[] getDisplay() -
getDisplayInv
public boolean[] getDisplayInv() -
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:
PostRenderin 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:
Renderin 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()
-