copper3d 3.11.4 → 3.11.6
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.
- package/README.md +51 -1
- package/ai-index/guides/4D-MRI-LV-rendering.md +1 -1
- package/ai-index/guides/copper3d-rendering-optimization.md +37 -0
- package/ai-index/guides/load-callbacks.md +35 -0
- package/ai-index/guides/nrrd-tools.md +110 -2
- package/ai-index/guides/segmentation-module.md +108 -2
- package/ai-index/manifest.json +8 -8
- package/ai-index/symbols.json +1 -1
- package/dist/Loader/copperNrrdLoader.d.ts +33 -0
- package/dist/Loader/copperNrrdLoader.js +27 -5
- package/dist/Loader/copperNrrdLoader.js.map +1 -1
- package/dist/Renderer/copperRenderer.js +2 -2
- package/dist/Renderer/copperRenderer.js.map +1 -1
- package/dist/Scene/copperScene.d.ts +1 -1
- package/dist/Scene/copperScene.js +4 -1
- package/dist/Scene/copperScene.js.map +1 -1
- package/dist/Utils/segmentation/DragOperator.d.ts +6 -0
- package/dist/Utils/segmentation/DragOperator.js +9 -0
- package/dist/Utils/segmentation/DragOperator.js.map +1 -1
- package/dist/Utils/segmentation/NrrdTools.d.ts +38 -1
- package/dist/Utils/segmentation/NrrdTools.js +105 -2
- package/dist/Utils/segmentation/NrrdTools.js.map +1 -1
- package/dist/Utils/segmentation/RenderingUtils.d.ts +7 -10
- package/dist/Utils/segmentation/RenderingUtils.js +14 -117
- package/dist/Utils/segmentation/RenderingUtils.js.map +1 -1
- package/dist/Utils/segmentation/contourPaint.d.ts +37 -0
- package/dist/Utils/segmentation/contourPaint.js +128 -0
- package/dist/Utils/segmentation/contourPaint.js.map +1 -0
- package/dist/Utils/segmentation/tools/DragSliceTool.js +5 -0
- package/dist/Utils/segmentation/tools/DragSliceTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/MaskMirror.d.ts +42 -0
- package/dist/Utils/segmentation/tools/MaskMirror.js +165 -0
- package/dist/Utils/segmentation/tools/MaskMirror.js.map +1 -0
- package/dist/Utils/segmentation/tools/SliceRenderPipeline.js +8 -0
- package/dist/Utils/segmentation/tools/SliceRenderPipeline.js.map +1 -1
- package/dist/Utils/segmentation/tools/ToolHost.d.ts +10 -2
- package/dist/bundle.esm.js +459 -122
- package/dist/bundle.umd.js +459 -121
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types/Loader/copperNrrdLoader.d.ts +33 -0
- package/dist/types/Scene/copperScene.d.ts +1 -1
- package/dist/types/Utils/segmentation/DragOperator.d.ts +6 -0
- package/dist/types/Utils/segmentation/NrrdTools.d.ts +38 -1
- package/dist/types/Utils/segmentation/RenderingUtils.d.ts +7 -10
- package/dist/types/Utils/segmentation/contourPaint.d.ts +37 -0
- package/dist/types/Utils/segmentation/tools/MaskMirror.d.ts +42 -0
- package/dist/types/Utils/segmentation/tools/ToolHost.d.ts +10 -2
- package/dist/types/index.d.ts +2 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { setCameraPose } from "./Controls/setCameraPose";
|
|
|
44
44
|
import type { PosableScene } from "./Controls/setCameraPose";
|
|
45
45
|
import { addVolumeBoundingBox, VOLUME_BOUNDS_NAME } from "./Loader/volumeBoundingBox";
|
|
46
46
|
import type { BoundingBoxHost, VolumeBoundingBoxOpts } from "./Loader/volumeBoundingBox";
|
|
47
|
-
import { DEFAULT_AXES, ensureAxisExtracted } from "./Loader/copperNrrdLoader";
|
|
47
|
+
import { DEFAULT_AXES, ensureAxisExtracted, prepareVolumeSlices } from "./Loader/copperNrrdLoader";
|
|
48
48
|
import type { NrrdAxis } from "./Loader/copperNrrdLoader";
|
|
49
49
|
import { easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle } from "./Controls/cameraTransitions";
|
|
50
50
|
import type { Pose } from "./Controls/cameraTransitions";
|
|
@@ -62,6 +62,6 @@ import { MAX_ENGINE_CHANNEL } from "./Utils/segmentation/core/index";
|
|
|
62
62
|
import type { AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult } from "./Utils/segmentation/tools/AiAssistTool";
|
|
63
63
|
import "./css/style.css";
|
|
64
64
|
export declare const REVISION: string;
|
|
65
|
-
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, loadKiwrious, NrrdTools, registerNiftiMaskGrid, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, MAX_ENGINE_CHANNEL, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, exposureExponent, DEFAULT_TARGET_GREY, disposeObject3D, disposeMaterial, collectFadeTargets, setFade, restoreFade, createSceneBudget, defaultBudgetBytes, disposeScene, removeSceneFromMap, fitDistance, fitView, isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomEnabled, setZoomEnabled, beginGesture, isGestureActive, setCameraPose, addVolumeBoundingBox, VOLUME_BOUNDS_NAME, DEFAULT_AXES, ensureAxisExtracted, copperGltfLoader, setDracoDecoderPath, setKTX2TranscoderPath, easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, installFastSliceRepaint, };
|
|
65
|
+
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, loadKiwrious, NrrdTools, registerNiftiMaskGrid, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, MAX_ENGINE_CHANNEL, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, exposureExponent, DEFAULT_TARGET_GREY, disposeObject3D, disposeMaterial, collectFadeTargets, setFade, restoreFade, createSceneBudget, defaultBudgetBytes, disposeScene, removeSceneFromMap, fitDistance, fitView, isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomEnabled, setZoomEnabled, beginGesture, isGestureActive, setCameraPose, addVolumeBoundingBox, VOLUME_BOUNDS_NAME, DEFAULT_AXES, ensureAxisExtracted, prepareVolumeSlices, copperGltfLoader, setDracoDecoderPath, setKTX2TranscoderPath, easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, installFastSliceRepaint, };
|
|
66
66
|
export type { positionType, screenPosType, optsType, NrrdHeaderLike, GltfLoadOpts, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, aligned4DSurfaceType, aligned4DOptsType, Aligned4DController, raw4DVolumeTransformType, raw4DVolumeOptsType, Raw4DVolumeController, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, NrrdState, GuiState, IGuiMeta, ToolMode, IAnnotationCallbacks, MaskRenderMode, LayerId, ChannelValue, AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult, SurfaceAnnotatorOptions, Annotation, AnnotationMode, ExportOptions, ExposureVolume, DisposableObject3D, DisposableMaterial, FadeTarget, FadeableMaterial, SceneBudget, DisposableScene, SceneDisposalHost, FitBounds, FitViewScene, AxisGatedControls, GestureAxes, PosableScene, BoundingBoxHost, VolumeBoundingBoxOpts, NrrdAxis, Pose, };
|
|
67
67
|
export type { CameraViewPreset } from "./Controls/orbitFraming";
|
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ import { isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomE
|
|
|
33
33
|
import { beginGesture, isGestureActive } from "./Controls/gestureGate";
|
|
34
34
|
import { setCameraPose } from "./Controls/setCameraPose";
|
|
35
35
|
import { addVolumeBoundingBox, VOLUME_BOUNDS_NAME, } from "./Loader/volumeBoundingBox";
|
|
36
|
-
import { DEFAULT_AXES, ensureAxisExtracted } from "./Loader/copperNrrdLoader";
|
|
36
|
+
import { DEFAULT_AXES, ensureAxisExtracted, prepareVolumeSlices } from "./Loader/copperNrrdLoader";
|
|
37
37
|
import { easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, } from "./Controls/cameraTransitions";
|
|
38
38
|
import { installFastSliceRepaint } from "./Loader/fastSliceRepaint";
|
|
39
39
|
import { SurfaceAnnotator } from "./Utils/surfaceAnnotation";
|
|
@@ -58,5 +58,5 @@ if (typeof window !== "undefined") {
|
|
|
58
58
|
if (typeof console !== "undefined") {
|
|
59
59
|
console.log(`%cCopper3D Visualisation %c${REVISION}`, "padding: 3px;color:white; background:#023047", "padding: 3px;color:white; background:#f50a25");
|
|
60
60
|
}
|
|
61
|
-
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, loadKiwrious, NrrdTools, registerNiftiMaskGrid, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, MAX_ENGINE_CHANNEL, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, exposureExponent, DEFAULT_TARGET_GREY, disposeObject3D, disposeMaterial, collectFadeTargets, setFade, restoreFade, createSceneBudget, defaultBudgetBytes, disposeScene, removeSceneFromMap, fitDistance, fitView, isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomEnabled, setZoomEnabled, beginGesture, isGestureActive, setCameraPose, addVolumeBoundingBox, VOLUME_BOUNDS_NAME, DEFAULT_AXES, ensureAxisExtracted, copperGltfLoader, setDracoDecoderPath, setKTX2TranscoderPath, easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, installFastSliceRepaint, };
|
|
61
|
+
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, loadKiwrious, NrrdTools, registerNiftiMaskGrid, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, MAX_ENGINE_CHANNEL, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, exposureExponent, DEFAULT_TARGET_GREY, disposeObject3D, disposeMaterial, collectFadeTargets, setFade, restoreFade, createSceneBudget, defaultBudgetBytes, disposeScene, removeSceneFromMap, fitDistance, fitView, isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomEnabled, setZoomEnabled, beginGesture, isGestureActive, setCameraPose, addVolumeBoundingBox, VOLUME_BOUNDS_NAME, DEFAULT_AXES, ensureAxisExtracted, prepareVolumeSlices, copperGltfLoader, setDracoDecoderPath, setKTX2TranscoderPath, easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, installFastSliceRepaint, };
|
|
62
62
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,uDAAuD;AAEvD,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EACL,eAAe,EAGf,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAY,MAAM,2BAA2B,CAAC;AACnE,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,GACtB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEzD,OAAO,EACL,mBAAmB,EACnB,YAAY,GACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,QAAQ,MAAM,iCAAiC,CAAC;AACvD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CA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AmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,eAAe,EACf,uBAAuB,GACxB,CAAC"}
|
|
@@ -106,6 +106,39 @@ export interface optsType {
|
|
|
106
106
|
*/
|
|
107
107
|
signal?: AbortSignal;
|
|
108
108
|
}
|
|
109
|
+
/**
|
|
110
|
+
* Post-extraction fixups every `VolumeSlice` needs. Run it on each slice right
|
|
111
|
+
* after `Volume.extractSlice`; `undefined` (an axis not extracted) is skipped.
|
|
112
|
+
*
|
|
113
|
+
* ## Readback-friendly buffer
|
|
114
|
+
*
|
|
115
|
+
* Stock `VolumeSlice.repaint` reads `ctxBuffer` back with `getImageData` on
|
|
116
|
+
* every repaint. three creates that context in the constructor without
|
|
117
|
+
* `willReadFrequently`, so the canvas may live on the GPU and each repaint
|
|
118
|
+
* copies it back to the CPU (Chrome warns once per such context). A context's
|
|
119
|
+
* attributes are fixed by the first `getContext` call on its canvas, so the
|
|
120
|
+
* buffer is replaced by a canvas whose context is created with the flag;
|
|
121
|
+
* `updateGeometry` re-fetching it later gets that same context.
|
|
122
|
+
*
|
|
123
|
+
* ## three.js regression (present from r175 through at least r185)
|
|
124
|
+
*
|
|
125
|
+
* `VolumeSlice`'s constructor calls `updateGeometry()` and then `repaint()`, but
|
|
126
|
+
* *afterwards* assigns the JSDoc default values:
|
|
127
|
+
*
|
|
128
|
+
* this.iLength = 0;
|
|
129
|
+
* this.jLength = 0;
|
|
130
|
+
* this.sliceAccess = null;
|
|
131
|
+
*
|
|
132
|
+
* which wipe the values `updateGeometry()` just computed. `repaint()` only
|
|
133
|
+
* recomputes them when `geometryNeedsUpdate` is true (i.e. after `index` was
|
|
134
|
+
* assigned), so any repaint that is not preceded by an index change calls
|
|
135
|
+
* `ctx.getImageData(0, 0, 0, 0)` and throws
|
|
136
|
+
* `IndexSizeError: The source width is 0`.
|
|
137
|
+
*
|
|
138
|
+
* Recomputing the geometry right after extraction restores the correct values.
|
|
139
|
+
* It is a harmless recompute on three <= r174, where the bug does not exist.
|
|
140
|
+
*/
|
|
141
|
+
export declare function prepareVolumeSlices(...slices: any[]): void;
|
|
109
142
|
/**
|
|
110
143
|
* Extracts a slice plane a narrower `axes` load skipped, the first time something asks for
|
|
111
144
|
* it (see `NrrdTools.setSliceOrientation`). Mutates `slices` (and `meshes`, if given) in
|
|
@@ -10,7 +10,7 @@ import { ICopperSceneOpts, aligned4DOptsType, Aligned4DController, raw4DVolumeOp
|
|
|
10
10
|
import { SurfaceAnnotator } from "../Utils/surfaceAnnotation";
|
|
11
11
|
import type { SurfaceAnnotatorOptions } from "../Utils/surfaceAnnotation";
|
|
12
12
|
export declare class copperScene extends baseScene {
|
|
13
|
-
clock: THREE.
|
|
13
|
+
clock: THREE.Timer;
|
|
14
14
|
controls: Copper3dTrackballControls | OrbitControls | TrackballControls;
|
|
15
15
|
private mixer;
|
|
16
16
|
private playRate;
|
|
@@ -20,6 +20,7 @@ export declare class DragOperator {
|
|
|
20
20
|
private renderSliceToCanvas;
|
|
21
21
|
private compositeAllLayers;
|
|
22
22
|
private refreshSphereOverlayCb;
|
|
23
|
+
private previewSliceMoveCb;
|
|
23
24
|
private eventRouter;
|
|
24
25
|
constructor(container: HTMLElement, nrrd_sates: NrrdState, gui_states: GuiState, protectedData: IProtected, drawingPrameters: IDrawingEvents, setSyncsliceNum: () => void, setIsDrawFalse: (target: number) => void, flipDisplayImageByAxis: () => void, setEmptyCanvasSize: (axis?: "x" | "y" | "z") => void, getOrCreateSliceBuffer: (axis: "x" | "y" | "z") => ImageData | null, renderSliceToCanvas: (layer: string, axis: "x" | "y" | "z", sliceIndex: number, buffer: ImageData, targetCtx: CanvasRenderingContext2D, scaledWidth: number, scaledHeight: number) => void, compositeAllLayers: () => void);
|
|
25
26
|
private init;
|
|
@@ -29,6 +30,11 @@ export declare class DragOperator {
|
|
|
29
30
|
* Called by NrrdTools after DrawToolCore is initialized.
|
|
30
31
|
*/
|
|
31
32
|
setRefreshSphereOverlay(cb: () => void): void;
|
|
33
|
+
/**
|
|
34
|
+
* Set the callback that may consume a slice move while a preview slice is shown.
|
|
35
|
+
* Called by NrrdTools; until then every move proceeds normally.
|
|
36
|
+
*/
|
|
37
|
+
setPreviewSliceMove(cb: (index: number) => boolean): void;
|
|
32
38
|
/**
|
|
33
39
|
* Set the EventRouter reference for centralized event handling.
|
|
34
40
|
* Called by NrrdTools/DrawToolCore after EventRouter is initialized.
|
|
@@ -5,6 +5,7 @@ import { DragOperator } from "./DragOperator";
|
|
|
5
5
|
import type { ChannelValue, RGBAColor, ChannelColorMap } from "./core";
|
|
6
6
|
import type { SphereType } from "./tools/SphereTool";
|
|
7
7
|
import type { AiPromptTool, AiPromptPayload, AiMaskResult } from "./tools/AiAssistTool";
|
|
8
|
+
import { type NrrdHeaderLike } from "./tools/DataLoader";
|
|
8
9
|
/**
|
|
9
10
|
* Core NRRD annotation tool for medical image segmentation.
|
|
10
11
|
*
|
|
@@ -37,7 +38,15 @@ export declare class NrrdTools {
|
|
|
37
38
|
private preTimer;
|
|
38
39
|
private guiParameterSettings;
|
|
39
40
|
private _sliceRAFId;
|
|
41
|
+
/** Viewers drawing this one's masks (see setMaskMirror). */
|
|
42
|
+
private _mirrors;
|
|
43
|
+
/** The viewer whose masks this one draws, if any. */
|
|
44
|
+
private _mirrorSource;
|
|
45
|
+
/** The pending frame that refreshes this viewer's mirrors. */
|
|
46
|
+
private _mirrorFrame;
|
|
40
47
|
private _pendingSliceStep;
|
|
48
|
+
/** Receives slice moves while a preview slice is shown; null when none is. */
|
|
49
|
+
private _previewSliceMove;
|
|
41
50
|
/** Whether calculator mode is active (not part of gui_states interface) */
|
|
42
51
|
private _calculatorActive;
|
|
43
52
|
/** Layer/channel management (extracted module) */
|
|
@@ -229,6 +238,22 @@ export declare class NrrdTools {
|
|
|
229
238
|
* Used for register/origin image switching where the view state should persist.
|
|
230
239
|
*/
|
|
231
240
|
switchSlicesPreservingView(allSlices: Array<nrrdSliceType>): void;
|
|
241
|
+
/**
|
|
242
|
+
* Show one slice of a volume before the volume itself has loaded: `header` is the full
|
|
243
|
+
* volume's geometry, `slice` a depth-1 slice triple of plane `index` (built from one plane's
|
|
244
|
+
* voxels), shown as slice `index` of the full stack. Geometry is re-initialised only when it
|
|
245
|
+
* differs from the current one. Replaces whatever slice data is displayed; writes no mask.
|
|
246
|
+
* The full volume later replaces it with `switchSlicesPreservingView`, keeping `index`.
|
|
247
|
+
*
|
|
248
|
+
* Until then every slice move (wheel, keys, drag, `setSliceMoving`) goes to `onSliceMove`
|
|
249
|
+
* with its clamped target index instead of moving the displayed slice. Axial only; it does
|
|
250
|
+
* not switch orientation.
|
|
251
|
+
*/
|
|
252
|
+
showPreviewSlice(header: NrrdHeaderLike, slice: nrrdSliceType, index: number, onSliceMove: (index: number) => void): void;
|
|
253
|
+
/** Whether a preview slice from `showPreviewSlice` is shown in place of a loaded volume. */
|
|
254
|
+
isPreviewing(): boolean;
|
|
255
|
+
/** Hands a slice move to the preview's host; false when no preview is shown. */
|
|
256
|
+
private previewSliceMove;
|
|
232
257
|
appendLoadingbar(loadingbar: HTMLDivElement): void;
|
|
233
258
|
getCurrentImageDimension(): number[];
|
|
234
259
|
getVoxelSpacing(): number[];
|
|
@@ -425,10 +450,22 @@ export declare class NrrdTools {
|
|
|
425
450
|
aiCommitToLayer(targetLayer?: string): void;
|
|
426
451
|
clearActiveLayer(): void;
|
|
427
452
|
reset(): void;
|
|
453
|
+
/**
|
|
454
|
+
* Draw `source`'s masks on this viewer, read live from it: its volumes, colours, channel and
|
|
455
|
+
* layer visibility, opacity and render mode. `mirrorToSource` is a row-major 4×4 from this
|
|
456
|
+
* viewer's voxel (x, y, z, 1) to the source's voxel; omitted means the identity. `null`
|
|
457
|
+
* detaches. Display only — nothing is written to either viewer's masks.
|
|
458
|
+
*/
|
|
459
|
+
setMaskMirror(source: NrrdTools | null, mirrorToSource?: ArrayLike<number>): void;
|
|
460
|
+
/** The viewer whose masks this one draws, or null. */
|
|
461
|
+
getMaskMirrorSource(): NrrdTools | null;
|
|
462
|
+
/** Repaint every mirror of this viewer on the next frame; repeated calls coalesce. */
|
|
463
|
+
private scheduleMirrorRefresh;
|
|
428
464
|
/**
|
|
429
465
|
* Releases what this instance holds outside its own DOM subtree, so a viewer that is torn
|
|
430
466
|
* down can be garbage-collected: the event router's listeners (its window `blur` listener
|
|
431
|
-
* reaches the whole engine graph), a pending slice step
|
|
467
|
+
* reaches the whole engine graph), a pending slice step, the drawing-flag timer and any
|
|
468
|
+
* mask-mirror link.
|
|
432
469
|
*
|
|
433
470
|
* The instance must not be used afterwards. Safe to call more than once.
|
|
434
471
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { INewMaskData } from "./core/types";
|
|
2
2
|
import type { MaskVolume } from "./core/index";
|
|
3
3
|
import type { CanvasState } from "./CanvasState";
|
|
4
|
+
import type { MaskMirror } from "./tools/MaskMirror";
|
|
4
5
|
/**
|
|
5
6
|
* RenderingUtils — Rendering / slice-buffer helper methods.
|
|
6
7
|
*
|
|
@@ -15,6 +16,10 @@ export declare class RenderingUtils {
|
|
|
15
16
|
private state;
|
|
16
17
|
/** Injected callback — set by owner after construction. */
|
|
17
18
|
setEmptyCanvasSize: (axis?: "x" | "y" | "z") => void;
|
|
19
|
+
/** Set while this viewer draws another viewer's masks; painted after this viewer's own layers. */
|
|
20
|
+
mirror: MaskMirror | null;
|
|
21
|
+
/** Called after every composite. The owner refreshes the viewers mirroring this one. */
|
|
22
|
+
onComposited: (() => void) | null;
|
|
18
23
|
private _reusableSliceBuffer;
|
|
19
24
|
private _reusableBufferWidth;
|
|
20
25
|
private _reusableBufferHeight;
|
|
@@ -46,7 +51,8 @@ export declare class RenderingUtils {
|
|
|
46
51
|
* Get MaskVolume for a specific layer
|
|
47
52
|
*
|
|
48
53
|
* @param layer - Layer name: "layer1", "layer2", or "layer3"
|
|
49
|
-
* @returns MaskVolume instance for the specified layer
|
|
54
|
+
* @returns MaskVolume instance for the specified layer; `undefined` on a
|
|
55
|
+
* read-only engine built with no layers, which has no volume to return
|
|
50
56
|
*/
|
|
51
57
|
getVolumeForLayer(layer: string): MaskVolume;
|
|
52
58
|
/**
|
|
@@ -73,15 +79,6 @@ export declare class RenderingUtils {
|
|
|
73
79
|
* allocating a new ImageData per layer per slice switch.
|
|
74
80
|
*/
|
|
75
81
|
getOrCreateSliceBuffer(axis: "x" | "y" | "z"): ImageData | null;
|
|
76
|
-
/**
|
|
77
|
-
* Populate one cache entry's paths for one render mode.
|
|
78
|
-
*
|
|
79
|
-
* Split out because the two modes are built at different times: whichever is in use when
|
|
80
|
-
* a slice is first drawn, and the other one only if the clinician switches while still on
|
|
81
|
-
* that slice. Building both eagerly would make every slice scrub pay for a mode most
|
|
82
|
-
* sessions never turn on.
|
|
83
|
-
*/
|
|
84
|
-
private buildPaths;
|
|
85
82
|
/**
|
|
86
83
|
* Render a layer's slice onto the target canvas as vector contours.
|
|
87
84
|
*
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { RGBAColor } from "./core/types";
|
|
2
|
+
/** One 2D slice of labels: `width × height` cells, `stride` bytes apart, the label at offset 0. */
|
|
3
|
+
export interface LabelSlice {
|
|
4
|
+
data: Uint8Array;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
stride: number;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Outline stroke width, in screen pixels.
|
|
11
|
+
*
|
|
12
|
+
* Screen pixels rather than voxels so magnifying the image does not thicken the line over the
|
|
13
|
+
* boundary the clinician magnified it to see. Thin enough to sit on an edge, thick enough to
|
|
14
|
+
* stay visible against bright tissue.
|
|
15
|
+
*/
|
|
16
|
+
export declare const OUTLINE_WIDTH_PX = 1.5;
|
|
17
|
+
/**
|
|
18
|
+
* One slice's contours, in voxel coordinates. Fill and outline paths are built lazily and side
|
|
19
|
+
* by side, so switching mode costs one extraction the first time and is a cache hit after.
|
|
20
|
+
*/
|
|
21
|
+
export interface ContourEntry {
|
|
22
|
+
key: string;
|
|
23
|
+
W: number;
|
|
24
|
+
H: number;
|
|
25
|
+
labels: number[];
|
|
26
|
+
/** Silhouettes, to fill. Built on first use of fill mode for this slice. */
|
|
27
|
+
fills: Map<number, Path2D>;
|
|
28
|
+
/** Boundaries, to stroke. Built on first use of outline mode for this slice. */
|
|
29
|
+
outlines: Map<number, Path2D>;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The cached contours for `slot` under `key`, extracting on a miss. One entry per slot: a new
|
|
33
|
+
* key overwrites it. `readSlice` is called only when extraction is needed.
|
|
34
|
+
*/
|
|
35
|
+
export declare function contourEntry(cache: Map<string, ContourEntry>, slot: string, key: string, readSlice: () => LabelSlice, outline: boolean): ContourEntry;
|
|
36
|
+
/** Paint an entry's visible labels onto `targetCtx`, scaled from voxels to `scaledWidth × scaledHeight`. */
|
|
37
|
+
export declare function paintContours(entry: ContourEntry, targetCtx: CanvasRenderingContext2D, axis: "x" | "y" | "z", scaledWidth: number, scaledHeight: number, outline: boolean, colorOf: (label: number) => RGBAColor, channelVis?: Record<number, boolean>): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drawing another viewer's masks, read live through a voxel-to-voxel transform.
|
|
3
|
+
*
|
|
4
|
+
* The transform is a row-major 4×4 from this viewer's voxel (x, y, z, 1) to the source's
|
|
5
|
+
* voxel. Slices are built in `MaskVolume.getSliceUint8`'s layout for this viewer's own grid,
|
|
6
|
+
* so the source's paint code draws them unchanged, flips included.
|
|
7
|
+
*/
|
|
8
|
+
import type { MaskVolume } from "../core/index";
|
|
9
|
+
import type { CanvasState } from "../CanvasState";
|
|
10
|
+
import { type LabelSlice } from "../contourPaint";
|
|
11
|
+
export type Axis = "x" | "y" | "z";
|
|
12
|
+
/** A slice's width and height for `axis`, as `getSliceUint8` lays it out. */
|
|
13
|
+
export declare function sliceDims(dims: ArrayLike<number>, axis: Axis): [number, number];
|
|
14
|
+
/** Whether `m` is the identity within `tol`. No matrix counts as the identity. */
|
|
15
|
+
export declare function isIdentity(m: ArrayLike<number> | null | undefined, tol?: number): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The source's labels on this viewer's slice `index` along `axis`. A cell mapping outside
|
|
18
|
+
* the source is 0. On the same grid with the identity, it is the source's own slice.
|
|
19
|
+
*
|
|
20
|
+
* With a diagonal transform (the axes agree, only scale and offset differ), a mirror voxel
|
|
21
|
+
* coarser than the source shows the first label found among every source voxel it spans, so
|
|
22
|
+
* a finding thinner than the mirror's slice still appears on the slice that contains it.
|
|
23
|
+
* Any other transform samples the nearest source voxel.
|
|
24
|
+
*/
|
|
25
|
+
export declare function mirrorSliceLabels(source: MaskVolume, mirrorDims: ArrayLike<number>, axis: Axis, index: number, m: ArrayLike<number> | null): LabelSlice;
|
|
26
|
+
/**
|
|
27
|
+
* One viewer drawing another's masks. Holds no mask data: every paint reads the source's
|
|
28
|
+
* volumes and display state. A new transform means a new instance, so the cache never holds
|
|
29
|
+
* contours from another transform.
|
|
30
|
+
*/
|
|
31
|
+
export declare class MaskMirror {
|
|
32
|
+
private readonly self;
|
|
33
|
+
readonly source: CanvasState;
|
|
34
|
+
private readonly matrix;
|
|
35
|
+
/** One contour entry per source layer, for the slice last painted. */
|
|
36
|
+
private cache;
|
|
37
|
+
/** The source volume each cache entry was built from; a case load replaces the object. */
|
|
38
|
+
private cachedVolumes;
|
|
39
|
+
constructor(self: CanvasState, source: CanvasState, matrix: ArrayLike<number> | null);
|
|
40
|
+
/** Paint every visible source layer onto `ctx` for this viewer's current axis and slice. */
|
|
41
|
+
paint(ctx: CanvasRenderingContext2D, width: number, height: number): void;
|
|
42
|
+
}
|
|
@@ -17,6 +17,8 @@ export interface ToolHost {
|
|
|
17
17
|
setEmptyCanvasSize(axis?: "x" | "y" | "z"): void;
|
|
18
18
|
drawImageOnEmptyImage(canvas: HTMLCanvasElement): void;
|
|
19
19
|
compositeAllLayers(): void;
|
|
20
|
+
/** Whether this viewer draws another viewer's masks instead of its own layers. */
|
|
21
|
+
hasMaskMirror(): boolean;
|
|
20
22
|
renderSliceToCanvas(layer: string, axis: "x" | "y" | "z", sliceIndex: number, buffer: ImageData, targetCtx: CanvasRenderingContext2D, scaledWidth: number, scaledHeight: number): void;
|
|
21
23
|
/**
|
|
22
24
|
* Render a layer's slice filled, whatever the display mode is. For tools that follow a
|
|
@@ -40,6 +42,12 @@ export interface ToolHost {
|
|
|
40
42
|
getVolumeForLayer(layer: string): MaskVolume;
|
|
41
43
|
setIsDrawFalse(target: number): void;
|
|
42
44
|
setSyncsliceNum(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Offers a slice move to the host while a preview slice is shown (see
|
|
47
|
+
* `NrrdTools.showPreviewSlice`). Returns true when the move was consumed, in which
|
|
48
|
+
* case the caller must not move the displayed slice itself.
|
|
49
|
+
*/
|
|
50
|
+
previewSliceMove(index: number): boolean;
|
|
43
51
|
resetPaintAreaUIPosition(l?: number, t?: number): void;
|
|
44
52
|
resizePaintArea(moveDistance: number): void;
|
|
45
53
|
resetZoom(): void;
|
|
@@ -80,11 +88,11 @@ export type SphereHostDeps = Pick<ToolHost, 'setEmptyCanvasSize' | 'drawImageOnE
|
|
|
80
88
|
/** DrawingTool host dependencies */
|
|
81
89
|
export type DrawingHostDeps = Pick<ToolHost, 'setCurrentLayer' | 'compositeAllLayers' | 'syncLayerSliceData' | 'filterDrawedImage' | 'getVolumeForLayer' | 'pushUndoDelta' | 'renderSliceToCanvas' | 'renderSliceForBake' | 'getOrCreateSliceBuffer'>;
|
|
82
90
|
/** DragSliceTool host dependencies */
|
|
83
|
-
export type DragSliceHostDeps = Pick<ToolHost, 'setSyncsliceNum' | 'setIsDrawFalse' | 'flipDisplayImageByAxis' | 'setEmptyCanvasSize' | 'getOrCreateSliceBuffer' | 'renderSliceToCanvas' | 'refreshSphereOverlay' | 'compositeAllLayers'>;
|
|
91
|
+
export type DragSliceHostDeps = Pick<ToolHost, 'setSyncsliceNum' | 'setIsDrawFalse' | 'flipDisplayImageByAxis' | 'setEmptyCanvasSize' | 'getOrCreateSliceBuffer' | 'renderSliceToCanvas' | 'refreshSphereOverlay' | 'compositeAllLayers' | 'previewSliceMove'>;
|
|
84
92
|
/** LayerChannelManager host dependencies */
|
|
85
93
|
export type LayerChannelHostDeps = Pick<ToolHost, 'reloadMasksFromVolume' | 'getVolumeForLayer' | 'onChannelColorChanged'>;
|
|
86
94
|
/** SliceRenderPipeline host dependencies */
|
|
87
|
-
export type SliceRenderHostDeps = Pick<ToolHost, 'compositeAllLayers' | 'getOrCreateSliceBuffer' | 'renderSliceToCanvas' | 'getVolumeForLayer' | 'refreshSphereOverlay' | 'syncGuiParameterSettings' | 'repraintCurrentContrastSlice' | 'clearUndoHistory' | 'updateShowNumDiv' | 'updateCurrentContrastSlice'>;
|
|
95
|
+
export type SliceRenderHostDeps = Pick<ToolHost, 'compositeAllLayers' | 'hasMaskMirror' | 'getOrCreateSliceBuffer' | 'renderSliceToCanvas' | 'getVolumeForLayer' | 'refreshSphereOverlay' | 'syncGuiParameterSettings' | 'repraintCurrentContrastSlice' | 'clearUndoHistory' | 'updateShowNumDiv' | 'updateCurrentContrastSlice'>;
|
|
88
96
|
/** DataLoader host dependencies */
|
|
89
97
|
export type DataLoaderHostDeps = Pick<ToolHost, 'invalidateSliceBuffer' | 'setDisplaySlicesBaseOnAxis' | 'afterLoadSlice' | 'setEmptyCanvasSize' | 'syncLayerSliceData' | 'reloadMasksFromVolume' | 'resetZoom' | 'notifyUser'>;
|
|
90
98
|
/** SphereBrushTool host dependencies */
|
package/dist/types/index.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ import { setCameraPose } from "./Controls/setCameraPose";
|
|
|
44
44
|
import type { PosableScene } from "./Controls/setCameraPose";
|
|
45
45
|
import { addVolumeBoundingBox, VOLUME_BOUNDS_NAME } from "./Loader/volumeBoundingBox";
|
|
46
46
|
import type { BoundingBoxHost, VolumeBoundingBoxOpts } from "./Loader/volumeBoundingBox";
|
|
47
|
-
import { DEFAULT_AXES, ensureAxisExtracted } from "./Loader/copperNrrdLoader";
|
|
47
|
+
import { DEFAULT_AXES, ensureAxisExtracted, prepareVolumeSlices } from "./Loader/copperNrrdLoader";
|
|
48
48
|
import type { NrrdAxis } from "./Loader/copperNrrdLoader";
|
|
49
49
|
import { easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle } from "./Controls/cameraTransitions";
|
|
50
50
|
import type { Pose } from "./Controls/cameraTransitions";
|
|
@@ -62,6 +62,6 @@ import { MAX_ENGINE_CHANNEL } from "./Utils/segmentation/core/index";
|
|
|
62
62
|
import type { AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult } from "./Utils/segmentation/tools/AiAssistTool";
|
|
63
63
|
import "./css/style.css";
|
|
64
64
|
export declare const REVISION: string;
|
|
65
|
-
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, loadKiwrious, NrrdTools, registerNiftiMaskGrid, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, MAX_ENGINE_CHANNEL, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, exposureExponent, DEFAULT_TARGET_GREY, disposeObject3D, disposeMaterial, collectFadeTargets, setFade, restoreFade, createSceneBudget, defaultBudgetBytes, disposeScene, removeSceneFromMap, fitDistance, fitView, isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomEnabled, setZoomEnabled, beginGesture, isGestureActive, setCameraPose, addVolumeBoundingBox, VOLUME_BOUNDS_NAME, DEFAULT_AXES, ensureAxisExtracted, copperGltfLoader, setDracoDecoderPath, setKTX2TranscoderPath, easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, installFastSliceRepaint, };
|
|
65
|
+
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, loadKiwrious, NrrdTools, registerNiftiMaskGrid, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, MAX_ENGINE_CHANNEL, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, exposureExponent, DEFAULT_TARGET_GREY, disposeObject3D, disposeMaterial, collectFadeTargets, setFade, restoreFade, createSceneBudget, defaultBudgetBytes, disposeScene, removeSceneFromMap, fitDistance, fitView, isRotateEnabled, setRotateEnabled, isPanEnabled, setPanEnabled, isZoomEnabled, setZoomEnabled, beginGesture, isGestureActive, setCameraPose, addVolumeBoundingBox, VOLUME_BOUNDS_NAME, DEFAULT_AXES, ensureAxisExtracted, prepareVolumeSlices, copperGltfLoader, setDracoDecoderPath, setKTX2TranscoderPath, easeInOutCubic, viewPointToPose, rotateAroundAxis, interpolateFlightPose, poseDistance, orbitStepPose, zoomPose, orbitSwingAngle, installFastSliceRepaint, };
|
|
66
66
|
export type { positionType, screenPosType, optsType, NrrdHeaderLike, GltfLoadOpts, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, aligned4DSurfaceType, aligned4DOptsType, Aligned4DController, raw4DVolumeTransformType, raw4DVolumeOptsType, Raw4DVolumeController, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, NrrdState, GuiState, IGuiMeta, ToolMode, IAnnotationCallbacks, MaskRenderMode, LayerId, ChannelValue, AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult, SurfaceAnnotatorOptions, Annotation, AnnotationMode, ExportOptions, ExposureVolume, DisposableObject3D, DisposableMaterial, FadeTarget, FadeableMaterial, SceneBudget, DisposableScene, SceneDisposalHost, FitBounds, FitViewScene, AxisGatedControls, GestureAxes, PosableScene, BoundingBoxHost, VolumeBoundingBoxOpts, NrrdAxis, Pose, };
|
|
67
67
|
export type { CameraViewPreset } from "./Controls/orbitFraming";
|
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.11.
|
|
4
|
+
"version": "3.11.6",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"moudle": "dist/bundle.esm.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|