Skip to main content

Function: cropFromVTKVolumeByCropBoundaries()

cropFromVTKVolumeByCropBoundaries(vtkVolume, cropRegion): TInteractiveImeasureCropResult

Defined in: src/cropping/index.ts:32

Crops a VTK volume using specified crop boundaries and returns the cropped volume data along with metadata.

Parameters​

vtkVolume​

vtkImageData

Source vtk.js volume.

cropRegion​

TIMeasureCropRegion

Intended crop region in voxel space.

Returns​

TInteractiveImeasureCropResult

Cropped volume values and metadata suitable for iMeasure request payloads.

Remarks​

When intended crop bounds exceed source volume limits, returned cropMeta retains both unclipped and effective (clipped) bounds so the integrator can send correct API metadata.