import { BaseTool } from "./BaseTool"; import type { ToolContext } from "./BaseTool"; import type { ChannelValue, RGBAColor, ChannelColorMap } from "../core"; import type { SphereType } from "./SphereTool"; import type { LayerChannelHostDeps } from "./ToolHost"; /** * Manages layer/channel state: active selection, visibility, and channel colors. * * Extracted from NrrdTools.ts to reduce its size. * Follows the same BaseTool + ToolContext + Callbacks pattern as other tools. */ export declare class LayerChannelManager extends BaseTool { private callbacks; constructor(ctx: ToolContext, callbacks: LayerChannelHostDeps); /****************************Active Layer/Channel****************************************************/ setActiveLayer(layerId: string): void; getActiveLayer(): string; setActiveChannel(channel: ChannelValue): void; getActiveChannel(): number; /** * Set the active sphere type and sync brush/fill color. * * @example * ```ts * nrrdTools.setActiveSphereType('nipple'); * ``` */ setActiveSphereType(type: SphereType): void; getActiveSphereType(): SphereType; /****************************Visibility****************************************************/ setLayerVisible(layerId: string, visible: boolean): void; isLayerVisible(layerId: string): boolean; setChannelVisible(layerId: string, channel: ChannelValue, visible: boolean): void; isChannelVisible(layerId: string, channel: ChannelValue): boolean; getLayerVisibility(): Record; getChannelVisibility(): Record>; hasLayerData(layerId: string): boolean; /****************************Per-Layer Opacity****************************************************/ setLayerOpacity(layerId: string, opacity: number): void; getLayerOpacity(layerId: string): number; getLayerOpacityMap(): Record; /****************************Channel Colors****************************************************/ setChannelColor(layerId: string, channel: number, color: RGBAColor): void; getChannelColor(layerId: string, channel: number): RGBAColor; getChannelHexColor(layerId: string, channel: number): string; getChannelCssColor(layerId: string, channel: number): string; setChannelColors(layerId: string, colorMap: Partial): void; setAllLayersChannelColor(channel: number, color: RGBAColor): void; resetChannelColors(layerId?: string, channel?: number): void; /****************************Private Helpers****************************************************/ /** * Sync brush/fill color from the active layer's volume channel color. * Falls back to global CHANNEL_HEX_COLORS if volume not available. */ private syncBrushColor; }