Class VolumeSlices
- java.lang.Object
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeObject
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeSlices
-
public class VolumeSlices extends VolumeObject
Displays the three orthogonal planes with the volume data.- See Also:
GPUVolumeRender.java,VolumePlaneEffect.java,VolumeObject.java
-
-
Field Summary
Fields Modifier and Type Field Description private boolean[]m_abShowBoundingBoxDisplaying each bounding-box:private boolean[]m_abShowPlanesDisplaying each plane:private boolean[]m_abSolidprivate WildMagic.LibGraphics.SceneGraph.Polyline[]m_akBoundingBoxThe three plane bounding-box Polylines.private WildMagic.LibFoundation.Mathematics.ColorRGB[]m_akColorsSet of colors used to draw the X and Y Bars and the Z box:.private VolumePlaneEffect[]m_akPlaneEffectShaderEffects for the planes.private VolumePlaneEffect[]m_akPlaneEffectTransparentprivate WildMagic.LibGraphics.SceneGraph.TriMesh[]m_akPlanesThe three orthogonal plane TriMeshes.private VolumePreRenderEffect[]m_kBoundingBoxShaderSolidprivate VolumePreRenderEffect[]m_kBoundingBoxShaderTransparentprivate VolumePreRenderEffect[]m_kVolumePreShaderShaderEffect for the pre-render stage the bounding-box and the slice share the same pre-render effect.private VolumePreRenderEffect[]m_kVolumePreShaderTransparentprivate int[]sliceIDs-
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 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidCreateBoundingBox()Creates the bounding frames for the planes.private voidCreatePlanes()Creates 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[]GetSliceOpacity()floatGetSliceOpacity(int i)Return the opacity for the given plane.private voidreCreateBoundingBox()voidreCreateScene(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.voidsetRGBTA(ModelRGB RGBT)voidsetRGBTB(ModelRGB RGBT)voidSetSliceOpacity(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 Detail
-
m_kBoundingBoxShaderSolid
private VolumePreRenderEffect[] m_kBoundingBoxShaderSolid
-
m_kBoundingBoxShaderTransparent
private VolumePreRenderEffect[] m_kBoundingBoxShaderTransparent
-
m_kVolumePreShader
private VolumePreRenderEffect[] m_kVolumePreShader
ShaderEffect for the pre-render stage the bounding-box and the slice share the same pre-render effect.
-
m_kVolumePreShaderTransparent
private VolumePreRenderEffect[] m_kVolumePreShaderTransparent
-
m_akPlaneEffect
private VolumePlaneEffect[] m_akPlaneEffect
ShaderEffects for the planes. Each is unique so they can have different alpha values.
-
m_akPlaneEffectTransparent
private VolumePlaneEffect[] m_akPlaneEffectTransparent
-
m_akPlanes
private WildMagic.LibGraphics.SceneGraph.TriMesh[] m_akPlanes
The three orthogonal plane TriMeshes.
-
m_abShowPlanes
private boolean[] m_abShowPlanes
Displaying each plane:
-
m_akBoundingBox
private WildMagic.LibGraphics.SceneGraph.Polyline[] m_akBoundingBox
The three plane bounding-box Polylines.
-
m_abShowBoundingBox
private boolean[] m_abShowBoundingBox
Displaying each bounding-box:
-
m_akColors
private WildMagic.LibFoundation.Mathematics.ColorRGB[] m_akColors
Set 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 Detail
-
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.kVolumeImageB- second VolumeImage.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
-
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
public void setRGBTA(ModelRGB RGBT)
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
-
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()
-
-