VolumeMapper
Introduction
vtkVolumeMapper inherits from vtkMapper. A volume mapper that performs ray casting on the GPU using fragment programs.
Methods
extend
Method use to decorate a given object (publicAPI+model) with vtkVolumeMapper 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 | IVolumeMapperInitialValues | No | (default: {}) |
getAutoAdjustSampleDistances
getBlendMode
getBlendModeAsString
getBounds
Get the bounds for this mapper as [xmin, xmax, ymin, ymax,zmin, zmax].
getColorTextureWidth
Get the color texture width.
getImageSampleDistance
Sampling distance in the XY image dimensions. Default value of 1 meaning 1 ray cast per pixel. If set to 0.5, 4 rays will be cast per pixel. If set to 2.0, 1 ray will be cast for every 4 (2 by 2) pixels. T
getInitialInteractionScale
Get at what scale the quality is reduced when interacting for the first time with the volume It should should be set before any call to render for this volume The higher the scale is, the lower the quality of rendering is during interaction
getInteractionSampleDistanceFactor
Get by how much the sample distance should be increased when interacting This feature is only implemented in the OpenGL volume mapper
getLabelOutlineTextureWidth
Get the label outline texture width.
getMaximumSamplesPerRay
getOpacityTextureWidth
Get the opacity texture width.
getSampleDistance
Get the distance between samples used for rendering
getVolumeShadowSamplingDistFactor
Get the multipler for volume shadow sampling distance
invokeLightingActivated
Invoke the LightingActivated event with the given payload.
| Argument | Type | Required | Description |
|---|---|---|---|
args | Yes | The event payload |
newInstance
Method use to create a new instance of vtkVolumeMapper
onLightingActivated
Register a callback to be invoked when the LightingActivated event occurs.
| Argument | Type | Required | Description |
|---|---|---|---|
cb | EventHandler | Yes | The callback to register |
priority | Number | No | Priority of this subscription |
setAutoAdjustSampleDistances
| Argument | Type | Required | Description |
|---|---|---|---|
autoAdjustSampleDistances | Yes |
setBlendMode
Set blend mode to COMPOSITE_BLEND
| Argument | Type | Required | Description |
|---|---|---|---|
blendMode | BlendMode | Yes |
setBlendModeToAdditiveIntensity
Set blend mode to ADDITIVE_INTENSITY_BLEND.
setBlendModeToAverageIntensity
Set blend mode to AVERAGE_INTENSITY_BLEND
setBlendModeToComposite
Set blend mode to COMPOSITE_BLEND
setBlendModeToMaximumIntensity
Set blend mode to MAXIMUM_INTENSITY_BLEND
setBlendModeToMinimumIntensity
Set blend mode to MINIMUM_INTENSITY_BLEND
setBlendModeToRadonTransform
Set blend mode to RADON_TRANSFORM_BLEND
setColorTextureWidth
Set the color texture width.
The default width (1024) should be fine in most instances. Only set this property if your color transfer function range width is larger than 1024.
A reasonable max texture size would be either 2048 or 4096, as those widths are supported by the vast majority of devices. Any width larger than that will have issues with device support.
Specifying a width that is less than or equal to 0 will use the largest possible texture width on the device. Use this with caution! The max texture width of one device may not be the same for another device.
You can find more information about supported texture widths at the following link: https://web3dsurvey.com/webgl/parameters/MAX_TEXTURE_SIZE
| Argument | Type | Required | Description |
|---|---|---|---|
width | Number | Yes | the texture width (defaults to 1024) |
setImageSampleDistance
| Argument | Type | Required | Description |
|---|---|---|---|
imageSampleDistance | Yes |
setInitialInteractionScale
| Argument | Type | Required | Description |
|---|---|---|---|
initialInteractionScale | Yes |
setInteractionSampleDistanceFactor
| Argument | Type | Required | Description |
|---|---|---|---|
interactionSampleDistanceFactor | Yes |
setLabelOutlineTextureWidth
Set the label outline texture width.
The default width (1024) should be fine in most instances. Only set this property if you have more than 1024 labels that you want to render with thickness.
A reasonable max texture size would be either 2048 or 4096, as those widths are supported by the vast majority of devices. Any width larger than that will have issues with device support.
Specifying a width that is less than or equal to 0 will use the largest possible texture width on the device. Use this with caution! The max texture width of one device may not be the same for another device.
You can find more information about supported texture widths at the following link: https://web3dsurvey.com/webgl/parameters/MAX_TEXTURE_SIZE
| Argument | Type | Required | Description |
|---|---|---|---|
width | Number | Yes | the texture width (defaults to 1024) |
setMaximumSamplesPerRay
| Argument | Type | Required | Description |
|---|---|---|---|
maximumSamplesPerRay | Yes |
setOpacityTextureWidth
Set the opacity texture width.
The default width (1024) should be fine in most instances. Only set this property if your opacity function range width is larger than 1024.
| Argument | Type | Required | Description |
|---|---|---|---|
width | Number | Yes | the texture width (defaults to 1024) |
setSampleDistance
Get the distance between samples used for rendering
| Argument | Type | Required | Description |
|---|---|---|---|
sampleDistance | Yes |
setVolumeShadowSamplingDistFactor
Set the multipler for volume shadow sampling distance. This function is only effective when volumeScatterBlendCoef is greater than 0. For VSSampleDistanceFactor >= 1.0, volume shadow sampling distance = VSSampleDistanceFactor * SampleDistance.
| Argument | Type | Required | Description |
|---|---|---|---|
VSSampleDistanceFactor | Yes |