/** * ImageStoreHelper - Cross-axis image storage * * Extracted from DrawToolCore.ts: * - syncLayerSliceData * * Phase 3: MaskVolume is the sole storage backend. All IPaintImages params removed. */ import { BaseTool } from "./BaseTool"; import type { ToolContext } from "./BaseTool"; import type { ImageStoreHostDeps } from "./ToolHost"; export declare class ImageStoreHelper extends BaseTool { private callbacks; constructor(ctx: ToolContext, callbacks: ImageStoreHostDeps); /** * Get MaskVolume for a specific layer. * Delegates to the volumes stored in protectedData.maskData. * * @param layer - "layer1", "layer2", or "layer3" * @returns MaskVolume for the given layer, or layer1 as fallback */ private getVolumeForLayer; /** * Get the canvas element for a specific layer. */ private getCanvasForLayer; /** * Vertically flip an ImageData buffer in-place (swap rows top↔bottom). * * Used to compensate for the Z-axis direction reversal between sagittal * and coronal views. On coronal, Z runs along the canvas j-axis (vertical), * and the display flip (scale(1,-1)) reverses Z relative to sagittal's * horizontal Z mapping. This row-swap aligns the Z ordering so that * MaskVolume stores data in a consistent coordinate system. */ private flipImageDataVertically; /** * Sync the current layer canvas to its MaskVolume slice and notify the parent * via getMask. This is the primary write path after any draw/erase operation. */ syncLayerSliceData(index: number, layer: string): void; }