Skip to main content

Function: getCurrentVolumeViewportSlice()

getCurrentVolumeViewportSlice(viewport): object

Get the image data for the current slice rendered on the viewport. The image data returned is the full slice and not only the region that is visible on the viewport. It does not work for oblique views.

Parameters

viewport: VolumeViewport

Volume viewport

Returns

object

Slice image data and matrices to convert from volume to slice and vice-versa

height

height: number = sliceViewInfo.height

indexToSliceMatrix

indexToSliceMatrix: mat4

scalarData

scalarData: PixelDataTypedArray

sliceToIndexMatrix

sliceToIndexMatrix: mat4

width

width: number = sliceViewInfo.width

Defined in

packages/core/src/utilities/getCurrentVolumeViewportSlice.ts:13