Skip to main content

Function: snapFocalPointToSlice()

snapFocalPointToSlice(focalPoint, position, sliceRange, viewPlaneNormal, spacingInNormalDirection, deltaFrames): object

Given a number of frames, deltaFrames, move the focalPoint and camera position so that it moves forward/backwards deltaFrames in the camera's normal direction, and snaps to the nearest frame.

Parameters

focalPoint: Point3

The focal point to move.

position: Point3

The camera position to move.

sliceRange: ActorSliceRange

The scroll range used to find the current position in the stack, as well as prevent scrolling past the extent of the volume.

viewPlaneNormal: Point3

The normal direction of the camera.

spacingInNormalDirection: number

The spacing of frames the normal direction of the camera.

deltaFrames: number

The number of frames to jump.

Returns

object

The newFocalPoint and newPosition of the camera.

newFocalPoint

newFocalPoint: Point3

newPosition

newPosition: Point3

Defined in

packages/core/src/utilities/snapFocalPointToSlice.ts:19