Function: getClosestStackImageIndexForPoint()
getClosestStackImageIndexForPoint(
point
,viewport
):number
|null
Given a point in 3D space and a viewport it returns the index of the closest imageId, it assumes that stack images are sorted according to their sliceLocation
Parameters
• point: Point3
[A, B, C] coordinates of the point in 3D space
• viewport: IStackViewport
The StackViewport to search for the closest imageId
Returns
number
| null
The imageId index of the closest imageId or null if no imageId is found
Defined in
packages/core/src/utilities/getClosestStackImageIndexForPoint.ts:13