SoView2DShaderOverlay

InventorModule
genre View2DExtended
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoView2D
definition SoView2DShader.def
inherits from SoView2DExtension
keywords GLSL

Purpose

The SoView2DShaderOverlay allows to render overlays on top of a SoView2D using a custom shader pipeline.

This shader can be extended using SoView2DShaderFunction and SoView2DShaderInclude. For debugging, place a SoView2DShaderDiagnosis before this module.

The shader has access to the GLSL shader framework, so you can make use of any shader parameters and samplers.

The generated shader offers the rendering of multiple SoView2DOverlay and SoView2DOverlayMPR overlays inside of a single shader. This allows to create effects based on the values of multiple overlays.

For best blending results, you should typically use “Blend” in the overlay modules and “Pre-multiplied Blend” on the overlay shader module. This is the case because the individual overlays are first blended inside the shader using front-to-back blending, which results in a result color and alpha value. The result color is already multiplied with the alpha (which is called premultiplied). Thus, the correct blend mode for the final result color is pre-multiplied blend.

Parameter Fields

Visible Fields

Drawing On

name: drawingOn, type: Bool, default: TRUE

see SoView2DExtension.drawingOn

Render On Slab

name: renderOnSlab, type: Bool, default: FALSE

Clip To Slice

name: clipToSlice, type: Bool, default: FALSE

Blend Mode

name: blendMode, type: Enum, default: BLEND_PREMULTIPLIED_BLEND

Selects the blend mode of the shader’s result.

Values:

Title Name
Replace BLEND_REPLACE
Add BLEND_ADD
Screen BLEND_SCREEN
Blend BLEND_BLEND
Premultiplied Blend BLEND_PREMULTIPLIED_BLEND
Maximum BLEND_MAXIMUM
Minimum BLEND_MINIMUM
Reverse Subtract BLEND_REVERSE_SUBTRACT
Subtract BLEND_SUBTRACT

Disable Base Image Drawing

name: disableBaseImageDrawing, type: Bool, default: FALSE

Hidden Fields

interactionProviderID

name: interactionProviderID, type: String

see SoView2DExtension.interactionProviderID

editingOn

name: editingOn, type: Bool, default: TRUE

see SoView2DExtension.editingOn

maskValid

name: maskValid, type: Bool, persistent: no

fixZOn

name: fixZOn, type: Bool, default: TRUE

color

name: color, type: Color, default: 1 1 1

see SoView2DExtension.color

selectionTolerance

name: selectionTolerance, type: Float, default: 4

needsValidVoxel

name: needsValidVoxel, type: Bool, default: TRUE

see SoView2DExtension.needsValidVoxel

button1

name: button1, type: Enum, default: IGNORED

see SoView2DExtension.button1

button2

name: button2, type: Enum, default: IGNORED

see SoView2DExtension.button2

button3

name: button3, type: Enum, default: IGNORED

see SoView2DExtension.button3

shift

name: shift, type: Enum, default: IGNORED

see SoView2DExtension.shift

control

name: control, type: Enum, default: IGNORED

see SoView2DExtension.control

alt

name: alt, type: Enum, default: IGNORED

see SoView2DExtension.alt

wantsAllEvents

name: wantsAllEvents, type: Bool, default: FALSE

wantsKeyEvents

name: wantsKeyEvents, type: Bool, default: FALSE

wantsMouseWheelEvents

name: wantsMouseWheelEvents, type: Bool, default: FALSE

setEventHandled

name: setEventHandled, type: Bool, default: FALSE

see SoView2DExtension.setEventHandled

ignoreHandledEvents

name: ignoreHandledEvents, type: Bool, default: FALSE

see SoView2DExtension.ignoreHandledEvents

createNewMode

name: createNewMode, type: Bool, default: FALSE

see SoView2DExtension.createNewMode

createNewModeRequest

name: createNewModeRequest, type: Trigger

see SoView2DExtension.createNewModeRequest

cursorShape

name: cursorShape, type: Enum, default: UNDEFINED_CURSOR

see SoView2DExtension.cursorShape