copper3d 3.0.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +197 -875
  2. package/dist/Utils/segmentation/CanvasState.d.ts +31 -0
  3. package/dist/Utils/segmentation/CanvasState.js +167 -0
  4. package/dist/Utils/segmentation/CanvasState.js.map +1 -0
  5. package/dist/Utils/segmentation/DragOperator.d.ts +10 -2
  6. package/dist/Utils/segmentation/DragOperator.js +16 -8
  7. package/dist/Utils/segmentation/DragOperator.js.map +1 -1
  8. package/dist/Utils/segmentation/DrawToolCore.d.ts +64 -35
  9. package/dist/Utils/segmentation/DrawToolCore.js +332 -584
  10. package/dist/Utils/segmentation/DrawToolCore.js.map +1 -1
  11. package/dist/Utils/segmentation/NrrdTools.d.ts +117 -353
  12. package/dist/Utils/segmentation/NrrdTools.js +622 -1081
  13. package/dist/Utils/segmentation/NrrdTools.js.map +1 -1
  14. package/dist/Utils/segmentation/RenderingUtils.d.ts +73 -0
  15. package/dist/Utils/segmentation/RenderingUtils.js +180 -0
  16. package/dist/Utils/segmentation/RenderingUtils.js.map +1 -0
  17. package/dist/Utils/segmentation/core/MaskVolume.js +23 -2
  18. package/dist/Utils/segmentation/core/MaskVolume.js.map +1 -1
  19. package/dist/Utils/segmentation/core/UndoManager.d.ts +1 -1
  20. package/dist/Utils/segmentation/core/UndoManager.js +1 -1
  21. package/dist/Utils/segmentation/core/index.d.ts +1 -3
  22. package/dist/Utils/segmentation/core/index.js +0 -1
  23. package/dist/Utils/segmentation/core/index.js.map +1 -1
  24. package/dist/Utils/segmentation/core/types.d.ts +384 -0
  25. package/dist/Utils/segmentation/core/types.js +25 -24
  26. package/dist/Utils/segmentation/core/types.js.map +1 -1
  27. package/dist/Utils/segmentation/coreTools/GuiState.d.ts +22 -0
  28. package/dist/Utils/segmentation/coreTools/GuiState.js +48 -0
  29. package/dist/Utils/segmentation/coreTools/GuiState.js.map +1 -0
  30. package/dist/Utils/segmentation/coreTools/NrrdState.d.ts +25 -0
  31. package/dist/Utils/segmentation/coreTools/NrrdState.js +85 -0
  32. package/dist/Utils/segmentation/coreTools/NrrdState.js.map +1 -0
  33. package/dist/Utils/segmentation/coreTools/divControlTools.d.ts +1 -1
  34. package/dist/Utils/segmentation/coreTools/divControlTools.js +1 -1
  35. package/dist/Utils/segmentation/coreTools/divControlTools.js.map +1 -1
  36. package/dist/Utils/segmentation/coreTools/gui.d.ts +12 -12
  37. package/dist/Utils/segmentation/coreTools/gui.js +81 -107
  38. package/dist/Utils/segmentation/coreTools/gui.js.map +1 -1
  39. package/dist/Utils/segmentation/eventRouter/EventRouter.d.ts +2 -1
  40. package/dist/Utils/segmentation/eventRouter/EventRouter.js +15 -10
  41. package/dist/Utils/segmentation/eventRouter/EventRouter.js.map +1 -1
  42. package/dist/Utils/segmentation/eventRouter/types.d.ts +3 -3
  43. package/dist/Utils/segmentation/tools/BaseTool.d.ts +8 -5
  44. package/dist/Utils/segmentation/tools/BaseTool.js +1 -2
  45. package/dist/Utils/segmentation/tools/BaseTool.js.map +1 -1
  46. package/dist/Utils/segmentation/tools/ContrastTool.d.ts +3 -6
  47. package/dist/Utils/segmentation/tools/ContrastTool.js.map +1 -1
  48. package/dist/Utils/segmentation/tools/CrosshairTool.d.ts +11 -1
  49. package/dist/Utils/segmentation/tools/CrosshairTool.js +50 -25
  50. package/dist/Utils/segmentation/tools/CrosshairTool.js.map +1 -1
  51. package/dist/Utils/segmentation/tools/DataLoader.d.ts +33 -0
  52. package/dist/Utils/segmentation/tools/DataLoader.js +159 -0
  53. package/dist/Utils/segmentation/tools/DataLoader.js.map +1 -0
  54. package/dist/Utils/segmentation/tools/DragSliceTool.d.ts +3 -10
  55. package/dist/Utils/segmentation/tools/DragSliceTool.js +63 -53
  56. package/dist/Utils/segmentation/tools/DragSliceTool.js.map +1 -1
  57. package/dist/Utils/segmentation/tools/DrawingTool.d.ts +85 -0
  58. package/dist/Utils/segmentation/tools/DrawingTool.js +270 -0
  59. package/dist/Utils/segmentation/tools/DrawingTool.js.map +1 -0
  60. package/dist/Utils/segmentation/tools/EraserTool.js +8 -8
  61. package/dist/Utils/segmentation/tools/EraserTool.js.map +1 -1
  62. package/dist/Utils/segmentation/tools/ImageStoreHelper.d.ts +13 -33
  63. package/dist/Utils/segmentation/tools/ImageStoreHelper.js +39 -82
  64. package/dist/Utils/segmentation/tools/ImageStoreHelper.js.map +1 -1
  65. package/dist/Utils/segmentation/tools/LayerChannelManager.d.ts +52 -0
  66. package/dist/Utils/segmentation/tools/LayerChannelManager.js +175 -0
  67. package/dist/Utils/segmentation/tools/LayerChannelManager.js.map +1 -0
  68. package/dist/Utils/segmentation/tools/PanTool.d.ts +47 -0
  69. package/dist/Utils/segmentation/tools/PanTool.js +90 -0
  70. package/dist/Utils/segmentation/tools/PanTool.js.map +1 -0
  71. package/dist/Utils/segmentation/tools/SliceRenderPipeline.d.ts +80 -0
  72. package/dist/Utils/segmentation/tools/SliceRenderPipeline.js +355 -0
  73. package/dist/Utils/segmentation/tools/SliceRenderPipeline.js.map +1 -0
  74. package/dist/Utils/segmentation/tools/SphereTool.d.ts +223 -10
  75. package/dist/Utils/segmentation/tools/SphereTool.js +512 -47
  76. package/dist/Utils/segmentation/tools/SphereTool.js.map +1 -1
  77. package/dist/Utils/segmentation/tools/ToolHost.d.ts +74 -0
  78. package/dist/Utils/segmentation/tools/ToolHost.js +10 -0
  79. package/dist/Utils/segmentation/tools/ToolHost.js.map +1 -0
  80. package/dist/Utils/segmentation/tools/ZoomTool.d.ts +2 -6
  81. package/dist/Utils/segmentation/tools/ZoomTool.js +3 -3
  82. package/dist/Utils/segmentation/tools/ZoomTool.js.map +1 -1
  83. package/dist/Utils/segmentation/tools/index.d.ts +8 -6
  84. package/dist/Utils/segmentation/tools/index.js +10 -1
  85. package/dist/Utils/segmentation/tools/index.js.map +1 -1
  86. package/dist/Utils/workers/reformatSaveDataWorker.d.ts +1 -1
  87. package/dist/bundle.esm.js +3729 -3017
  88. package/dist/bundle.umd.js +3729 -3017
  89. package/dist/index.d.ts +6 -3
  90. package/dist/index.js +1 -1
  91. package/dist/index.js.map +1 -1
  92. package/dist/types/Utils/segmentation/CanvasState.d.ts +31 -0
  93. package/dist/types/Utils/segmentation/DragOperator.d.ts +10 -2
  94. package/dist/types/Utils/segmentation/DrawToolCore.d.ts +64 -35
  95. package/dist/types/Utils/segmentation/NrrdTools.d.ts +117 -353
  96. package/dist/types/Utils/segmentation/RenderingUtils.d.ts +73 -0
  97. package/dist/types/Utils/segmentation/core/UndoManager.d.ts +1 -1
  98. package/dist/types/Utils/segmentation/core/index.d.ts +1 -3
  99. package/dist/types/Utils/segmentation/core/types.d.ts +384 -0
  100. package/dist/types/Utils/segmentation/coreTools/GuiState.d.ts +22 -0
  101. package/dist/types/Utils/segmentation/coreTools/NrrdState.d.ts +25 -0
  102. package/dist/types/Utils/segmentation/coreTools/divControlTools.d.ts +1 -1
  103. package/dist/types/Utils/segmentation/coreTools/gui.d.ts +12 -12
  104. package/dist/types/Utils/segmentation/eventRouter/EventRouter.d.ts +2 -1
  105. package/dist/types/Utils/segmentation/eventRouter/types.d.ts +3 -3
  106. package/dist/types/Utils/segmentation/tools/BaseTool.d.ts +8 -5
  107. package/dist/types/Utils/segmentation/tools/ContrastTool.d.ts +3 -6
  108. package/dist/types/Utils/segmentation/tools/CrosshairTool.d.ts +11 -1
  109. package/dist/types/Utils/segmentation/tools/DataLoader.d.ts +33 -0
  110. package/dist/types/Utils/segmentation/tools/DragSliceTool.d.ts +3 -10
  111. package/dist/types/Utils/segmentation/tools/DrawingTool.d.ts +85 -0
  112. package/dist/types/Utils/segmentation/tools/ImageStoreHelper.d.ts +13 -33
  113. package/dist/types/Utils/segmentation/tools/LayerChannelManager.d.ts +52 -0
  114. package/dist/types/Utils/segmentation/tools/PanTool.d.ts +47 -0
  115. package/dist/types/Utils/segmentation/tools/SliceRenderPipeline.d.ts +80 -0
  116. package/dist/types/Utils/segmentation/tools/SphereTool.d.ts +223 -10
  117. package/dist/types/Utils/segmentation/tools/ToolHost.d.ts +74 -0
  118. package/dist/types/Utils/segmentation/tools/ZoomTool.d.ts +2 -6
  119. package/dist/types/Utils/segmentation/tools/index.d.ts +8 -6
  120. package/dist/types/Utils/workers/reformatSaveDataWorker.d.ts +1 -1
  121. package/dist/types/index.d.ts +6 -3
  122. package/package.json +1 -1
  123. package/dist/Utils/segmentation/CommToolsData.d.ts +0 -177
  124. package/dist/Utils/segmentation/CommToolsData.js +0 -548
  125. package/dist/Utils/segmentation/CommToolsData.js.map +0 -1
  126. package/dist/Utils/segmentation/core/MigrationUtils.d.ts +0 -97
  127. package/dist/Utils/segmentation/core/MigrationUtils.js +0 -163
  128. package/dist/Utils/segmentation/core/MigrationUtils.js.map +0 -1
  129. package/dist/Utils/segmentation/coreTools/coreType.d.ts +0 -363
  130. package/dist/Utils/segmentation/coreTools/coreType.js +0 -3
  131. package/dist/Utils/segmentation/coreTools/coreType.js.map +0 -1
  132. package/dist/types/Utils/segmentation/CommToolsData.d.ts +0 -177
  133. package/dist/types/Utils/segmentation/core/MigrationUtils.d.ts +0 -97
  134. package/dist/types/Utils/segmentation/coreTools/coreType.d.ts +0 -363
