import type { DicomTagOverrides, Modality } from '../schema/types.js'; import { type UidSet } from './uid.js'; export type LargeImageSpec = { /** Approximate total file size in bytes (must exceed the 512 MB cap). */ targetBytes: number; modality?: Modality; /** UID namespace (hash-derived UIDs); random when both salt and seed omitted. */ uidSalt?: string; /** Bridged to a salt when uidSalt is omitted; fixes the instance UIDs. */ seed?: number; }; export type LargeFileEncoding = 'native' | 'encapsulated'; export type LargeFileResult = { path: string; bytesWritten: number; encoding: LargeFileEncoding; pixelBytes: number; }; export type StreamLargeImageOptions = { /** Approximate total file size in bytes (no floor — small values are valid). */ targetBytes: number; modality?: Modality; /** UID namespace (hash-derived UIDs); random when both salt and seed omitted. */ uidSalt?: string; /** Bridged to a salt when uidSalt is omitted; fixes the instance UIDs. */ seed?: number; /** Explicit UID set — used as-is (e.g. collection threading shared study/series UIDs). */ uid?: UidSet; /** Tag overrides applied to the dataset (e.g. InstanceNumber, study/series tags). */ tags?: DicomTagOverrides; chunkBytes?: number; owMaxBytes?: number; fragmentBytes?: number; }; /** * Low-level streaming writer: chooses the encoding from the requested size and * the (overridable) ceilings, and applies **no policy bounds** — `targetBytes` * may be tiny. This is the entry point for exercising the streamed path inline * in tests/CI: override `owMaxBytes`/`fragmentBytes` to force either encoding at * KB scale. Normal callers want {@link writeLargeImageFile}, which adds the * 512 MB–50 GB policy bounds. */ export declare function streamLargeImage(outPath: string, options: StreamLargeImageOptions): LargeFileResult; /** * Stream a single DICOM image of approximately `targetBytes` to disk without * holding it in memory. Disk-only: the in-memory `generateFile` path keeps the * 512 MB cap. Files up to ~4 GB use a conformant native (OW) encoding; larger * files (to 50 GB) use encapsulated fragments — a valid container with * non-conformant zero pixel content. */ export declare function writeLargeImageFile(spec: LargeImageSpec, outPath: string, options?: { chunkBytes?: number; }): LargeFileResult;