Class VolumeSlices
java.lang.Object
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
gov.nih.mipav.view.renderer.WildMagic.Render.VolumeSlices
Displays the three orthogonal planes with the volume data.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean[]Displaying each bounding-box:private boolean[]Displaying each plane:private boolean[]private WildMagic.LibGraphics.SceneGraph.Polyline[]The three plane bounding-box Polylines.private WildMagic.LibFoundation.Mathematics.ColorRGB[]Set of colors used to draw the X and Y Bars and the Z box:.private VolumePlaneEffect[]ShaderEffects for the planes.private VolumePlaneEffect[]private WildMagic.LibGraphics.SceneGraph.TriMesh[]The three orthogonal plane TriMeshes.private VolumePreRenderEffect[]private VolumePreRenderEffect[]private VolumePreRenderEffect[]ShaderEffect for the pre-render stage the bounding-box and the slice share the same pre-render effect.private VolumePreRenderEffect[]private int[]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
ConstructorsConstructorDescriptionVolumeSlices(WildMagic.LibGraphics.Rendering.Renderer kRenderer, VolumeImage kImageA, VolumeImage kImageB, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) Create a new VolumeObject with the VolumeImage parameter. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidCreates the bounding frames for the planes.private voidCreates the scene graph.voiddispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) Delete local memory.WildMagic.LibGraphics.SceneGraph.NodeGetScene()Get the object's parent node in the scene graph.booleanGetShowBoundingBox(int i) Return the current display status for the bounding box for the given plane.booleanGetShowSlice(int i) Return the current display status for the bounding box for the given plane.float[]floatGetSliceOpacity(int i) Return the opacity for the given plane.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.voidsetABBlend(float fBlend) voidSetBoundingBoxColor(int i, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the bounding box color for the given plane.voidSetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) Sets the positions of the three orthogonal planes.voidvoidvoidSetSliceOpacity(float[] afAlpha) voidSetSliceOpacity(int i, float fAlpha) Sets the opacity for the given plane.voidSetTranslate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Copy translation vector.voidShowBoundingBox(int i, boolean bShow) Turns on/off displaying the bounding box for the given plane.voidShowSlice(int i, boolean bShow) Turns on/off displaying the given plane.voidShowSurface(boolean bOn) Turns rendering the planes with the surface mask on/off.intwhichPlane(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh) Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
Blend, Dropper, Erase, GetBackface, getDepth, GetDisplay, GetMesh, GetName, GetPickable, GetPolygonMode, getTexCoord, GetTranslate, localToScannerCoords, localToVolumeCoords, Paint, PostRender, scale, SetBackface, SetColor, SetDisplay, SetFrontface, setImageB, SetLight, SetPickable, SetPolygonMode, Translate, volumeToLocalCoords
-
Field Details
-
m_kBoundingBoxShaderSolid
-
m_kBoundingBoxShaderTransparent
-
m_kVolumePreShader
ShaderEffect for the pre-render stage the bounding-box and the slice share the same pre-render effect. -
m_kVolumePreShaderTransparent
-
m_akPlaneEffect
ShaderEffects for the planes. Each is unique so they can have different alpha values. -
m_akPlaneEffectTransparent
-
m_akPlanes
private WildMagic.LibGraphics.SceneGraph.TriMesh[] m_akPlanesThe three orthogonal plane TriMeshes. -
m_abShowPlanes
private boolean[] m_abShowPlanesDisplaying each plane: -
m_akBoundingBox
private WildMagic.LibGraphics.SceneGraph.Polyline[] m_akBoundingBoxThe three plane bounding-box Polylines. -
m_abShowBoundingBox
private boolean[] m_abShowBoundingBoxDisplaying each bounding-box: -
m_akColors
private WildMagic.LibFoundation.Mathematics.ColorRGB[] m_akColorsSet of colors used to draw the X and Y Bars and the Z box:. -
m_abSolid
private boolean[] m_abSolid -
sliceIDs
private int[] sliceIDs
-
-
Constructor Details
-
VolumeSlices
public VolumeSlices(WildMagic.LibGraphics.Rendering.Renderer kRenderer, 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)kVolumeImageB- second VolumeImage.
-
-
Method Details
-
dispose
public void dispose(WildMagic.LibGraphics.Rendering.Renderer kRenderer) Delete local memory.- Overrides:
disposein classVolumeObject
-
GetScene
public WildMagic.LibGraphics.SceneGraph.Node GetScene()Description copied from class:VolumeObjectGet the object's parent node in the scene graph.- Overrides:
GetScenein classVolumeObject
-
GetShowBoundingBox
public boolean GetShowBoundingBox(int i) Return the current display status for the bounding box for the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.- Returns:
- true when the bounding box is displayed.
-
GetShowSlice
public boolean GetShowSlice(int i) Return the current display status for the bounding box for the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.- Returns:
- true when the bounding box is displayed.
-
GetSliceOpacity
public float GetSliceOpacity(int i) Return the opacity for the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.- Returns:
- the opacity for the given plane.
-
GetSliceOpacity
public float[] GetSliceOpacity() -
SetSliceOpacity
public void SetSliceOpacity(float[] afAlpha) -
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.
-
setABBlend
public void setABBlend(float fBlend) -
SetBoundingBoxColor
public void SetBoundingBoxColor(int i, WildMagic.LibFoundation.Mathematics.ColorRGB kColor) Sets the bounding box color for the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.kColor- the new color.
-
SetCenter
public void SetCenter(WildMagic.LibFoundation.Mathematics.Vector3f kCenter) Sets the positions of the three orthogonal planes.- Parameters:
kCenter- the positions in file coordinates.
-
setRGBTA
-
setRGBTB
-
SetSliceOpacity
public void SetSliceOpacity(int i, float fAlpha) Sets the opacity for the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.fAlpha- the opacity for the given plane.
-
ShowBoundingBox
public void ShowBoundingBox(int i, boolean bShow) Turns on/off displaying the bounding box for the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.bShow- when true, the bounding box is displayed.
-
ShowSlice
public void ShowSlice(int i, boolean bShow) Turns on/off displaying the given plane.- Parameters:
i- the plane index (0-3) in file coordinates.bShow- when true, the plane is displayed.
-
ShowSurface
public void ShowSurface(boolean bOn) Turns rendering the planes with the surface mask on/off.- Parameters:
bOn- on/off.
-
SetTranslate
public void SetTranslate(WildMagic.LibFoundation.Mathematics.Vector3f kTranslate) Description copied from class:VolumeObjectCopy translation vector.- Overrides:
SetTranslatein classVolumeObject- Parameters:
kTranslate- new translation amount.
-
whichPlane
public int whichPlane(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh) -
CreateBoundingBox
private void CreateBoundingBox()Creates the bounding frames for the planes. -
CreatePlanes
private void CreatePlanes()Creates the scene graph. -
reCreateScene
public void reCreateScene(VolumeImage kImageA, WildMagic.LibFoundation.Mathematics.Vector3f kTranslate, float fX, float fY, float fZ) -
reCreateBoundingBox
private void reCreateBoundingBox()
-