Skip to content

Function: getWorldBoundsForSlice()

ts
function getWorldBoundsForSlice(
   vol, 
   sliceType, 
   sliceIndex?): [number[], number[]];

Defined in: src/volume/orthogonalSlices.ts:226

Get world-space bounds for a slice.

Parameters

vol

NeuroVol

The volume to get bounds from

sliceType

"axial" | "coronal" | "sagittal"

Type of slice: 'axial', 'sagittal', or 'coronal'

sliceIndex?

number

Grid index of the slice. If not provided, returns bounds for entire dimension.

Returns

[number[], number[]]

Tuple of [minBounds, maxBounds] where each is a 3-element array of world coordinates

Released under the MIT License.