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:
Serializable,WildMagic.LibGraphics.ObjectSystem.NameIdInterface,WildMagic.LibGraphics.ObjectSystem.StreamInterface
public class VolumeShaderEffectMultiPassDynamic
extends VolumeShaderEffectMultiPass
implements WildMagic.LibGraphics.ObjectSystem.StreamInterface
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringstatic Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static Stringprivate static final longstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic Stringprivate static Stringprivate static Stringprivate static StringFields 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, SURFields 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_PLANESFields inherited from class WildMagic.LibGraphics.Effects.ShaderEffect
m_iPassQuantity, m_kAlphaState, m_kCompiledPrograms, m_kPShader, m_kVShader -
Constructor Summary
ConstructorsConstructorDescriptionVolumeShaderEffectMultiPassDynamic(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibGraphics.Rendering.Texture kSceneTarget) Creates a new VolumeShaderEffect object. -
Method Summary
Modifier and TypeMethodDescriptionvoidBlend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.private voidvoidCMPMode()Change to the Composite mode pixel shader program.private StringcreateColorFunctionA(boolean bLightsOn) private StringcreateColorFunctionB(boolean bLightsOn) private Stringprotected voidThe VolumeShaderEffect.CreateVolumeTexture() function constructs and initializes the vertex and pixel shader programs for volume rendering.voiddispose()memory cleanup.voidDRRMode()Change to the DDR mode pixel shader program.voidMIPMode()Change to the MIP mode pixel shader program.voidMULTIHISTOMode(boolean bOn) Change to the Multi-histogram mode pixel shader program.voidvoidsetABBlend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.voidSetClip(int iWhich, float data, boolean bEnable) Enable and set the axis-aligned clip plane.voidSetClipArb(float[] afEquation, boolean bEnable) Enable and set the arbitrary clip plane.voidSetClipEye(float[] afEquation, boolean bEnable) Enable and set the eye clip plane.voidSetClipEyeInv(float[] afEquation, boolean bEnable) Enable and set the inverse-eye clip plane.voidSetClipOBB(WildMagic.LibFoundation.Mathematics.Vector3f center, WildMagic.LibFoundation.Mathematics.Vector3f scale, WildMagic.LibFoundation.Mathematics.Vector3f[] axes, float[] extents, boolean bEnable) voidSetClipSphere(WildMagic.LibFoundation.Mathematics.Vector3f center, WildMagic.LibFoundation.Mathematics.Vector3f scale, float radius, boolean bEnable) voidSetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) voidSetGradientMagnitude(boolean bShow) Enables/Disables gradient magnitude filter.booleanSets the light type for the given light.voidChange to the Surface mode pixel shader program.voidSURMode()Change to the Composite Surface mode pixel shader program.voidprivate booleanprivate booleanMethods 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, updateLevWidgetStateMethods 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, setVolumeMatrixMethods 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, 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, SaveStrings
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
basicParameters
-
basicParametersB
-
colorMapA
-
colorMapB
-
colorMapGMA
-
colorMapGMB
-
blendParameters
-
clipParameters
-
clipAEParameters
-
clipSphereParameters
-
clipOBBParameters
-
lightingParametersBasicColorA
-
lightingParametersBasicColorB
-
lightingParametersBasic
-
lightParameters
-
gradientMagnitudeParametersA
-
gradientMagnitudeParametersB
-
multiHistogramWidgetParameters
-
multiHistogramWidgetColorParameters
-
mainSetup
-
colorParametersA
-
colorParametersB
-
readImageA
-
readImageB
-
readImageColorA
-
useRedOnly
-
useGreenOnly
-
useBlueOnly
-
readImageColorB
-
readColorMapA
-
readColorMapB
-
readColorMapRGBA
-
readColorMapRGBB
-
gradientMagnitudeCompositeA
-
gradientMagnitudeCompositeOpacityA
-
gradientMagnitudeCompositeB
-
blendComposite
-
compositeMIP_DRR
-
calcColorAStart
-
calcColorBStart
-
calcColorEnd
-
calcColorA
-
calcColorB
-
finalColorA
-
finalColorA_MIP
-
finalColorB
-
finalColorB_MIP
-
finalColorAB
-
finalColorAB_MIP
-
mainEnd
-
clipSetup
-
clipEnd
-
clipAESetup
-
clipEllipsoidSetup
-
clipSphereSetup
-
clipOBBSetup
-
surfaceInit
-
surfaceInitColorA
-
surfaceInitColorB
-
surfaceCompositeInit
-
multiHistoSurfaceCompositeInit
-
surfaceFinish
-
surfaceAmbient
-
surfacePointStatic
-
surfacePoint
-
surfaceDirectionalStatic
-
surfaceDirectional
-
surfaceSpotStatic
-
surfaceSpot
-
multiHistogramInitA
-
multiHistogramInitB
-
multiHistogramInitMapColor
-
multiHistogramInitMap
-
multiHistogramCompositeTriangle
-
multiHistogramCompositeSquare
-
multiHistogramCompositeCircle
-
multiHistogramReadColorMap
-
multiHistogramCompositeColorMap
-
multiHistogramFinish
-
lightingFunctions
-
-
Constructor Details
-
VolumeShaderEffectMultiPassDynamic
public VolumeShaderEffectMultiPassDynamic(VolumeImage kVolumeImageA, VolumeImage kVolumeImageB, WildMagic.LibGraphics.Rendering.Texture kSceneTarget) Creates a new VolumeShaderEffect object.- Parameters:
kVolumeImageB- second VolumeImage.kSceneTarget- the SceneImage texture with the back-facing polygon texture coordinates.kImageA- the VolumeImage containing the data and textures for rendering.
-
-
Method Details
-
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:
CreateVolumeTexturein classVolumeShaderEffectMultiPass
-
Blend
public void Blend(float fBlend) Sets the blend factor shader parameter between imageA and imageB.- Overrides:
Blendin 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:
setABBlendin classVolumeShaderEffectMultiPass- Parameters:
fBlend- blend factor (range = 0-1).
-
dispose
public void dispose()memory cleanup.- Overrides:
disposein classVolumeShaderEffectMultiPass
-
printProgram
public void printProgram()- Overrides:
printProgramin classVolumeShaderEffectMultiPass
-
SetClip
public void SetClip(int iWhich, float data, boolean bEnable) Description copied from class:VolumeClipEffectEnable and set the axis-aligned clip plane.- Overrides:
SetClipin 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:VolumeClipEffectEnable and set the arbitrary clip plane.- Overrides:
SetClipArbin classVolumeClipEffect- Parameters:
afEquation- the clip-plane equation.
-
SetClipEye
public void SetClipEye(float[] afEquation, boolean bEnable) Description copied from class:VolumeClipEffectEnable and set the eye clip plane.- Overrides:
SetClipEyein classVolumeClipEffect- Parameters:
afEquation- the clip-plane equation.
-
SetClipEyeInv
public void SetClipEyeInv(float[] afEquation, boolean bEnable) Description copied from class:VolumeClipEffectEnable and set the inverse-eye clip plane.- Overrides:
SetClipEyeInvin 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:
SetClipSpherein 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:
SetClipOBBin classVolumeClipEffect
-
SetGradientMagnitude
public void SetGradientMagnitude(boolean bShow) Description copied from class:VolumeShaderEffectMultiPassEnables/Disables gradient magnitude filter.- Overrides:
SetGradientMagnitudein classVolumeShaderEffectMultiPass- Parameters:
bShow- gradient magnitude filter on/off.
-
SetLight
Description copied from class:VolumeShaderEffectMultiPassSets the light type for the given light.- Overrides:
SetLightin 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
- Overrides:
updateLevWidgetStatein classVolumeShaderEffectMultiPass
-
SURFASTMode
public void SURFASTMode()Description copied from class:VolumeShaderEffectMultiPassChange to the Surface mode pixel shader program.- Overrides:
SURFASTModein classVolumeShaderEffectMultiPass
-
SURMode
public void SURMode()Description copied from class:VolumeShaderEffectMultiPassChange to the Composite Surface mode pixel shader program.- Overrides:
SURModein classVolumeShaderEffectMultiPass
-
CMPMode
public void CMPMode()Description copied from class:VolumeShaderEffectMultiPassChange to the Composite mode pixel shader program.- Overrides:
CMPModein classVolumeShaderEffectMultiPass
-
MIPMode
public void MIPMode()Description copied from class:VolumeShaderEffectMultiPassChange to the MIP mode pixel shader program.- Overrides:
MIPModein classVolumeShaderEffectMultiPass
-
DRRMode
public void DRRMode()Description copied from class:VolumeShaderEffectMultiPassChange to the DDR mode pixel shader program.- Overrides:
DRRModein classVolumeShaderEffectMultiPass
-
MULTIHISTOMode
public void MULTIHISTOMode(boolean bOn) Description copied from class:VolumeShaderEffectMultiPassChange to the Multi-histogram mode pixel shader program.- Overrides:
MULTIHISTOModein classVolumeShaderEffectMultiPass
-
SetCustomBlend
public void SetCustomBlend(int iBlendEquation, int iLogicOp, int iSrcBlend, int iDstBlend, WildMagic.LibFoundation.Mathematics.ColorRGBA kColor) - Overrides:
SetCustomBlendin classVolumeShaderEffectMultiPass
-
useImageA
private boolean useImageA() -
useImageB
private boolean useImageB() -
checkPixelProgram
private void checkPixelProgram() -
createProgramText
-
createColorFunctionA
-
createColorFunctionB
-