Class VolumePlaneEffect
java.lang.Object
WildMagic.LibGraphics.ObjectSystem.GraphicsObject
WildMagic.LibGraphics.Effects.Effect
WildMagic.LibGraphics.Effects.ShaderEffect
gov.nih.mipav.view.renderer.WildMagic.Render.VolumePlaneEffect
- All Implemented Interfaces:
Serializable,WildMagic.LibGraphics.ObjectSystem.NameIdInterface,WildMagic.LibGraphics.ObjectSystem.StreamInterface
public class VolumePlaneEffect
extends WildMagic.LibGraphics.Effects.ShaderEffect
implements WildMagic.LibGraphics.ObjectSystem.StreamInterface
The VolumePlaneEffect ShaderEffect creates shaders for mapping the volume
data onto the planes for the 3-orthogonal planes displayed in the
VolumeViewer and for the PlaneRender objects.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Stringprivate static Stringprivate static Stringprivate booleanprivate booleanprivate floatprivate WildMagic.LibGraphics.Shaders.PixelShaderprivate VolumeImageShared volume data and textures.private VolumeImageShared volume data and textures.private static Stringprivate static Stringprivate ModelRGBprivate ModelRGBprivate static final longFields inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
m_iPassQuantity, m_kAlphaState, m_kCompiledPrograms, m_kVShader -
Constructor Summary
ConstructorsConstructorDescriptionVolumePlaneEffect(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, boolean bTransparent) Creates a new VolumeShaderEffect object. -
Method Summary
Modifier and TypeMethodDescriptionvoidBlend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.private Stringvoiddispose()memory cleanup.floatGetBlend()Sets the blend factor shader parameter between imageA and imageB.private voidInit()Initializes the ShaderEffect vertex and pixel shader programs.voidOnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram) WildMagic.LibGraphics.ObjectSystem.StringTreeSaveStrings(String acTitle) voidsetABBlend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.voidvoidvoidShowSurface(boolean bOn) Turns rendering the planes with the surface mask on/off.Methods inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
GetAllObjectsByName, GetBlending, GetCProgram, GetDiskUsed, GetObjectByID, GetObjectByName, GetPassQuantity, GetPProgram, GetSamplerInformation, GetTexture, GetTexture, GetTextureQuantity, GetVProgram, Link, Load, LoadPrograms, LoadResources, OnReleasePrograms, Register, ReleasePrograms, ReleaseResources, RestoreGlobalState, Save, SetCProgram, SetDefaultAlphaState, SetGlobalState, SetPassQuantity, SetPShader, SetVShaderMethods inherited from class WildMagic.LibGraphics.Effects.Effect
DrawMethods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject
GetID, GetName, GetNextID, GetObjectByIDBase, GetObjectByNameBase, SetNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface WildMagic.LibGraphics.ObjectSystem.StreamInterface
GetDiskUsed, Link, Load, Register, Save
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
m_kVolumeImageA
Shared volume data and textures. -
m_kVolumeImageB
Shared volume data and textures. -
rgbA
-
rgbB
-
m_bShowSurface
private boolean m_bShowSurface -
m_fBlend
private float m_fBlend -
m_kPShader
private WildMagic.LibGraphics.Shaders.PixelShader m_kPShader -
m_bTransparent
private boolean m_bTransparent -
basicParameters
-
basicParametersB
-
basicParametersSurface
-
outputParameters
-
outputParametersTransparency
-
-
Constructor Details
-
VolumePlaneEffect
public VolumePlaneEffect(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, boolean bTransparent) Creates a new VolumeShaderEffect object.- Parameters:
kVolumeImageA- the VolumeImage containing shared data and textures for rendering.kVolumeImageB- second VolumeImage.bUnique- when true the shader program must be unique.
-
-
Method Details
-
Blend
public void Blend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.- Parameters:
fBlend- blend factor (range = 0-1).
-
dispose
public void dispose()memory cleanup.- Overrides:
disposein classWildMagic.LibGraphics.Effects.ShaderEffect
-
GetBlend
public float GetBlend()Sets the blend factor shader parameter between imageA and imageB.- Parameters:
fBlend- blend factor (range = 0-1).
-
OnLoadPrograms
public void OnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram) - Overrides:
OnLoadProgramsin classWildMagic.LibGraphics.Effects.ShaderEffect
-
SaveStrings
- Specified by:
SaveStringsin interfaceWildMagic.LibGraphics.ObjectSystem.StreamInterface- Overrides:
SaveStringsin classWildMagic.LibGraphics.Effects.ShaderEffect
-
setABBlend
public void setABBlend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.- Parameters:
fBlend- blend factor (range = 0-1).
-
setRGBTA
-
setRGBTB
-
ShowSurface
public void ShowSurface(boolean bOn) Turns rendering the planes with the surface mask on/off.- Parameters:
bOn- on/off.
-
Init
private void Init()Initializes the ShaderEffect vertex and pixel shader programs. -
createProgramText
-