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:
java.io.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:
GPUVolumeRender.java
,VolumeViewer.java
,PlaneRender.java
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
basicParameters
private static java.lang.String
basicParametersB
private static java.lang.String
basicParametersSurface
private boolean
m_bShowSurface
private boolean
m_bTransparent
private float
m_fBlend
private WildMagic.LibGraphics.Shaders.PixelShader
m_kPShader
private VolumeImage
m_kVolumeImageA
Shared volume data and textures.private VolumeImage
m_kVolumeImageB
Shared volume data and textures.private static java.lang.String
outputParameters
private static java.lang.String
outputParametersTransparency
private ModelRGB
rgbA
private ModelRGB
rgbB
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description VolumePlaneEffect(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, boolean bTransparent)
Creates a new VolumeShaderEffect object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
Blend(float fBlend)
Sets the blend factor shader parameter between imageA and imageB.private java.lang.String
createProgramText()
void
dispose()
memory cleanup.float
GetBlend()
Sets the blend factor shader parameter between imageA and imageB.private void
Init()
Initializes the ShaderEffect vertex and pixel shader programs.void
OnLoadPrograms(int iPass, WildMagic.LibGraphics.Shaders.Program pkVProgram, WildMagic.LibGraphics.Shaders.Program pkPProgram, WildMagic.LibGraphics.Shaders.Program pkCProgram)
WildMagic.LibGraphics.ObjectSystem.StringTree
SaveStrings(java.lang.String acTitle)
void
setABBlend(float fBlend)
Sets the blend factor shader parameter between imageA and imageB.void
setRGBTA(ModelRGB RGBT)
void
setRGBTB(ModelRGB RGBT)
void
ShowSurface(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, SetVShader
-
Methods inherited from class WildMagic.LibGraphics.ObjectSystem.GraphicsObject
GetID, GetName, GetNextID, GetObjectByIDBase, GetObjectByNameBase, SetName
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
m_kVolumeImageA
private VolumeImage m_kVolumeImageA
Shared volume data and textures.
-
m_kVolumeImageB
private VolumeImage m_kVolumeImageB
Shared volume data and textures.
-
rgbA
private ModelRGB rgbA
-
rgbB
private ModelRGB 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
private static java.lang.String basicParameters
-
basicParametersB
private static java.lang.String basicParametersB
-
basicParametersSurface
private static java.lang.String basicParametersSurface
-
outputParameters
private static java.lang.String outputParameters
-
outputParametersTransparency
private static java.lang.String outputParametersTransparency
-
-
Constructor Detail
-
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 Detail
-
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:
dispose
in 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:
OnLoadPrograms
in classWildMagic.LibGraphics.Effects.ShaderEffect
-
SaveStrings
public WildMagic.LibGraphics.ObjectSystem.StringTree SaveStrings(java.lang.String acTitle)
- Specified by:
SaveStrings
in interfaceWildMagic.LibGraphics.ObjectSystem.StreamInterface
- Overrides:
SaveStrings
in 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
public void setRGBTA(ModelRGB RGBT)
-
setRGBTB
public void setRGBTB(ModelRGB RGBT)
-
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
private java.lang.String createProgramText()
-
-