Skip to content

ImageCPRMapper ​

Methods ​

buildBufferObjects ​

Build the volume, color and opacity textures, and the vertex buffer of the quads the straightened image 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 ​

Fill in the shader template and run 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 vtkOpenGLImageCPRMapper characteristics.

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

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

ArgumentTypeRequiredDescription
initialValuesIOpenGLImageCPRMapperInitialValuesNofor pre-setting some of its content

opaquePass ​

Render the straightened image during the opaque 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.

opaqueZBufferPass ​

Capture the depth of the straightened image during the opaque z-buffer pass.

ArgumentTypeRequiredDescription
prepassBooleanYesWhether the traversal is on its way down.

render ​

Render the straightened image.

renderPiece ​

Update the renderable, then render the straightened image for the given renderer and prop. Does nothing when the renderable's pre-render check fails.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
propvtkImageSliceYesThe image slice being rendered.

renderPieceDraw ​

Activate the textures, update the shaders and draw the quads.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

renderPieceFinish ​

Hook run after the straightened image has been drawn. It does nothing.

ArgumentTypeRequiredDescription
renvtkRendererYesThe renderer.
actorvtkImageSliceYesThe image slice being rendered.

renderPieceStart ​

Bring the buffer objects up to date before the quads are 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.

updateBufferObjects ​

Rebuild the buffer objects when they are out of date, then set the texture filters from the interpolation type of the actor property.

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