@@ -6,15 +6,11 @@
6
6
  */
7
7
  import { BaseTool } from "./BaseTool";
8
8
  import type { ToolContext } from "./BaseTool";
9
- export interface ZoomCallbacks {
10
- resetPaintAreaUIPosition: (l?: number, t?: number) => void;
11
- resizePaintArea: (moveDistance: number) => void;
12
- setIsDrawFalse: (target: number) => void;
13
- }
9
+ import type { ZoomHostDeps } from "./ToolHost";
14
10
  export declare class ZoomTool extends BaseTool {
15
11
  private container;
16
12
  private mainAreaContainer;
17
13
  private callbacks;
18
- constructor(ctx: ToolContext, container: HTMLElement, mainAreaContainer: HTMLDivElement, callbacks: ZoomCallbacks);
14
+ constructor(ctx: ToolContext, container: HTMLElement, mainAreaContainer: HTMLDivElement, callbacks: ZoomHostDeps);
19
15
  configMouseZoomWheel(): (e: WheelEvent) => void;
20
16
  }
@@ -8,15 +8,17 @@
8
8
  */
9
9
  export { BaseTool } from "./BaseTool";
10
10
  export type { ToolContext } from "./BaseTool";
11
+ export type { ToolHost, ImageStoreHostDeps, PanHostDeps, ContrastHostDeps, ZoomHostDeps, SphereHostDeps, DrawingHostDeps, DragSliceHostDeps, LayerChannelHostDeps, SliceRenderHostDeps, DataLoaderHostDeps, } from "./ToolHost";
11
12
  export { EraserTool } from "./EraserTool";
