Class VolumeVOI
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeVOI
Displays the VOIBase in the GPU-based VolumeRenderer.
Creates the shaders and rendering states necessary for rendering and blending with the volume.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate byte[][]private intprivate booleanprivate booleanprivate booleanprivate booleanprivate floatprivate floatprivate WildMagic.LibFoundation.Mathematics.Vector3fprivate WildMagic.LibFoundation.Mathematics.Vector3fSets the Color.private WildMagic.LibFoundation.Mathematics.Vector3fprivate WildMagic.LibFoundation.Mathematics.ColorRGBprivate VolumeVOIEffectprivate VOIBaseprivate WildMagic.LibGraphics.SceneGraph.Polylineprivate VolumePreRenderEffectprivate VolumeVOIEffectprivate WildMagic.LibGraphics.SceneGraph.Polylineprivate WildMagic.LibFoundation.Mathematics.Vector3fprivate WildMagic.LibGraphics.Rendering.ZBufferStateprivate booleanprivate floatFields 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_kVolumeTrans, m_kWireframe, m_kZBuffer, m_kZBufferTransparency -
Constructor Summary
ConstructorsConstructorDescriptionVolumeVOI(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, VOIBase kVOI, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) Constructor for the VolumeVOI object. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) Delete local memory.WildMagic.LibFoundation.Mathematics.Vector3fbooleanfloatWildMagic.LibFoundation.Mathematics.ColorRGBAgetColor()Returns the current color of the VOI.private intgetCoords(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd, float fraction, WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer, int iPos) Sets up the line annotations.floatgetDepth(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller) private intgetEndLines(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd, WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer, int iPos) Sets up the line annotations for the end-points of the line (arrows).private intgetEndLines2(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd, WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer, int iPos) Sets up the protractor annotations for the end-points of the protractor (arrows).GetName()Return the name of this object.getVOI()Returns the VOIBase object rendered by this VolumVOI object.private voidlineAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd) Creates the line annotations.booleanvoidneedsUpdate(boolean update) private voidprotractorAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kMiddle, WildMagic.LibFoundation.Mathematics.Vector3f kEnd) Creates the protractor annotations.voidRender(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid) Render the object.private voidprivate voidscaleVOI()Creates the scene graph for displaying the VOIBase object.voidSetBillboardPosition(WildMagic.LibFoundation.Mathematics.Vector3f volumePt) voidsetBlend(float fBlend) Sets the transparency.voidSetClip(int iWhich, float data, boolean bEnable) Sets axis-aligned clipping for the VolumeShaderEffect.voidSetClipArb(float[] afEquation, float[] afEquationInv, boolean bEnable) voidSetClipEye(float[] afEquation, boolean bEnable) voidSetClipEyeInv(float[] afEquation, boolean bEnable) voidsetSlice(boolean bUseSlice, int iWhichSlice, float fSlice) Sets the slice information for the shader.voidSets and updates the VOIBase displayed by this VolumeVOI.voidSets and updates the VOIBase displayed by this VolumeVOI.voidsetVolumeClip(boolean clip) voidsetVolumeClipRadius(float radius) voidsetZCompare(boolean bOn) Turns the ZBufferState compare mode on or off.voidshowTextBox(boolean bShow) Turns displaying the text on or off.private voidtextAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd) Creates the text annotations (arrow)voidupdate(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) Set the color of the VolumeVOI object.voidMethods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
Blend, Dropper, Erase, GetBackface, GetDisplay, GetMesh, GetPickable, GetPolygonMode, GetScene, getTexCoord, GetTranslate, localToScannerCoords, localToVolumeCoords, Paint, PostRender, scale, SetBackface, SetColor, SetDisplay, SetFrontface, setImageB, SetLight, SetPickable, SetPolygonMode, SetTranslate, Translate, volumeToLocalCoords
-
Field Details
-
m_kVOI
-
m_kVOILine
private WildMagic.LibGraphics.SceneGraph.Polyline m_kVOILine -
m_kVOITicMarks
private WildMagic.LibGraphics.SceneGraph.Polyline m_kVOITicMarks -
m_kVOIShader
-
m_kVOIPreShader
-
m_kZState
private WildMagic.LibGraphics.Rendering.ZBufferState m_kZState -
m_kVolumeScale
private WildMagic.LibFoundation.Mathematics.Vector3f m_kVolumeScale -
m_kColor
private WildMagic.LibFoundation.Mathematics.ColorRGB m_kColor -
m_fOpacity
private float m_fOpacity -
m_kTextEffect
-
m_fAnnotationScale
private float m_fAnnotationScale -
m_kBillboardPos
private WildMagic.LibFoundation.Mathematics.Vector3f m_kBillboardPos -
m_bShowText
private boolean m_bShowText -
m_bUpdateDisplay
private boolean m_bUpdateDisplay -
annotationTexture
private byte[][] annotationTexture -
annotationWidth
private int annotationWidth -
annotationHeight
private int annotationHeight -
volumeClip
private boolean volumeClip -
volumeClipRadius
private float volumeClipRadius -
m_kClip
private WildMagic.LibFoundation.Mathematics.Vector3f m_kClipSets the Color. -
m_kClipInv
private WildMagic.LibFoundation.Mathematics.Vector3f m_kClipInv -
m_bClipped
private boolean m_bClipped -
m_bClippedA
private boolean m_bClippedA
-
-
Constructor Details
-
VolumeVOI
public VolumeVOI(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, VOIBase kVOI, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) Constructor for the VolumeVOI object.- Parameters:
kImageA-kTranslate-kVOI-kColor-
-
-
Method Details
-
dispose
public void dispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) Delete local memory.- Overrides:
disposein classVolumeObject
-
getColor
public WildMagic.LibFoundation.Mathematics.ColorRGBA getColor()Returns the current color of the VOI.- Returns:
-
GetName
Description copied from class:VolumeObjectReturn the name of this object.- Overrides:
GetNamein classVolumeObject- Returns:
- name of this object.
-
needsUpdate
public boolean needsUpdate() -
needsUpdate
public void needsUpdate(boolean update) -
getVOI
Returns the VOIBase object rendered by this VolumVOI object.- Returns:
-
Render
public void Render(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller, boolean bPreRender, boolean bSolid) Description copied from class:VolumeObjectRender the object.- Specified by:
Renderin classVolumeObject- Parameters:
kRenderer- the OpenGLRenderer object.kCuller- the Culler object.
-
getDepth
public float getDepth(WildMagic.LibGraphics.Rendering.Renderer kRenderer, WildMagic.LibGraphics.SceneGraph.Culler kCuller) - Overrides:
getDepthin classVolumeObject
-
setBlend
public void setBlend(float fBlend) Sets the transparency.- Parameters:
fBlend-
-
SetClip
public void SetClip(int iWhich, float data, boolean bEnable) Sets axis-aligned clipping for the VolumeShaderEffect.- Parameters:
afClip- the clipping parameters for axis-aligned clipping.
-
SetClipEye
public void SetClipEye(float[] afEquation, boolean bEnable) -
SetClipEyeInv
public void SetClipEyeInv(float[] afEquation, boolean bEnable) -
SetClipArb
public void SetClipArb(float[] afEquation, float[] afEquationInv, boolean bEnable) -
setVolumeClip
public void setVolumeClip(boolean clip) -
GetClipped
public boolean GetClipped() -
setVolumeClipRadius
public void setVolumeClipRadius(float radius) -
GetClipRadius
public float GetClipRadius() -
setSlice
public void setSlice(boolean bUseSlice, int iWhichSlice, float fSlice) Sets the slice information for the shader.- Parameters:
bUseSlice-iWhichSlice-fSlice-
-
setVOI
Sets and updates the VOIBase displayed by this VolumeVOI.- Parameters:
kVOI-
-
setVOI
Sets and updates the VOIBase displayed by this VolumeVOI.- Parameters:
kVOI-
-
GetBillboardPosition
public WildMagic.LibFoundation.Mathematics.Vector3f GetBillboardPosition() -
SetBillboardPosition
public void SetBillboardPosition(WildMagic.LibFoundation.Mathematics.Vector3f volumePt) -
setZCompare
public void setZCompare(boolean bOn) Turns the ZBufferState compare mode on or off.- Parameters:
bOn-
-
showTextBox
public void showTextBox(boolean bShow) Turns displaying the text on or off.- Parameters:
bShow-
-
update
public void update(WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) Set the color of the VolumeVOI object.- Parameters:
kColor-
-
updateText
public void updateText() -
getCoords
private int getCoords(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd, float fraction, WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer, int iPos) Sets up the line annotations.- Parameters:
kStart-kEnd-fraction-kVBuffer-iPos-- Returns:
-
getEndLines
private int getEndLines(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd, WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer, int iPos) Sets up the line annotations for the end-points of the line (arrows).- Parameters:
kStart-kEnd-
-
getEndLines2
private int getEndLines2(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd, WildMagic.LibGraphics.SceneGraph.VertexBuffer kVBuffer, int iPos) Sets up the protractor annotations for the end-points of the protractor (arrows).- Parameters:
kStart-kEnd-
-
lineAnnotations
private void lineAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd) Creates the line annotations.- Parameters:
kStart-kEnd-
-
protractorAnnotations
private void protractorAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kMiddle, WildMagic.LibFoundation.Mathematics.Vector3f kEnd) Creates the protractor annotations.- Parameters:
kStart-kMiddle-kEnd-
-
scaleVOI
private void scaleVOI()Creates the scene graph for displaying the VOIBase object. -
textAnnotations
private void textAnnotations(WildMagic.LibFoundation.Mathematics.Vector3f kStart, WildMagic.LibFoundation.Mathematics.Vector3f kEnd) Creates the text annotations (arrow)- Parameters:
kStart-kEnd-
-
renderAnnotationToTexture
-