Skip to content

ImageMapper ​

Methods ​

applyShaderReplacements ​

Apply the shader replacements a renderable declares under its OpenGL view specific properties.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
viewSpecYesThe OpenGL view specific properties of the renderable.
preBooleanNoApply the replacements marked replaceFirst.

buildBufferObjects ​

Build the texture and the vertex buffer of the quad the slice is drawn on.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe 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.

ArgumentTypeRequiredDescription
prepassBooleanYesWhether 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.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

extend ​

Method used to decorate a given object (publicAPI+model) with vtkOpenGLImageMapper characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIOpenGLImageMapperInitialValuesNo(default: {})

getCoincidentParameters ​

Get the polygon offset the renderable asks for, or null when it does not resolve coincident topology with a polygon offset.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

getNeedToRebuildBufferObjects ​

Whether the textures and the vertex buffer are out of date.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

getNeedToRebuildShaders ​

Whether the shader program has to be rebuilt for the given helper.

ArgumentTypeRequiredDescription
cellBOYesThe OpenGL helper carrying the shader program.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe 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.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

getShaderTemplate ​

Fill in the shader sources with the default polydata shader template.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

newInstance ​

Method used to create a new instance of vtkOpenGLImageMapper.

ArgumentTypeRequiredDescription
initialValuesIOpenGLImageMapperInitialValuesNofor pre-setting some of its content

opaquePass ​

Render the slice during the opaque pass.

ArgumentTypeRequiredDescription
prepassBooleanYesWhether the traversal is on its way down.

opaqueZBufferPass ​

Capture the slice depth during the opaque z-buffer pass.

ArgumentTypeRequiredDescription
prepassBooleanYesWhether the traversal is on its way down.

render ​

Render the slice.

renderPiece ​

Render the slice for the given renderer and actor.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

renderPieceDraw ​

Update the shaders and draw the quad the slice is textured onto.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

renderPieceFinish ​

Hook run after the slice has been drawn. It does nothing.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

renderPieceStart ​

Bring the buffer objects and the texture filters up to date before the slice is drawn.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

replaceShaderClip ​

Substitute the clipping plane declarations and implementation into the shader sources.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

replaceShaderCoincidentOffset ​

Substitute the depth offset the renderable's coincident topology resolution asks for into the fragment shader.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

replaceShaderValues ​

Substitute the mapper's own declarations and implementation into the shader sources.

ArgumentTypeRequiredDescription
shadersIShaderSourcesYesThe shader sources, edited in place.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

setCameraShaderParameters ​

Set the camera uniforms of the shader program.

ArgumentTypeRequiredDescription
cellBOYesThe OpenGL helper carrying the shader program.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

setMapperShaderParameters ​

Set the texture and geometry uniforms of the shader program.

ArgumentTypeRequiredDescription
cellBOYesThe OpenGL helper carrying the shader program.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

setPropertyShaderParameters ​

Set the image property uniforms of the shader program.

ArgumentTypeRequiredDescription
cellBOYesThe OpenGL helper carrying the shader program.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

translucentPass ​

Render the slice during the translucent pass, remembering the render pass so that its shader replacement is applied.

ArgumentTypeRequiredDescription
prepassBooleanYesWhether the traversal is on its way down.
renderPassvtkRenderPassYesThe render pass being traversed.

updateBufferObjects ​

Rebuild the buffer objects when they are out of date.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

updateLabelOutlineOpacityTexture ​

Build or reuse the texture holding the per-label outline opacities of the given image slice.

ArgumentTypeRequiredDescription
imagevtkImageSliceYesThe image slice being rendered.

updateShaders ​

Make the helper's shader program current, rebuilding it when needed, and push the mapper, camera and property uniforms.

ArgumentTypeRequiredDescription
cellBOYesThe OpenGL helper carrying the shader program.
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

updatelabelOutlineThicknessTexture ​

Build or reuse the texture holding the per-label outline thicknesses of the given image slice.

ArgumentTypeRequiredDescription
imagevtkImageSliceYesThe image slice being rendered.

zBufferPass ​

Render the slice depth only, so that a later pass can mix geometry with volumes.

ArgumentTypeRequiredDescription
prepassBooleanYesWhether the traversal is on its way down.