Skip to content

ImageResliceMapper ​

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 scalar, color, opacity and label outline textures, and the vertex buffer of the reslice geometry.

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 vtkOpenGLImageResliceMapper characteristics.

ArgumentTypeRequiredDescription
publicAPIYesobject on which methods will be bounds (public)
modelYesobject on which data structure will be bounds (protected)
initialValuesIOpenGLImageResliceMapperInitialValuesNo(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.

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.

getScalarTextures ​

Get the textures holding the scalars of the valid inputs, one per component.

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 vtkOpenGLImageResliceMapper.

ArgumentTypeRequiredDescription
initialValuesIOpenGLImageResliceMapperInitialValuesNofor 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 ​

Activate the textures, update the shaders and draw the reslice geometry.

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 up to date and set the texture filters from the interpolation type of each input property.

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

replaceShaderPositionVC ​

Substitute the view coordinate position declarations and implementation into the shader sources.

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

replaceShaderTCoord ​

Substitute the texture sampling declarations and implementation, including slab compositing and label outlines, into the shader sources.

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.

setScalarTextures ​

Supply the scalar textures from outside the mapper. The mapper then keeps them as they are instead of rebuilding them from its inputs.

ArgumentTypeRequiredDescription
scalarTexturesArray[vtkOpenGLTexture]YesThe scalar textures to use.

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 one row of per-label outline opacities per label map input.

ArgumentTypeRequiredDescription
labelOutlinePropertiesArray[ILabelOutlineProperty]YesThe label map inputs.

updateLabelOutlineThicknessTexture ​

Build or reuse the texture holding one row of per-label outline thicknesses per label map input.

ArgumentTypeRequiredDescription
labelOutlinePropertiesArray[ILabelOutlineProperty]YesThe label map inputs.

updateResliceGeometry ​

Rebuild the polydata the slice is drawn on, either from the renderable's slice polydata or by cutting the image bounding box with its slice plane.

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.

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.