Function: getViewSlabDepthOfViewport()
getViewSlabDepthOfViewport(
viewport):number|undefined
The full depth in mm that a viewport's slab shows, or undefined when the viewport shows no slab of its own.
getSlabThickness does not return a depth on every render path, and the
two paths differ:
- A volume viewport stores a half thickness, because the clipping planes sit
at
focalPoint ± slabThickness. This function doubles that value. - A generic planar viewport uses
vtkImageResliceMapper, where the field is already a full thickness. This function passes that value through.
A caller that needs a depth, such as a brush fill, must use this function
and not the raw value. See
docs/docs/concepts/cornerstone-tools/annotation/voxel-statistics.md.
Parameters
• viewport: Viewport
Returns
number | undefined