13
+ export { DrawingTool } from "./DrawingTool";
14
+ export { PanTool } from "./PanTool";
12
15
  export { ZoomTool } from "./ZoomTool";
13
- export type { ZoomCallbacks } from "./ZoomTool";
14
- export { SphereTool } from "./SphereTool";
15
- export type { SphereCallbacks } from "./SphereTool";
16
+ export { SphereTool, SPHERE_CHANNEL_MAP } from "./SphereTool";
17
+ export type { SphereType } from "./SphereTool";
16
18
  export { CrosshairTool } from "./CrosshairTool";
17
19
  export { ContrastTool } from "./ContrastTool";
18
- export type { ContrastCallbacks } from "./ContrastTool";
19
20
  export { ImageStoreHelper } from "./ImageStoreHelper";
20
- export type { ImageStoreCallbacks } from "./ImageStoreHelper";
21
21
  export { DragSliceTool } from "./DragSliceTool";
22
- export type { DragSliceCallbacks } from "./DragSliceTool";
22
+ export { LayerChannelManager } from "./LayerChannelManager";
23
+ export { SliceRenderPipeline } from "./SliceRenderPipeline";
24
+ export { DataLoader } from "./DataLoader";
@@ -1,4 +1,4 @@
1
- import { IPaintImage } from "../segmentation/coreTools/coreType";
1
+ import { IPaintImage } from "../segmentation/core/types";
2
2
  declare function pruningData(originArr: IPaintImage[]): Uint8ClampedArray[];
