ImageMapper
Methods
applyShaderReplacements
Apply the shader replacements a renderable declares under its OpenGL view specific properties.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
viewSpec | Yes | The OpenGL view specific properties of the renderable. | |
pre | Boolean | No | Apply the replacements marked replaceFirst. |
buildBufferObjects
Build the texture and the vertex buffer of the quad the slice is drawn on.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
buildPass
Resolve the ancestors this mapper renders with: its image slice, its renderer, its render window and the camera view node.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes | Whether the traversal is on its way down. |
buildShaders
Assemble the shader sources, applying the render pass replacement, the user replacements and the mapper's own substitutions.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
extend
Method used to decorate a given object (publicAPI+model) with vtkOpenGLImageMapper characteristics.
| Argument | Type | Required | Description |
|---|---|---|---|
publicAPI | Yes | object on which methods will be bounds (public) | |
model | Yes | object on which data structure will be bounds (protected) | |
initialValues | IOpenGLImageMapperInitialValues | No | (default: {}) |
getCoincidentParameters
Get the polygon offset the renderable asks for, or null when it does not resolve coincident topology with a polygon offset.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
getNeedToRebuildBufferObjects
Whether the textures and the vertex buffer are out of date.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
getNeedToRebuildShaders
Whether the shader program has to be rebuilt for the given helper.
| Argument | Type | Required | Description |
|---|---|---|---|
cellBO | Yes | The OpenGL helper carrying the shader program. | |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
getRenderTargetOffset
Get the lower left corner of the viewport this mapper renders into.
getRenderTargetSize
Get the width and height of the viewport this mapper renders into.
getReplacedShaderTemplate
Fill in the shader template, letting the renderable's OpenGL view specific properties override any of the three shader sources.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
getShaderTemplate
Fill in the shader sources with the default polydata shader template.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
newInstance
Method used to create a new instance of vtkOpenGLImageMapper.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IOpenGLImageMapperInitialValues | No | for pre-setting some of its content |
opaquePass
Render the slice during the opaque pass.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes | Whether the traversal is on its way down. |
opaqueZBufferPass
Capture the slice depth during the opaque z-buffer pass.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes | Whether the traversal is on its way down. |
render
Render the slice.
renderPiece
Render the slice for the given renderer and actor.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
renderPieceDraw
Update the shaders and draw the quad the slice is textured onto.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
renderPieceFinish
Hook run after the slice has been drawn. It does nothing.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
renderPieceStart
Bring the buffer objects and the texture filters up to date before the slice is drawn.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
replaceShaderClip
Substitute the clipping plane declarations and implementation into the shader sources.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
replaceShaderCoincidentOffset
Substitute the depth offset the renderable's coincident topology resolution asks for into the fragment shader.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
replaceShaderValues
Substitute the mapper's own declarations and implementation into the shader sources.
| Argument | Type | Required | Description |
|---|---|---|---|
shaders | IShaderSources | Yes | The shader sources, edited in place. |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
setCameraShaderParameters
Set the camera uniforms of the shader program.
| Argument | Type | Required | Description |
|---|---|---|---|
cellBO | Yes | The OpenGL helper carrying the shader program. | |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
setMapperShaderParameters
Set the texture and geometry uniforms of the shader program.
| Argument | Type | Required | Description |
|---|---|---|---|
cellBO | Yes | The OpenGL helper carrying the shader program. | |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
setPropertyShaderParameters
Set the image property uniforms of the shader program.
| Argument | Type | Required | Description |
|---|---|---|---|
cellBO | Yes | The OpenGL helper carrying the shader program. | |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
translucentPass
Render the slice during the translucent pass, remembering the render pass so that its shader replacement is applied.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes | Whether the traversal is on its way down. |
renderPass | vtkRenderPass | Yes | The render pass being traversed. |
updateBufferObjects
Rebuild the buffer objects when they are out of date.
| Argument | Type | Required | Description |
|---|---|---|---|
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
updateLabelOutlineOpacityTexture
Build or reuse the texture holding the per-label outline opacities of the given image slice.
| Argument | Type | Required | Description |
|---|---|---|---|
image | vtkImageSlice | Yes | The image slice being rendered. |
updateShaders
Make the helper's shader program current, rebuilding it when needed, and push the mapper, camera and property uniforms.
| Argument | Type | Required | Description |
|---|---|---|---|
cellBO | Yes | The OpenGL helper carrying the shader program. | |
ren | vtkRenderer | Yes | The renderer. |
actor | vtkImageSlice | Yes | The image slice being rendered. |
updatelabelOutlineThicknessTexture
Build or reuse the texture holding the per-label outline thicknesses of the given image slice.
| Argument | Type | Required | Description |
|---|---|---|---|
image | vtkImageSlice | Yes | The image slice being rendered. |
zBufferPass
Render the slice depth only, so that a later pass can mix geometry with volumes.
| Argument | Type | Required | Description |
|---|---|---|---|
prepass | Boolean | Yes | Whether the traversal is on its way down. |