Class VolumeShaderEffectMultiPassDynamic
- java.lang.Object
-
- WildMagic.LibGraphics.ObjectSystem.GraphicsObject
-
- WildMagic.LibGraphics.Effects.Effect
-
- WildMagic.LibGraphics.Effects.ShaderEffect
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClipEffect
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeShaderEffectMultiPass
-
- gov.nih.mipav.view.renderer.WildMagic.Render.VolumeShaderEffectMultiPassDynamic
-
- All Implemented Interfaces:
java.io.Serializable
,WildMagic.LibGraphics.ObjectSystem.NameIdInterface
,WildMagic.LibGraphics.ObjectSystem.StreamInterface
public class VolumeShaderEffectMultiPassDynamic extends VolumeShaderEffectMultiPass implements WildMagic.LibGraphics.ObjectSystem.StreamInterface
- See Also:
- 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
blendComposite
private static java.lang.String
blendParameters
private static java.lang.String
calcColorA
private static java.lang.String
calcColorAStart
private static java.lang.String
calcColorB
private static java.lang.String
calcColorBStart
private static java.lang.String
calcColorEnd
private static java.lang.String
clipAEParameters
private static java.lang.String
clipAESetup
private static java.lang.String
clipEllipsoidSetup
private static java.lang.String
clipEnd
private static java.lang.String
clipOBBParameters
private static java.lang.String
clipOBBSetup
private static java.lang.String
clipParameters
private static java.lang.String
clipSetup
private static java.lang.String
clipSphereParameters
private static java.lang.String
clipSphereSetup
private static java.lang.String
colorMapA
private static java.lang.String
colorMapB
private static java.lang.String
colorMapGMA
private static java.lang.String
colorMapGMB
private static java.lang.String
colorParametersA
private static java.lang.String
colorParametersB
private static java.lang.String
compositeMIP_DRR
private static java.lang.String
finalColorA
private static java.lang.String
finalColorA_MIP
private static java.lang.String
finalColorAB
private static java.lang.String
finalColorAB_MIP
private static java.lang.String
finalColorB
private static java.lang.String
finalColorB_MIP
private static java.lang.String
gradientMagnitudeCompositeA
private static java.lang.String
gradientMagnitudeCompositeB
private static java.lang.String
gradientMagnitudeCompositeOpacityA
private static java.lang.String
gradientMagnitudeParametersA
private static java.lang.String
gradientMagnitudeParametersB
private static java.lang.String
lightingFunctions
private static java.lang.String
lightingParametersBasic
private static java.lang.String
lightingParametersBasicColorA
private static java.lang.String
lightingParametersBasicColorB
private static java.lang.String
lightParameters
private static java.lang.String
mainEnd
private static java.lang.String
mainSetup
private static java.lang.String
multiHistogramCompositeCircle
private static java.lang.String
multiHistogramCompositeColorMap
private static java.lang.String
multiHistogramCompositeSquare
private static java.lang.String
multiHistogramCompositeTriangle
private static java.lang.String
multiHistogramFinish
private static java.lang.String
multiHistogramInitA
private static java.lang.String
multiHistogramInitB
private static java.lang.String
multiHistogramInitMap
private static java.lang.String
multiHistogramInitMapColor
private static java.lang.String
multiHistogramReadColorMap
private static java.lang.String
multiHistogramWidgetColorParameters
private static java.lang.String
multiHistogramWidgetParameters
static java.lang.String
multiHistoSurfaceCompositeInit
private static java.lang.String
readColorMapA
private static java.lang.String
readColorMapB
private static java.lang.String
readColorMapRGBA
private static java.lang.String
readColorMapRGBB
private static java.lang.String
readImageA
private static java.lang.String
readImageB
private static java.lang.String
readImageColorA
private static java.lang.String
readImageColorB
private static long
serialVersionUID
static java.lang.String
surfaceAmbient
static java.lang.String
surfaceCompositeInit
static java.lang.String
surfaceDirectional
static java.lang.String
surfaceDirectionalStatic
static java.lang.String
surfaceFinish
static java.lang.String
surfaceInit
static java.lang.String
surfaceInitColorA
static java.lang.String
surfaceInitColorB
static java.lang.String
surfacePoint
static java.lang.String
surfacePointStatic
static java.lang.String
surfaceSpot
static java.lang.String
surfaceSpotStatic
private static java.lang.String
useBlueOnly
private static java.lang.String
useGreenOnly
private static java.lang.String
useRedOnly
-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeShaderEffectMultiPass
CMP, CMP_SUR, CUSTOM, DRR, m_aafLight, m_afABBlendParam, m_afBlendParam, m_akLevWidget, m_bGradientMag, m_bMultiHisto, m_fMaxLength, m_fSamples, m_iBlend, m_iDstBlend, m_iPasses, m_iSrcBlend, m_iUsedWidgets, m_iWhichShader, m_kBlendColor, m_kPShaderCMP, m_kRGBT, m_kSceneTarget, m_kVolumeImageA, m_kVolumeImageB, m_pkVShader, MIP, ms_iMaxSamples, ms_iNumLev, ms_MaxLights, SUR
-
Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClipEffect
CLIP_A, CLIP_A_INV, CLIP_EYE, CLIP_EYE_INV, CLIP_X, CLIP_X_INV, CLIP_Y, CLIP_Y_INV, CLIP_Z, CLIP_Z_INV, m_aafClipData, m_afClipAll, m_afClipOBBAxis0, m_afClipOBBAxis1, m_afClipOBBAxis2, m_afClipOBBExtent, m_afClipSphereCenter, m_afClipSphereScale, m_afDoClip, m_afVolumeMatrix, m_bClipOBB, m_bClipSphere, MAX_CLIP_PLANES
-
-
Constructor Summary
Constructors Constructor Description VolumeShaderEffectMultiPassDynamic(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibGraphics.Rendering.Texture kSceneTarget)
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 void
checkPixelProgram()
void
CMPMode()
Change to the Composite mode pixel shader program.private java.lang.String
createColorFunctionA(boolean bLightsOn)
private java.lang.String
createColorFunctionB(boolean bLightsOn)
private java.lang.String
createProgramText()
protected void
CreateVolumeTexture()
The VolumeShaderEffect.CreateVolumeTexture() function constructs and initializes the vertex and pixel shader programs for volume rendering.void
dispose()
memory cleanup.void
DRRMode()
Change to the DDR mode pixel shader program.void
MIPMode()
Change to the MIP mode pixel shader program.void
MULTIHISTOMode(boolean bOn)
Change to the Multi-histogram mode pixel shader program.void
printProgram()
void
setABBlend(float fBlend)
Sets the blend factor shader parameter between imageA and imageB.void
SetClip(int iWhich, float data, boolean bEnable)
Enable and set the axis-aligned clip plane.void
SetClipArb(float[] afEquation, boolean bEnable)
Enable and set the arbitrary clip plane.void
SetClipEye(float[] afEquation, boolean bEnable)
Enable and set the eye clip plane.void
SetClipEyeInv(float[] afEquation, boolean bEnable)
Enable and set the inverse-eye clip plane.void
SetClipOBB(WildMagic.LibFoundation.Mathematics.Vector3f center, WildMagic.LibFoundation.Mathematics.Vector3f scale, WildMagic.LibFoundation.Mathematics.Vector3f[] axes, float[] extents, boolean bEnable)
void
SetClipSphere(WildMagic.LibFoundation.Mathematics.Vector3f center, WildMagic.LibFoundation.Mathematics.Vector3f scale, float radius, boolean bEnable)
void
SetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
void
SetGradientMagnitude(boolean bShow)
Enables/Disables gradient magnitude filter.boolean
SetLight(java.lang.String kLightType, float[] afType)
Sets the light type for the given light.void
SURFASTMode()
Change to the Surface mode pixel shader program.void
SURMode()
Change to the Composite Surface mode pixel shader program.void
updateLevWidgetState(java.util.Vector<ClassificationWidget> kLWS)
private boolean
useImageA()
private boolean
useImageB()
-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeShaderEffectMultiPass
getABBlend, GetGradientMagnitude, OnLoadPrograms, Reload, RestoreGlobalState, SaveStrings, SelfShadow, SetBackgroundColor, SetColorImage, setCurrentShader, SetDefaultAlphaState, SetGlobalState, setMaxLength, setRGBTA, setRGBTB, setVolumeSamples, updateLevWidgetState
-
Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Render.VolumeClipEffect
getClip, getClipArb, getClipArbInv, getClipEnable, getClipEye, getClipEyeInv, getClipInv, getClipInvEnable, isClip, isClipAE, isClipOBB, isClipSphere, ResetClip, SetClipArbInv, setVolumeMatrix
-
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, Save, SetCProgram, 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
-
basicParameters
private static java.lang.String basicParameters
-
basicParametersB
private static java.lang.String basicParametersB
-
colorMapA
private static java.lang.String colorMapA
-
colorMapB
private static java.lang.String colorMapB
-
colorMapGMA
private static java.lang.String colorMapGMA
-
colorMapGMB
private static java.lang.String colorMapGMB
-
blendParameters
private static java.lang.String blendParameters
-
clipParameters
private static java.lang.String clipParameters
-
clipAEParameters
private static java.lang.String clipAEParameters
-
clipSphereParameters
private static java.lang.String clipSphereParameters
-
clipOBBParameters
private static java.lang.String clipOBBParameters
-
lightingParametersBasicColorA
private static java.lang.String lightingParametersBasicColorA
-
lightingParametersBasicColorB
private static java.lang.String lightingParametersBasicColorB
-
lightingParametersBasic
private static java.lang.String lightingParametersBasic
-
lightParameters
private static java.lang.String lightParameters
-
gradientMagnitudeParametersA
private static java.lang.String gradientMagnitudeParametersA
-
gradientMagnitudeParametersB
private static java.lang.String gradientMagnitudeParametersB
-
multiHistogramWidgetParameters
private static java.lang.String multiHistogramWidgetParameters
-
multiHistogramWidgetColorParameters
private static java.lang.String multiHistogramWidgetColorParameters
-
mainSetup
private static java.lang.String mainSetup
-
colorParametersA
private static java.lang.String colorParametersA
-
colorParametersB
private static java.lang.String colorParametersB
-
readImageA
private static java.lang.String readImageA
-
readImageB
private static java.lang.String readImageB
-
readImageColorA
private static java.lang.String readImageColorA
-
useRedOnly
private static java.lang.String useRedOnly
-
useGreenOnly
private static java.lang.String useGreenOnly
-
useBlueOnly
private static java.lang.String useBlueOnly
-
readImageColorB
private static java.lang.String readImageColorB
-
readColorMapA
private static java.lang.String readColorMapA
-
readColorMapB
private static java.lang.String readColorMapB
-
readColorMapRGBA
private static java.lang.String readColorMapRGBA
-
readColorMapRGBB
private static java.lang.String readColorMapRGBB
-
gradientMagnitudeCompositeA
private static java.lang.String gradientMagnitudeCompositeA
-
gradientMagnitudeCompositeOpacityA
private static java.lang.String gradientMagnitudeCompositeOpacityA
-
gradientMagnitudeCompositeB
private static java.lang.String gradientMagnitudeCompositeB
-
blendComposite
private static java.lang.String blendComposite
-
compositeMIP_DRR
private static java.lang.String compositeMIP_DRR
-
calcColorAStart
private static java.lang.String calcColorAStart
-
calcColorBStart
private static java.lang.String calcColorBStart
-
calcColorEnd
private static java.lang.String calcColorEnd
-
calcColorA
private static java.lang.String calcColorA
-
calcColorB
private static java.lang.String calcColorB
-
finalColorA
private static java.lang.String finalColorA
-
finalColorA_MIP
private static java.lang.String finalColorA_MIP
-
finalColorB
private static java.lang.String finalColorB
-
finalColorB_MIP
private static java.lang.String finalColorB_MIP
-
finalColorAB
private static java.lang.String finalColorAB
-
finalColorAB_MIP
private static java.lang.String finalColorAB_MIP
-
mainEnd
private static java.lang.String mainEnd
-
clipSetup
private static java.lang.String clipSetup
-
clipEnd
private static java.lang.String clipEnd
-
clipAESetup
private static java.lang.String clipAESetup
-
clipEllipsoidSetup
private static java.lang.String clipEllipsoidSetup
-
clipSphereSetup
private static java.lang.String clipSphereSetup
-
clipOBBSetup
private static java.lang.String clipOBBSetup
-
surfaceInit
public static java.lang.String surfaceInit
-
surfaceInitColorA
public static java.lang.String surfaceInitColorA
-
surfaceInitColorB
public static java.lang.String surfaceInitColorB
-
surfaceCompositeInit
public static java.lang.String surfaceCompositeInit
-
multiHistoSurfaceCompositeInit
public static java.lang.String multiHistoSurfaceCompositeInit
-
surfaceFinish
public static java.lang.String surfaceFinish
-
surfaceAmbient
public static java.lang.String surfaceAmbient
-
surfacePointStatic
public static java.lang.String surfacePointStatic
-
surfacePoint
public static java.lang.String surfacePoint
-
surfaceDirectionalStatic
public static java.lang.String surfaceDirectionalStatic
-
surfaceDirectional
public static java.lang.String surfaceDirectional
-
surfaceSpotStatic
public static java.lang.String surfaceSpotStatic
-
surfaceSpot
public static java.lang.String surfaceSpot
-
multiHistogramInitA
private static java.lang.String multiHistogramInitA
-
multiHistogramInitB
private static java.lang.String multiHistogramInitB
-
multiHistogramInitMapColor
private static java.lang.String multiHistogramInitMapColor
-
multiHistogramInitMap
private static java.lang.String multiHistogramInitMap
-
multiHistogramCompositeTriangle
private static java.lang.String multiHistogramCompositeTriangle
-
multiHistogramCompositeSquare
private static java.lang.String multiHistogramCompositeSquare
-
multiHistogramCompositeCircle
private static java.lang.String multiHistogramCompositeCircle
-
multiHistogramReadColorMap
private static java.lang.String multiHistogramReadColorMap
-
multiHistogramCompositeColorMap
private static java.lang.String multiHistogramCompositeColorMap
-
multiHistogramFinish
private static java.lang.String multiHistogramFinish
-
lightingFunctions
private static java.lang.String lightingFunctions
-
-
Constructor Detail
-
VolumeShaderEffectMultiPassDynamic
public VolumeShaderEffectMultiPassDynamic(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibGraphics.Rendering.Texture kSceneTarget)
Creates a new VolumeShaderEffect object.- Parameters:
kImageA
- the VolumeImage containing the data and textures for rendering.kVolumeImageB
- second VolumeImage.kSceneTarget
- the SceneImage texture with the back-facing polygon texture coordinates.
-
-
Method Detail
-
CreateVolumeTexture
protected void CreateVolumeTexture()
The VolumeShaderEffect.CreateVolumeTexture() function constructs and initializes the vertex and pixel shader programs for volume rendering. The vertex shader is the same for each rendering type: MIP, DDR, Composite, Surface, and Composite Surface. The pixel shaders are different for each.- Overrides:
CreateVolumeTexture
in classVolumeShaderEffectMultiPass
-
Blend
public void Blend(float fBlend)
Sets the blend factor shader parameter between imageA and imageB.- Overrides:
Blend
in classVolumeShaderEffectMultiPass
- Parameters:
fBlend
- blend factor (range = 0-1).
-
setABBlend
public void setABBlend(float fBlend)
Sets the blend factor shader parameter between imageA and imageB.- Overrides:
setABBlend
in classVolumeShaderEffectMultiPass
- Parameters:
fBlend
- blend factor (range = 0-1).
-
dispose
public void dispose()
memory cleanup.- Overrides:
dispose
in classVolumeShaderEffectMultiPass
-
printProgram
public void printProgram()
- Overrides:
printProgram
in classVolumeShaderEffectMultiPass
-
SetClip
public void SetClip(int iWhich, float data, boolean bEnable)
Description copied from class:VolumeClipEffect
Enable and set the axis-aligned clip plane.- Overrides:
SetClip
in classVolumeClipEffect
- Parameters:
iWhich
- one of 6 clip-planes to set.data
- the distance to the clip-plane.
-
SetClipArb
public void SetClipArb(float[] afEquation, boolean bEnable)
Description copied from class:VolumeClipEffect
Enable and set the arbitrary clip plane.- Overrides:
SetClipArb
in classVolumeClipEffect
- Parameters:
afEquation
- the clip-plane equation.
-
SetClipEye
public void SetClipEye(float[] afEquation, boolean bEnable)
Description copied from class:VolumeClipEffect
Enable and set the eye clip plane.- Overrides:
SetClipEye
in classVolumeClipEffect
- Parameters:
afEquation
- the clip-plane equation.
-
SetClipEyeInv
public void SetClipEyeInv(float[] afEquation, boolean bEnable)
Description copied from class:VolumeClipEffect
Enable and set the inverse-eye clip plane.- Overrides:
SetClipEyeInv
in classVolumeClipEffect
- Parameters:
afEquation
- the clip-plane equation.
-
SetClipSphere
public void SetClipSphere(WildMagic.LibFoundation.Mathematics.Vector3f center, WildMagic.LibFoundation.Mathematics.Vector3f scale, float radius, boolean bEnable)
- Overrides:
SetClipSphere
in classVolumeClipEffect
-
SetClipOBB
public void SetClipOBB(WildMagic.LibFoundation.Mathematics.Vector3f center, WildMagic.LibFoundation.Mathematics.Vector3f scale, WildMagic.LibFoundation.Mathematics.Vector3f[] axes, float[] extents, boolean bEnable)
- Overrides:
SetClipOBB
in classVolumeClipEffect
-
SetGradientMagnitude
public void SetGradientMagnitude(boolean bShow)
Description copied from class:VolumeShaderEffectMultiPass
Enables/Disables gradient magnitude filter.- Overrides:
SetGradientMagnitude
in classVolumeShaderEffectMultiPass
- Parameters:
bShow
- gradient magnitude filter on/off.
-
SetLight
public boolean SetLight(java.lang.String kLightType, float[] afType)
Description copied from class:VolumeShaderEffectMultiPass
Sets the light type for the given light.- Overrides:
SetLight
in classVolumeShaderEffectMultiPass
- Parameters:
kLightType
- the name of the light to set (Light0, Light1, etc.)afType
- the type of light (Ambient = 0, Directional = 1, Point = 2, Spot = 3).
-
updateLevWidgetState
public void updateLevWidgetState(java.util.Vector<ClassificationWidget> kLWS)
- Overrides:
updateLevWidgetState
in classVolumeShaderEffectMultiPass
-
SURFASTMode
public void SURFASTMode()
Description copied from class:VolumeShaderEffectMultiPass
Change to the Surface mode pixel shader program.- Overrides:
SURFASTMode
in classVolumeShaderEffectMultiPass
-
SURMode
public void SURMode()
Description copied from class:VolumeShaderEffectMultiPass
Change to the Composite Surface mode pixel shader program.- Overrides:
SURMode
in classVolumeShaderEffectMultiPass
-
CMPMode
public void CMPMode()
Description copied from class:VolumeShaderEffectMultiPass
Change to the Composite mode pixel shader program.- Overrides:
CMPMode
in classVolumeShaderEffectMultiPass
-
MIPMode
public void MIPMode()
Description copied from class:VolumeShaderEffectMultiPass
Change to the MIP mode pixel shader program.- Overrides:
MIPMode
in classVolumeShaderEffectMultiPass
-
DRRMode
public void DRRMode()
Description copied from class:VolumeShaderEffectMultiPass
Change to the DDR mode pixel shader program.- Overrides:
DRRMode
in classVolumeShaderEffectMultiPass
-
MULTIHISTOMode
public void MULTIHISTOMode(boolean bOn)
Description copied from class:VolumeShaderEffectMultiPass
Change to the Multi-histogram mode pixel shader program.- Overrides:
MULTIHISTOMode
in classVolumeShaderEffectMultiPass
-
SetCustomBlend
public void SetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor)
- Overrides:
SetCustomBlend
in classVolumeShaderEffectMultiPass
-
useImageA
private boolean useImageA()
-
useImageB
private boolean useImageB()
-
checkPixelProgram
private void checkPixelProgram()
-
createProgramText
private java.lang.String createProgramText()
-
createColorFunctionA
private java.lang.String createColorFunctionA(boolean bLightsOn)
-
createColorFunctionB
private java.lang.String createColorFunctionB(boolean bLightsOn)
-
-