3
3
  declare function restructData(originArr: IPaintImage[], len: number, width: number, height: number): {
4
4
  sliceIndex: number;
@@ -17,10 +17,13 @@ import { Copper3dTrackballControls } from "./Controls/Copper3dTrackballControls"
17
17
  import { MeshNodeTool } from "./Utils/MeshNodeTool";
18
18
  import { removeGuiFolderChilden } from "./Utils/segmentation/coreTools/gui";
19
19
  import { nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, exportPaintImageType, IOptVTKLoader } from "./types/types";
20
- import { IPaintImage, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates } from "./Utils/segmentation/coreTools/coreType";
20
+ import { IPaintImage, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, IGuiMeta } from "./Utils/segmentation/core/types";
21
+ import { NrrdState } from "./Utils/segmentation/coreTools/NrrdState";
22
+ import { GuiState } from "./Utils/segmentation/coreTools/GuiState";
23
+ import type { ToolMode, IAnnotationCallbacks } from "./Utils/segmentation/core/types";
21
24
  import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss } from "./Utils/segmentation/core/index";
22
25
  import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
23
26
  import "./css/style.css";
24
- export declare const REVISION = "v3.0.1-beta";
27
+ export declare const REVISION = "v3.1.0-beta";
25
28
  export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, NrrdTools, loading, Copper3dTrackballControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, };
26
- export type { positionType, screenPosType, optsType, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, LayerId, ChannelValue, };
29
+ export type { positionType, screenPosType, optsType, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, NrrdState, GuiState, IGuiMeta, ToolMode, IAnnotationCallbacks, LayerId, ChannelValue, };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "copper3d",
3
3
  "description": "A 3d visualisation package base on threejs provides multiple scenes and Nrrd image load funtion.",
