ImageResliceMapper
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 scalar, color, opacity and label outline textures, and the vertex buffer of the reslice geometry.
| 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 vtkOpenGLImageResliceMapper 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 | IOpenGLImageResliceMapperInitialValues | 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. |
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. |
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.
| 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 vtkOpenGLImageResliceMapper.
| Argument | Type | Required | Description |
|---|---|---|---|
initialValues | IOpenGLImageResliceMapperInitialValues | 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
Activate the textures, update the shaders and draw the reslice geometry.
| 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 up to date and set the texture filters from the interpolation type of each input property.
| Argument | Type | Required | Description |
|---|---|---|---|
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. |
replaceShaderPositionVC
Substitute the view coordinate position 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. |
replaceShaderTCoord
Substitute the texture sampling declarations and implementation, including slab compositing and label outlines, 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. |
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. |
setScalarTextures
Supply the scalar textures from outside the mapper. The mapper then keeps them as they are instead of rebuilding them from its inputs.
| Argument | Type | Required | Description |
|---|---|---|---|
scalarTextures | Array[vtkOpenGLTexture] | Yes | The scalar textures to use. |
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 one row of per-label outline opacities per label map input.
| Argument | Type | Required | Description |
|---|---|---|---|
labelOutlineProperties | Array[ILabelOutlineProperty] | Yes | The label map inputs. |
updateLabelOutlineThicknessTexture
Build or reuse the texture holding one row of per-label outline thicknesses per label map input.
| Argument | Type | Required | Description |
|---|---|---|---|
labelOutlineProperties | Array[ILabelOutlineProperty] | Yes | The 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.
| 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. |
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. |