Skip to main content

Function: pickIntensityPointInSlab()

pickIntensityPointInSlab(viewport, worldPoint): Types.Point3 | null

Picks the extremal-intensity world point along a viewport's view-plane normal within its rendered intensity-projection slab.

An intensity-projection (MIP/MinIP) viewport shows, at each pixel, the extremal voxel anywhere inside the slab - so a world point derived from a click lies on the arbitrary central slab plane, not on the anatomy the user sees. This helper resamples the source volume along the normal through worldPoint (clamped to the slab) and returns the location of the maximum (MIP) or minimum (MinIP) intensity, i.e. the point the projection actually displayed.

Works exclusively through the Generic ("next") viewport surface: the slab and blend mode are read from the source display-set presentation and the volume is sampled directly from the cache (no legacy viewport APIs).

On equal intensities the sample closest to the central plane wins, so uniform regions keep the point where the user clicked.

Returns null when the viewport does not render an intensity-projection slab, or when no volume/plane/finite sample is available.

Parameters

viewport: Viewport

worldPoint: Point3

Returns

Types.Point3 | null

Defined in

tools/src/utilities/pickIntensityPointInSlab.ts:109