4
- "version": "3.0.1",
4
+ "version": "3.1.0",
5
5
  "main": "dist/bundle.umd.js",
6
6
  "moudle": "dist/bundle.esm.js",
7
7
  "types": "dist/types/index.d.ts",
@@ -1,177 +0,0 @@
1
- import { IProtected, IGUIStates, INrrdStates, ICursorPage, IConvertObjType, INewMaskData, IKeyBoardSettings } from "./coreTools/coreType";
2
- import { MaskVolume } from "./core/index";
3
- export declare class CommToolsData {
4
- baseCanvasesSize: number;
5
- private _reusableSliceBuffer;
6
- private _reusableBufferWidth;
7
- private _reusableBufferHeight;
8
- /** Whether the keyboard-config dialog is open (suppresses all shortcuts). */
9
- protected _configKeyBoard: boolean;
10
- /** Active keyboard shortcut bindings. */
11
- protected _keyboardSettings: IKeyBoardSettings;
12
- nrrd_states: INrrdStates;
13
- cursorPage: ICursorPage;
14
- gui_states: IGUIStates;
15
- protectedData: IProtected;
16
- constructor(container: HTMLElement, mainAreaContainer: HTMLElement, options?: {
17
- layers?: string[];
18
- });
19
- /**
20
- * Get MaskVolume for a specific layer
21
- *
22
- * @param layer - Layer name: "layer1", "layer2", or "layer3"
23
- * @returns MaskVolume instance for the specified layer
24
- *
25
- * @example
26
- * ```ts
27
- * const volume = this.getVolumeForLayer("layer1");
28
- * volume.setVoxel(x, y, z, 255);
29
- * ```
30
- */
31
- getVolumeForLayer(layer: string): MaskVolume;
32
- /**
33
- * Get MaskVolume for the currently active layer
34
- *
35
- * @returns MaskVolume instance for the current layer
36
- *
37
- * @example
38
- * ```ts
39
- * const volume = this.getCurrentVolume();
40
- * const slice = volume.getSliceImageData(50, 'z');
41
- * ```
42
- */
43
- getCurrentVolume(): MaskVolume;
44
- /**
45
- * Get all three MaskVolume instances
46
- *
47
- * @returns Object containing all three layer volumes
48
- *
49
- * @example
50
- * ```ts
51
- * const { layer1, layer2, layer3 } = this.getAllVolumes();
52
- * layer1.clear();
53
- * ```
54
- */
55
- getAllVolumes(): INewMaskData;
56
- private generateSystemCanvases;
57
- private generateLayerTargets;
58
- /**
59
- * Rewrite this {clearPaint} function under DrawToolCore
60
- */
61
- clearPaint(): void;
62
- /**
63
- * Rewrite this {undoLastPainting} function under DrawToolCore
64
- */
65
- undoLastPainting(): void;
66
- /**
67
- * Rewrite this {redoLastPainting} function under DrawToolCore
68
- */
69
- redoLastPainting(): void;
70
- /**
71
- * Rewrite this {clearStoreImages} function under NrrdTools
72
- */
73
- clearStoreImages(): void;
74
- /**
75
- * Rewrite this {resizePaintArea} function under NrrdTools
76
- */
77
- resizePaintArea(factor: number): void;
78
- /**
79
- * Rewrite this {setIsDrawFalse} function under NrrdTools
80
- */
81
- setIsDrawFalse(target: number): void;
82
- /**
83
- * Rewrite this {updateOriginAndChangedWH} function under NrrdTools
84
- */
85
- updateOriginAndChangedWH(): void;
86
- /**
87
- * Rewrite this {flipDisplayImageByAxis} function under NrrdTools
88
- */
89
- flipDisplayImageByAxis(): void;
90
- /**
91
- * Rewrite this {resetPaintAreaUIPosition} function under NrrdTools
92
- */
93
- resetPaintAreaUIPosition(l?: number, t?: number): void;
94
- /**
95
- * Rewrite this {resetPaintAreaUIPosition} function under NrrdTools
96
- */
97
- setEmptyCanvasSize(axis?: "x" | "y" | "z"): void;
98
- /**
99
- * Rewrite this {convertCursorPoint} function under NrrdTools
100
- */
101
- convertCursorPoint(from: "x" | "y" | "z", to: "x" | "y" | "z", cursorNumX: number, cursorNumY: number, currentSliceIndex: number): IConvertObjType | undefined;
102
- /**
103
- * Rewrite this {resetLayerCanvas} function under NrrdTools
104
- */
105
- resetLayerCanvas(): void;
106
- /**
107
- * Rewrite this {setSyncsliceNum} function under NrrdTools
108
- */
109
- setSyncsliceNum(): void;
110
- /**
111
- * Rewrite this {redrawDisplayCanvas} function under NrrdTools
112
- */
113
- redrawDisplayCanvas(): void;
114
- /**
115
- * Get a painted mask image based on current axis and input slice index.
116
- *
117
- * Phase 3: Reads directly from MaskVolume.
118
- *
119
- * @param axis "x" | "y" | "z"
120
- * @param sliceIndex number
121
- * @returns Object with index and image, or undefined
122
- */
123
- filterDrawedImage(axis: "x" | "y" | "z", sliceIndex: number): {
124
- index: number;
125
- image: ImageData;
126
- } | undefined;
127
- /**
128
- * Get or create a reusable ImageData buffer for the given axis.
129
- *
130
- * Reuses the same buffer across multiple slice renders to avoid
131
- * allocating a new ImageData per layer per slice switch.
132
- * The buffer is only reallocated when slice dimensions change (axis switch).
133
- *
134
- * @param axis - Axis: "x", "y", or "z"
135
- * @returns Reusable ImageData buffer with correct dimensions
136
- */
137
- getOrCreateSliceBuffer(axis: "x" | "y" | "z"): ImageData | null;
138
- /**
139
- * Render a layer's slice into a reusable buffer and draw to the target canvas.
140
- *
141
- * Uses MaskVolume.renderLabelSliceInto() for zero-allocation rendering.
142
- * The caller should obtain the buffer via getOrCreateSliceBuffer() and reuse
143
- * it across multiple layer renders.
144
- *
145
- * @param layer - Layer name: "layer1", "layer2", or "layer3"
146
- * @param axis - Axis: "x", "y", or "z"
147
- * @param sliceIndex - Slice index
148
- * @param buffer - Reusable ImageData buffer (from getOrCreateSliceBuffer)
149
- * @param targetCtx - Canvas context to draw the result onto
150
- * @param scaledWidth - Target display width
151
- * @param scaledHeight - Target display height
152
- */
153
- renderSliceToCanvas(layer: string, axis: "x" | "y" | "z", sliceIndex: number, buffer: ImageData, targetCtx: CanvasRenderingContext2D, scaledWidth: number, scaledHeight: number): void;
154
- /**
155
- * Invalidate the reusable buffer (e.g. when switching datasets).
156
- * The buffer will be lazily recreated on next use.
157
- */
158
- invalidateSliceBuffer(): void;
159
- /**
160
- * Apply the same flip transform used by flipDisplayImageByAxis() to any
161
- * canvas context. This ensures mask overlays align with the flipped CT image.
162
- *
163
- * The flip is its own inverse (applying twice = identity), so it works for
164
- * both directions: volume→display (rendering) and display→volume (storing).
165
- *
166
- * @param ctx Target 2D context (must be wrapped in save/restore by caller).
167
- * @param width Canvas width in pixels.
168
- * @param height Canvas height in pixels.
169
- * @param axis Current viewing axis.
170
- */
171
- applyMaskFlipForAxis(ctx: CanvasRenderingContext2D, width: number, height: number, axis: "x" | "y" | "z"): void;
172
- /**
173
- * Composite all layer canvases to the master display canvas.
174
- * Only draws layers whose visibility is enabled.
175
- */
176
- compositeAllLayers(): void;
177
- }