Class VolumeObject
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
- Direct Known Subclasses:
VolumeBoundingBox,VolumeClip,VolumeDTI,VolumeNode,VolumeOrientationCube,VolumeRayCast,VolumeSlices,VolumeSurface,VolumeVOI
VolumeObect: abstract base class for all rendered objects in the Volume
Tri-Planar view. Stores the reference to the shared VolumeImage object
which contains the volume data and the shared textures needed to render the
data.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanboolean to turn rendering on/off for this object.protected booleanboolean to turn picking on/off for this object.protected booleanprotected floatprotected floatprotected floatVolume coordinates of the data (extents * resolutions):protected floatVolume coordinates of the data (extents * resolutions):protected floatVolume coordinates of the data (extents * resolutions):protected WildMagic.LibGraphics.Rendering.AlphaStateAlpha blending for this object.protected WildMagic.LibGraphics.Rendering.AlphaStateAlpha blending for this object.protected WildMagic.LibGraphics.Rendering.CullStateCulling of this object (front-face, back-face, none)protected Vector<WildMagic.LibGraphics.SceneGraph.Spatial> protected MipavLightingEffectSurface light shader for rendering objects without volume-texture mapping.protected WildMagic.LibFoundation.Mathematics.Vector3fprotected WildMagic.LibGraphics.Rendering.PolygonOffsetStatePolygonOffset blending for this object.protected WildMagic.LibFoundation.Mathematics.Vector3fprotected WildMagic.LibGraphics.SceneGraph.Nodethe scene-graph node containing the rendered object.protected WildMagic.LibFoundation.Mathematics.Vector3flocal translation in the parent scene-graph.protected VolumeImagea reference to the VolumeImage containing the shared data and textures for display.protected VolumeImagea reference to the VolumeImage containing the shared data and textures for display.protected WildMagic.LibFoundation.Mathematics.Vector3fprotected WildMagic.LibFoundation.Mathematics.Vector3fprotected WildMagic.LibGraphics.Rendering.WireframeStateWire-frame for this object.protected WildMagic.LibGraphics.Rendering.ZBufferStateprotected WildMagic.LibGraphics.Rendering.ZBufferStateZbuffer for this object. -
Constructor Summary
ConstructorsConstructorDescriptionVolumeObject(VolumeImage kImageA, VolumeImage kImageB) Create a new VolumeObject with the VolumeImage parameter.VolumeObject(VolumeImage kImageA, VolumeImage kImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Create a new VolumeObject with the VolumeImage parameter.VolumeObject(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Create a new VolumeObject with the VolumeImage parameter. -
Method Summary
Modifier and TypeMethodDescriptionvoidBlend(float fValue) Set object blend value.voiddispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) delete local memory.voidDropper(WildMagic.LibGraphics.Collision.PickRecord kRecord, WildMagic.LibFoundation.Mathematics.ColorRGBA rkDropperColor, WildMagic.LibFoundation.Mathematics.Vector3f rkPickPoint) Paint can support.voidErase(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.Collision.PickRecord kRecord, int iBrushSize) Erase paint.booleanReturn true if back-face culling is on, false otherwise.floatgetDepth(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller) booleanGet the object display either on/off.WildMagic.LibGraphics.SceneGraph.TriMeshGetMesh()Return the TriMesh object (if, any) associated with this object.GetName()Return the name of this object.booleanGet the object display either on/off.WildMagic.LibGraphics.Rendering.WireframeState.FillModeReturn the Wireframe fill mode (FILL, LINE, POINT).WildMagic.LibGraphics.SceneGraph.NodeGetScene()Get the object's parent node in the scene graph.WildMagic.LibFoundation.Mathematics.Vector3fgetTexCoord(WildMagic.LibFoundation.Mathematics.Vector3f pos) WildMagic.LibFoundation.Mathematics.Vector3fReturn the translation vector.voidlocalToScannerCoords(WildMagic.LibFoundation.Mathematics.Vector3f kPt) Converts the input point from local coordinates used to display the object in the volume renderer to scanner coordinates.voidlocalToVolumeCoords(WildMagic.LibFoundation.Mathematics.Vector3f kPt) Converts the input point from local coordinates used to display the object in the volume renderer into volume-index coordinates.voidPaint(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.Collision.PickRecord kRecord, WildMagic.LibFoundation.Mathematics.ColorRGBA kPaintColor, int iBrushSize) Painting support.voidPostRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller) Render the object after all other objects have been rendererd.abstract voidRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid) Render the object.protected voidscale(WildMagic.LibGraphics.SceneGraph.VertexBuffer kVertexBuffer) voidSetBackface(boolean bOn) Set back-face culling on/off.voidSetColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor, boolean bUpdate) Set the object color.voidSetDisplay(boolean bDisplay) Set the object display to on/off.voidSetFrontface(boolean bOn) Sets front-face culling on/off.voidsetImageB(VolumeImage imageB) voidSets the light for the EllipsoidsShader.voidSetPickable(boolean bPickable) Enables/disables picking for this object.voidSetPolygonMode(boolean bEnable, WildMagic.LibGraphics.Rendering.WireframeState.FillMode eType) Enables/disables wireframe and sets the mode: FILL, LINE, POINT.voidSetTranslate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Copy translation vector.voidTranslate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Add to the object translation vector.voidvolumeToLocalCoords(WildMagic.LibFoundation.Mathematics.Vector3f kVolume) Converts the input point from volume-index coordinates into local coordinates used to display the object in the volume renderer.
-
Field Details
-
m_bDisplay
protected boolean m_bDisplayboolean to turn rendering on/off for this object. -
m_bPickable
protected boolean m_bPickableboolean to turn picking on/off for this object. -
m_kScene
protected WildMagic.LibGraphics.SceneGraph.Node m_kScenethe scene-graph node containing the rendered object. -
m_kVolumeImageA
a reference to the VolumeImage containing the shared data and textures for display. -
m_kVolumeImageB
a reference to the VolumeImage containing the shared data and textures for display. -
m_kTranslate
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kTranslatelocal translation in the parent scene-graph. -
m_kCull
protected WildMagic.LibGraphics.Rendering.CullState m_kCullCulling of this object (front-face, back-face, none) -
m_kAlpha
protected WildMagic.LibGraphics.Rendering.AlphaState m_kAlphaAlpha blending for this object. -
m_kZBuffer
protected WildMagic.LibGraphics.Rendering.ZBufferState m_kZBuffer -
m_kPolygonOffset
protected WildMagic.LibGraphics.Rendering.PolygonOffsetState m_kPolygonOffsetPolygonOffset blending for this object. -
m_kAlphaTransparency
protected WildMagic.LibGraphics.Rendering.AlphaState m_kAlphaTransparencyAlpha blending for this object. -
m_kZBufferTransparency
protected WildMagic.LibGraphics.Rendering.ZBufferState m_kZBufferTransparencyZbuffer for this object. -
m_bTransparent
protected boolean m_bTransparent -
m_kWireframe
protected WildMagic.LibGraphics.Rendering.WireframeState m_kWireframeWire-frame for this object. -
m_fX
protected float m_fXVolume coordinates of the data (extents * resolutions): -
m_fY
protected float m_fYVolume coordinates of the data (extents * resolutions): -
m_fZ
protected float m_fZVolume coordinates of the data (extents * resolutions): -
m_kLightShader
Surface light shader for rendering objects without volume-texture mapping. -
m_kDeleteList
-
m_kVolumeScale
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kVolumeScale -
m_kVolumeTrans
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kVolumeTrans -
m_kLocalScale
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kLocalScale -
m_kResolutions
protected WildMagic.LibFoundation.Mathematics.Vector3f m_kResolutions -
m_fVolumeDiv
protected float m_fVolumeDiv -
m_fVolumeMult
protected float m_fVolumeMult
-
-
Constructor Details
-
VolumeObject
public VolumeObject(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Create a new VolumeObject with the VolumeImage parameter.- 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)
-
VolumeObject
Create a new VolumeObject with the VolumeImage parameter.- Parameters:
kImageA- the VolumeImage containing shared data and textures for rendering.
-
VolumeObject
public VolumeObject(VolumeImage kImageA, VolumeImage kImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Create a new VolumeObject with the VolumeImage parameter.- 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
-
Blend
public void Blend(float fValue) Set object blend value.- Parameters:
fValue- blend value.
-
dispose
public void dispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) delete local memory. -
Dropper
public void Dropper(WildMagic.LibGraphics.Collision.PickRecord kRecord, WildMagic.LibFoundation.Mathematics.ColorRGBA rkDropperColor, WildMagic.LibFoundation.Mathematics.Vector3f rkPickPoint) Paint can support.- Parameters:
kRecord- pick record.rkPickPoint- , picked point.kPaintColor- paint color.
-
Erase
public void Erase(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.Collision.PickRecord kRecord, int iBrushSize) Erase paint.- Parameters:
kRenderer- Renderer.kRecord- pick record.iBrushSize- brush size.
-
GetBackface
public boolean GetBackface()Return true if back-face culling is on, false otherwise.- Returns:
- true if back-face culling is on, false otherwise.
-
GetDisplay
public boolean GetDisplay()Get the object display either on/off.- Returns:
- when true display this object, when false do not display the object.
-
GetMesh
public WildMagic.LibGraphics.SceneGraph.TriMesh GetMesh()Return the TriMesh object (if, any) associated with this object.- Returns:
- the TriMesh object (if, any) associated with this object.
-
GetName
Return the name of this object.- Returns:
- name of this object.
-
GetPickable
public boolean GetPickable()Get the object display either on/off.- Returns:
- when true display this object, when false do not display the object.
-
GetPolygonMode
public WildMagic.LibGraphics.Rendering.WireframeState.FillMode GetPolygonMode()Return the Wireframe fill mode (FILL, LINE, POINT).- Returns:
- the Wireframe fill mode (FILL, LINE, POINT).
-
GetScene
public WildMagic.LibGraphics.SceneGraph.Node GetScene()Get the object's parent node in the scene graph.- Parameters:
m_kScene- the Node containing this object.
-
GetTranslate
public WildMagic.LibFoundation.Mathematics.Vector3f GetTranslate()Return the translation vector.- Returns:
- translation vector.
-
Paint
public void Paint(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.Collision.PickRecord kRecord, WildMagic.LibFoundation.Mathematics.ColorRGBA kPaintColor, int iBrushSize) Painting support.- Parameters:
kRenderer- Renderer.kRecord- pick record.kPaintColor- paint color.iBrushSize- brush size.
-
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.- Parameters:
kRenderer- the OpenGLRenderer object.kCuller- the Culler object.
-
Render
public abstract void Render(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid) Render the object.- Parameters:
kRenderer- the OpenGLRenderer object.kCuller- the Culler object.
-
getDepth
public float getDepth(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller) -
SetBackface
public void SetBackface(boolean bOn) Set back-face culling on/off.- Parameters:
bOn- on/off.
-
SetColor
public void SetColor(WildMagic.LibFoundation.Mathematics.ColorRGB kColor, boolean bUpdate) Set the object color.- Parameters:
kColor- new color.
-
SetDisplay
public void SetDisplay(boolean bDisplay) Set the object display to on/off.- Parameters:
bDisplay- when true display this object, when false do not display the object.
-
SetFrontface
public void SetFrontface(boolean bOn) Sets front-face culling on/off.- Parameters:
bOn- on/off.
-
setImageB
-
SetLight
Sets the light for the EllipsoidsShader.- Parameters:
kLightType- the name of the light to set (Light0, Light1, etc.)afType- the type of light (Ambient = 0, Directional = 1, Point = 2, Spot = 3).
-
SetPickable
public void SetPickable(boolean bPickable) Enables/disables picking for this object.- Parameters:
bPickable- picking on/off.
-
SetPolygonMode
public void SetPolygonMode(boolean bEnable, WildMagic.LibGraphics.Rendering.WireframeState.FillMode eType) Enables/disables wireframe and sets the mode: FILL, LINE, POINT.- Parameters:
bEnable- turns the Wireframe State on/off.eType- wireframe mode: FILL, LINE, POINT.
-
SetTranslate
public void SetTranslate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Copy translation vector.- Parameters:
kTranslate- new translation amount.
-
Translate
public void Translate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Add to the object translation vector.- Parameters:
kTranslate- new translation amount.
-
getTexCoord
public WildMagic.LibFoundation.Mathematics.Vector3f getTexCoord(WildMagic.LibFoundation.Mathematics.Vector3f pos) -
volumeToLocalCoords
public void volumeToLocalCoords(WildMagic.LibFoundation.Mathematics.Vector3f kVolume) Converts the input point from volume-index coordinates into local coordinates used to display the object in the volume renderer. The input position is overwritten in the process.- Parameters:
kVolume- the input position.
-
localToVolumeCoords
public void localToVolumeCoords(WildMagic.LibFoundation.Mathematics.Vector3f kPt) Converts the input point from local coordinates used to display the object in the volume renderer into volume-index coordinates. The input position is overwritten in the process.- Parameters:
kVolume- the input position.
-
localToScannerCoords
public void localToScannerCoords(WildMagic.LibFoundation.Mathematics.Vector3f kPt) Converts the input point from local coordinates used to display the object in the volume renderer to scanner coordinates. The input position is overwritten in the process.- Parameters:
kVolume- the input position.
-
scale
protected void scale(WildMagic.LibGraphics.SceneGraph.VertexBuffer kVertexBuffer)
-