/** * 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 { RuntimeContext } from '../../../../mol-task/index.js'; import { BodyInfo, BodyMaskParams, BodyMaskResult, LabelStore } from '../types.js'; /** Bodies with voxels, largest first (ties broken by id) — the order masks are exported in. */ export declare function orderBodiesBySize(bodies: readonly BodyInfo[]): BodyInfo[]; /** File-name stem of a volume label (extension stripped), falling back to `volume`. */ export declare function maskBaseName(label: string | undefined): string; /** `{base}_body001_mask.mrc`, `rank` is 1-based. */ export declare function bodyMaskFileName(base: string, rank: number): string; /** Effective mask params of one body: per-body overrides on top of the defaults. */ export declare function resolveBodyMaskParams(body: BodyInfo, defaults: BodyMaskParams): BodyMaskParams; /** MRC bytes of a body mask on the full source grid (same box and origin as the source). */ export declare function writeBodyMaskMrc(volume: Volume, result: BodyMaskResult): ArrayBuffer; /** Downloads the volume's current voxel data as a float32 MRC, in-place edits included. */ export declare function downloadVolumeMrc(volume: Volume, baseName: string): void; export interface ExportBodyMasksOptions { baseName: string; /** Bundle all masks into one zip instead of downloading them one by one. */ bundleZip: boolean; /** Deflate the zip (slow for large maps); ignored unless `bundleZip`. */ compress: boolean; } /** * Computes and downloads one MRC mask per body, largest body first. Returns the file names * in export order. */ export declare function exportBodyMasks(volume: Volume, store: LabelStore, defaults: BodyMaskParams, thresholdAbs: number, options: ExportBodyMasksOptions, ctx: RuntimeContext): Promise;