/** * Copyright (c) 2026 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Tadej Satler */ import { Volume } from '../../../../mol-model/volume.js'; import { Tensor } from '../../../../mol-math/linear-algebra.js'; import { RuntimeContext } from '../../../../mol-task/index.js'; import { BodyId, BodyMaskParams, BodyMaskResult } from '../types.js'; /** * Soft mask of one body: binary body voxels (optionally restricted to density >= threshold), * dilated by `extend` voxels and given a cosine soft edge, computed only inside the padded * bounding box of the body. Returns undefined when the body has no voxels. */ export declare function computeBodyMask(volume: Volume, labels: Uint8Array, bodyId: BodyId, params: BodyMaskParams, thresholdAbs: number, ctx: RuntimeContext): Promise; /** * Wraps a body mask result into a `Volume` covering only its bounding box. The grid transform * is the source transform composed with the box offset, so the cropped volume renders in place. */ export declare function buildCroppedMaskVolume(source: Volume, result: BodyMaskResult, label: string): Volume; /** Writes a bounding-box mask result into a full-size array laid out like the source grid. */ export declare function scatterToFullBox(result: BodyMaskResult, space: Tensor.Space, out: Float32Array): Float32Array;