copper3d 3.1.1 → 3.2.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.
- package/dist/Controls/copperControls.js +3 -1
- package/dist/Controls/copperControls.js.map +1 -1
- package/dist/Scene/baseScene.js +1 -0
- package/dist/Scene/baseScene.js.map +1 -1
- package/dist/Scene/copperMScene.js +4 -0
- package/dist/Scene/copperMScene.js.map +1 -1
- package/dist/Scene/copperScene.d.ts +1 -0
- package/dist/Scene/copperScene.js +16 -0
- package/dist/Scene/copperScene.js.map +1 -1
- package/dist/Utils/segmentation/DragOperator.js +3 -1
- package/dist/Utils/segmentation/DragOperator.js.map +1 -1
- package/dist/Utils/segmentation/DrawToolCore.d.ts +6 -0
- package/dist/Utils/segmentation/DrawToolCore.js +107 -35
- package/dist/Utils/segmentation/DrawToolCore.js.map +1 -1
- package/dist/Utils/segmentation/NrrdTools.d.ts +2 -0
- package/dist/Utils/segmentation/NrrdTools.js +41 -1
- package/dist/Utils/segmentation/NrrdTools.js.map +1 -1
- package/dist/Utils/segmentation/core/UndoManager.d.ts +9 -5
- package/dist/Utils/segmentation/core/UndoManager.js +21 -14
- package/dist/Utils/segmentation/core/UndoManager.js.map +1 -1
- package/dist/Utils/segmentation/core/index.d.ts +1 -1
- package/dist/Utils/segmentation/core/types.d.ts +5 -1
- package/dist/Utils/segmentation/core/types.js.map +1 -1
- package/dist/Utils/segmentation/coreTools/GuiState.js +2 -0
- package/dist/Utils/segmentation/coreTools/GuiState.js.map +1 -1
- package/dist/Utils/segmentation/coreTools/NrrdState.js +2 -0
- package/dist/Utils/segmentation/coreTools/NrrdState.js.map +1 -1
- package/dist/Utils/segmentation/eventRouter/EventRouter.js +1 -0
- package/dist/Utils/segmentation/eventRouter/EventRouter.js.map +1 -1
- package/dist/Utils/segmentation/eventRouter/types.d.ts +1 -1
- package/dist/Utils/segmentation/tools/SphereBrushTool.d.ts +127 -0
- package/dist/Utils/segmentation/tools/SphereBrushTool.js +489 -0
- package/dist/Utils/segmentation/tools/SphereBrushTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/ToolHost.d.ts +3 -0
- package/dist/Utils/segmentation/tools/ZoomTool.js +6 -1
- package/dist/Utils/segmentation/tools/ZoomTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/index.d.ts +2 -1
- package/dist/Utils/segmentation/tools/index.js +1 -0
- package/dist/Utils/segmentation/tools/index.js.map +1 -1
- package/dist/bundle.esm.js +694 -54
- package/dist/bundle.umd.js +694 -54
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types/Scene/copperScene.d.ts +1 -0
- package/dist/types/Utils/segmentation/DrawToolCore.d.ts +6 -0
- package/dist/types/Utils/segmentation/NrrdTools.d.ts +2 -0
- package/dist/types/Utils/segmentation/core/UndoManager.d.ts +9 -5
- package/dist/types/Utils/segmentation/core/index.d.ts +1 -1
- package/dist/types/Utils/segmentation/core/types.d.ts +5 -1
- package/dist/types/Utils/segmentation/eventRouter/types.d.ts +1 -1
- package/dist/types/Utils/segmentation/tools/SphereBrushTool.d.ts +127 -0
- package/dist/types/Utils/segmentation/tools/ToolHost.d.ts +3 -0
- package/dist/types/Utils/segmentation/tools/index.d.ts +2 -1
- package/dist/types/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -24,6 +24,6 @@ import type { ToolMode, IAnnotationCallbacks } from "./Utils/segmentation/core/t
|
|
|
24
24
|
import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss } from "./Utils/segmentation/core/index";
|
|
25
25
|
import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
|
|
26
26
|
import "./css/style.css";
|
|
27
|
-
export declare const REVISION = "v3.
|
|
27
|
+
export declare const REVISION = "v3.2.0-beta";
|
|
28
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, };
|
|
29
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/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import { MeshNodeTool } from "./Utils/MeshNodeTool";
|
|
|
20
20
|
import { removeGuiFolderChilden } from "./Utils/segmentation/coreTools/gui";
|
|
21
21
|
import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss } from "./Utils/segmentation/core/index";
|
|
22
22
|
import "./css/style.css";
|
|
23
|
-
export const REVISION = "v3.
|
|
23
|
+
export const REVISION = "v3.2.0-beta";
|
|
24
24
|
console.log(`%cCopper3D Visualisation %cBeta:${REVISION}`, "padding: 3px;color:white; background:#023047", "padding: 3px;color:white; background:#f50a25");
|
|
25
25
|
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
26
|
//# sourceMappingURL=index.js.map
|
|
@@ -10,6 +10,7 @@ import { EraserTool } from "./tools/EraserTool";
|
|
|
10
10
|
import { PanTool } from "./tools/PanTool";
|
|
11
11
|
import { DrawingTool } from "./tools/DrawingTool";
|
|
12
12
|
import { ImageStoreHelper } from "./tools/ImageStoreHelper";
|
|
13
|
+
import { SphereBrushTool } from "./tools/SphereBrushTool";
|
|
13
14
|
import { UndoManager } from "./core";
|
|
14
15
|
/**
|
|
15
16
|
* DrawToolCore — Tool orchestration and event routing.
|
|
@@ -41,6 +42,7 @@ export declare class DrawToolCore {
|
|
|
41
42
|
protected panTool: PanTool;
|
|
42
43
|
protected drawingTool: DrawingTool;
|
|
43
44
|
protected imageStoreHelper: ImageStoreHelper;
|
|
45
|
+
protected sphereBrushTool: SphereBrushTool;
|
|
44
46
|
/** Slice index recorded when paintOnCanvas() starts, guards stale-click */
|
|
45
47
|
private paintSliceIndex;
|
|
46
48
|
/** Wheel event dispatch mode — replaces manual wheel add/remove (Phase 2) */
|
|
@@ -131,4 +133,8 @@ export declare class DrawToolCore {
|
|
|
131
133
|
enterSphereMode(): void;
|
|
132
134
|
/** Override in NrrdTools */
|
|
133
135
|
exitSphereMode(): void;
|
|
136
|
+
/** Override in NrrdTools */
|
|
137
|
+
reloadMasksFromVolume(): void;
|
|
138
|
+
/** Override in NrrdTools */
|
|
139
|
+
updateMouseWheelEvent(): void;
|
|
134
140
|
}
|
|
@@ -79,6 +79,8 @@ export declare class NrrdTools {
|
|
|
79
79
|
getOpacity(): number;
|
|
80
80
|
setBrushSize(size: number): void;
|
|
81
81
|
getBrushSize(): number;
|
|
82
|
+
setSphereBrushRadius(radius: number): void;
|
|
83
|
+
getSphereBrushRadius(): number;
|
|
82
84
|
setWindowHigh(value: number): void;
|
|
83
85
|
setWindowLow(value: number): void;
|
|
84
86
|
finishWindowAdjustment(): void;
|
|
@@ -19,6 +19,8 @@ export interface MaskDelta {
|
|
|
19
19
|
/** Full slice data captured after the drawing operation. */
|
|
20
20
|
newSlice: Uint8Array;
|
|
21
21
|
}
|
|
22
|
+
/** A single delta or a group of deltas treated as one undo unit. */
|
|
23
|
+
export type UndoEntry = MaskDelta[];
|
|
22
24
|
export declare class UndoManager {
|
|
23
25
|
private undoStacks;
|
|
24
26
|
private redoStacks;
|
|
@@ -26,18 +28,20 @@ export declare class UndoManager {
|
|
|
26
28
|
constructor();
|
|
27
29
|
/** Set the currently active layer (determines which stack undo/redo operates on). */
|
|
28
30
|
setActiveLayer(layer: string): void;
|
|
29
|
-
/** Push a delta onto the active layer's undo stack and clear the redo stack. */
|
|
31
|
+
/** Push a single delta onto the active layer's undo stack and clear the redo stack. */
|
|
30
32
|
push(delta: MaskDelta): void;
|
|
33
|
+
/** Push a group of deltas as a single undo unit (e.g. 3D sphere spanning multiple slices). */
|
|
34
|
+
pushGroup(deltas: MaskDelta[]): void;
|
|
31
35
|
/**
|
|
32
36
|
* Undo the last operation on the active layer.
|
|
33
|
-
* @returns The delta that
|
|
37
|
+
* @returns The delta(s) that were undone, or undefined if nothing to undo.
|
|
34
38
|
*/
|
|
35
|
-
undo():
|
|
39
|
+
undo(): UndoEntry | undefined;
|
|
36
40
|
/**
|
|
37
41
|
* Redo the last undone operation on the active layer.
|
|
38
|
-
* @returns The delta that
|
|
42
|
+
* @returns The delta(s) that were redone, or undefined if nothing to redo.
|
|
39
43
|
*/
|
|
40
|
-
redo():
|
|
44
|
+
redo(): UndoEntry | undefined;
|
|
41
45
|
canUndo(): boolean;
|
|
42
46
|
canRedo(): boolean;
|
|
43
47
|
/** Clear undo and redo stacks for a specific layer (called on clearActiveLayer). */
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
export type { Dimensions, RGBAColor, ChannelColorMap, SliceRenderOptions, LayerId, ChannelValue, ICommXYZ, ICommXY, ISkipSlicesDictType, ToolMode, IDragPrameters, IDrawingEvents, IContrastEvents, IPaintImages, IPaintImage, ILayerRenderTarget, IDownloadImageConfig, INewMaskData, IMaskData, IProtected, IToolModeState, IDrawingConfig, IViewConfig, ILayerChannelState, IGUIStates, IGuiMeta, IGuiParameterSettings, IImageMetadata, IViewState, IInteractionState, ISphereState, IInternalFlags, INrrdStates, IAnnotationCallbacks, IConvertObjType, ICursorPage, IDragOpts, IDrawOpts, IKeyBoardSettings, } from './types';
|
|
71
71
|
export { RenderMode, MASK_CHANNEL_COLORS, MASK_CHANNEL_CSS_COLORS, CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, } from './types';
|
|
72
72
|
export { MaskVolume } from './MaskVolume';
|
|
73
|
-
export type { MaskDelta } from './UndoManager';
|
|
73
|
+
export type { MaskDelta, UndoEntry } from './UndoManager';
|
|
74
74
|
export { UndoManager } from './UndoManager';
|
|
@@ -118,7 +118,7 @@ export interface ISkipSlicesDictType {
|
|
|
118
118
|
[key: string]: any;
|
|
119
119
|
}
|
|
120
120
|
/** Tool mode types for segmentation tools */
|
|
121
|
-
export type ToolMode = "pencil" | "brush" | "eraser" | "sphere" | "calculator";
|
|
121
|
+
export type ToolMode = "pencil" | "brush" | "eraser" | "sphere" | "calculator" | "sphereBrush" | "sphereEraser";
|
|
122
122
|
export interface IDragPrameters {
|
|
123
123
|
move: number;
|
|
124
124
|
y: number;
|
|
@@ -137,6 +137,7 @@ export interface IDrawingEvents {
|
|
|
137
137
|
handleOnDrawingBrushCricleMove: (ev: MouseEvent) => void;
|
|
138
138
|
handleMouseZoomSliceWheel: (e: WheelEvent) => void;
|
|
139
139
|
handleSphereWheel: (e: WheelEvent) => void;
|
|
140
|
+
handleSphereBrushWheel: (e: WheelEvent) => void;
|
|
140
141
|
}
|
|
141
142
|
export interface IContrastEvents {
|
|
142
143
|
move_x: number;
|
|
@@ -223,6 +224,8 @@ export interface IToolModeState {
|
|
|
223
224
|
pencil: boolean;
|
|
224
225
|
eraser: boolean;
|
|
225
226
|
sphere: boolean;
|
|
227
|
+
sphereBrush: boolean;
|
|
228
|
+
sphereEraser: boolean;
|
|
226
229
|
activeSphereType: "tumour" | "skin" | "nipple" | "ribcage";
|
|
227
230
|
}
|
|
228
231
|
/** Drawing configuration — brush/pencil appearance and behavior */
|
|
@@ -422,6 +425,7 @@ export interface ISphereState {
|
|
|
422
425
|
/** Dedicated MaskVolume for SphereTool 3D sphere data. Type is `any` to avoid circular deps. */
|
|
423
426
|
sphereMaskVolume: any;
|
|
424
427
|
sphereRadius: number;
|
|
428
|
+
sphereBrushRadius: number;
|
|
425
429
|
}
|
|
426
430
|
/** Internal flags — transient operational flags */
|
|
427
431
|
export interface IInternalFlags {
|
|
@@ -18,7 +18,7 @@ export type InteractionMode = 'idle' | 'draw' | 'drag' | 'contrast' | 'crosshair
|
|
|
18
18
|
/**
|
|
19
19
|
* GUI tool selection (set from UI buttons)
|
|
20
20
|
*/
|
|
21
|
-
export type GuiTool = 'pencil' | 'brush' | 'eraser' | 'sphere';
|
|
21
|
+
export type GuiTool = 'pencil' | 'brush' | 'eraser' | 'sphere' | 'sphereBrush' | 'sphereEraser';
|
|
22
22
|
/**
|
|
23
23
|
* Keyboard event handler type
|
|
24
24
|
*/
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SphereBrushTool — 3D sphere brush and eraser on layer MaskVolume.
|
|
3
|
+
*
|
|
4
|
+
* Unlike SphereTool (which uses its own isolated sphereMaskVolume),
|
|
5
|
+
* this tool writes/erases directly in the active layer's shared MaskVolume —
|
|
6
|
+
* the same volume used by pencil/brush/eraser tools.
|
|
7
|
+
*
|
|
8
|
+
* Two operation modes handled by one class:
|
|
9
|
+
* - **sphereBrush**: Direct click to paint a 3D sphere of the active channel label.
|
|
10
|
+
* - **sphereEraser**: Shift+click to erase a 3D sphere (only voxels matching active channel).
|
|
11
|
+
*
|
|
12
|
+
* Interaction:
|
|
13
|
+
* 1. Pointer-down records sphere center, switches wheel to radius mode.
|
|
14
|
+
* 2. Scroll wheel adjusts sphereBrushRadius [1, 50].
|
|
15
|
+
* 3. Pointer-up writes/erases sphere to volume, captures grouped undo, refreshes canvas.
|
|
16
|
+
*/
|
|
17
|
+
import { BaseTool } from "./BaseTool";
|
|
18
|
+
import type { ToolContext } from "./BaseTool";
|
|
19
|
+
import type { SphereBrushHostDeps } from "./ToolHost";
|
|
20
|
+
export declare class SphereBrushTool extends BaseTool {
|
|
21
|
+
private callbacks;
|
|
22
|
+
/** Recorded sphere center in canvas mm-space */
|
|
23
|
+
private centerX;
|
|
24
|
+
private centerY;
|
|
25
|
+
private centerSlice;
|
|
26
|
+
/** Whether a sphere placement is in progress */
|
|
27
|
+
private active;
|
|
28
|
+
/** Current operation mode for the active placement */
|
|
29
|
+
private mode;
|
|
30
|
+
/** Cumulative "before" snapshots for drag-erase undo (z-index → slice data) */
|
|
31
|
+
private dragBeforeSnapshots;
|
|
32
|
+
/** Whether a drag-erase has actually moved (vs. simple click-release) */
|
|
33
|
+
private dragMoved;
|
|
34
|
+
constructor(ctx: ToolContext, callbacks: SphereBrushHostDeps);
|
|
35
|
+
setCallbacks(callbacks: SphereBrushHostDeps): void;
|
|
36
|
+
/**
|
|
37
|
+
* Convert canvas mm-space coordinates to 3D voxel coordinates.
|
|
38
|
+
*/
|
|
39
|
+
private canvasToVoxelCenter;
|
|
40
|
+
/**
|
|
41
|
+
* Convert mm radius to per-axis voxel radii.
|
|
42
|
+
*/
|
|
43
|
+
private getVoxelRadii;
|
|
44
|
+
/**
|
|
45
|
+
* Compute clamped bounding box for an ellipsoid in voxel space.
|
|
46
|
+
*/
|
|
47
|
+
private getBoundingBox;
|
|
48
|
+
/**
|
|
49
|
+
* Write a 3D sphere of the active channel label into the layer's MaskVolume.
|
|
50
|
+
*/
|
|
51
|
+
private write3DSphereToBrush;
|
|
52
|
+
/**
|
|
53
|
+
* Erase a 3D sphere from the layer's MaskVolume.
|
|
54
|
+
* Only clears voxels whose current value equals the active channel label.
|
|
55
|
+
*/
|
|
56
|
+
private erase3DSphereFromVolume;
|
|
57
|
+
/**
|
|
58
|
+
* Capture slice snapshots for all Z-slices in the bounding box.
|
|
59
|
+
* Used before and after the sphere operation to build MaskDelta groups.
|
|
60
|
+
*
|
|
61
|
+
* We always capture along the Z axis since the 3D sphere spans Z slices.
|
|
62
|
+
*/
|
|
63
|
+
private captureSliceSnapshots;
|
|
64
|
+
/**
|
|
65
|
+
* Build MaskDelta group from before/after snapshots.
|
|
66
|
+
*/
|
|
67
|
+
private buildUndoGroup;
|
|
68
|
+
/**
|
|
69
|
+
* Draw a preview circle on the sphere canvas during sphere placement.
|
|
70
|
+
*/
|
|
71
|
+
drawPreview(mouseX: number, mouseY: number, radius: number, isEraser: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* Clear the sphere preview canvas.
|
|
74
|
+
*/
|
|
75
|
+
clearPreview(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Get the hex color for the active channel from the layer's MaskVolume.
|
|
78
|
+
*/
|
|
79
|
+
private getActiveChannelColor;
|
|
80
|
+
/**
|
|
81
|
+
* Returns a wheel event handler for adjusting sphereBrushRadius.
|
|
82
|
+
* Used in both sphereBrush and sphereEraser modes.
|
|
83
|
+
*/
|
|
84
|
+
configSphereBrushWheel(): (e: WheelEvent) => void;
|
|
85
|
+
/**
|
|
86
|
+
* Handle pointer-down in sphereBrush mode (direct click, no Shift needed).
|
|
87
|
+
*/
|
|
88
|
+
onSphereBrushClick(e: MouseEvent): void;
|
|
89
|
+
/**
|
|
90
|
+
* Handle pointer-up in sphereBrush mode — write sphere to volume.
|
|
91
|
+
*/
|
|
92
|
+
onSphereBrushPointerUp(): void;
|
|
93
|
+
/**
|
|
94
|
+
* Handle pointer-down in sphereEraser mode.
|
|
95
|
+
* Initializes drag tracking for cumulative undo.
|
|
96
|
+
*/
|
|
97
|
+
onSphereEraserClick(e: MouseEvent): void;
|
|
98
|
+
/**
|
|
99
|
+
* Handle pointer-move in sphereEraser mode — drag to continuously erase.
|
|
100
|
+
*/
|
|
101
|
+
onSphereEraserMove(e: MouseEvent): void;
|
|
102
|
+
/**
|
|
103
|
+
* Handle pointer-up in sphereEraser mode — finalize erase + push undo group.
|
|
104
|
+
* Works for both click-release and drag-release.
|
|
105
|
+
*/
|
|
106
|
+
onSphereEraserPointerUp(): void;
|
|
107
|
+
/**
|
|
108
|
+
* Expand cumulative "before" snapshots to cover z range [minZ, maxZ].
|
|
109
|
+
* Only captures slices not yet in the map (preserves original state).
|
|
110
|
+
*/
|
|
111
|
+
private expandDragBeforeSnapshots;
|
|
112
|
+
/** Get minimum Z index from drag snapshots */
|
|
113
|
+
private dragMinZ;
|
|
114
|
+
/** Get maximum Z index from drag snapshots */
|
|
115
|
+
private dragMaxZ;
|
|
116
|
+
/**
|
|
117
|
+
* After writing/erasing the sphere in the volume, re-render the current
|
|
118
|
+
* slice's layer canvas and composite all layers to master.
|
|
119
|
+
*
|
|
120
|
+
* @param changedDeltas - If provided, fire onMaskChanged for ALL changed
|
|
121
|
+
* slices (not just the current view slice) so the backend receives the
|
|
122
|
+
* full 3D sphere data for NII/GLTF export.
|
|
123
|
+
*/
|
|
124
|
+
private refreshDisplay;
|
|
125
|
+
/** Whether a sphere placement is currently in progress */
|
|
126
|
+
get isActive(): boolean;
|
|
127
|
+
}
|
|
@@ -40,6 +40,7 @@ export interface ToolHost {
|
|
|
40
40
|
image: ImageData;
|
|
41
41
|
} | undefined;
|
|
42
42
|
pushUndoDelta(delta: MaskDelta): void;
|
|
43
|
+
pushUndoGroup(deltas: MaskDelta[]): void;
|
|
43
44
|
getEraserUrls(): string[];
|
|
44
45
|
enableCrosshair(): void;
|
|
45
46
|
setUpSphereOrigins(mouseX: number, mouseY: number, sliceIndex: number): void;
|
|
@@ -72,3 +73,5 @@ export type LayerChannelHostDeps = Pick<ToolHost, 'reloadMasksFromVolume' | 'get
|
|
|
72
73
|
export type SliceRenderHostDeps = Pick<ToolHost, 'compositeAllLayers' | 'getOrCreateSliceBuffer' | 'renderSliceToCanvas' | 'getVolumeForLayer' | 'refreshSphereOverlay' | 'syncGuiParameterSettings' | 'repraintCurrentContrastSlice' | 'clearUndoHistory' | 'updateShowNumDiv' | 'updateCurrentContrastSlice'>;
|
|
73
74
|
/** DataLoader host dependencies */
|
|
74
75
|
export type DataLoaderHostDeps = Pick<ToolHost, 'invalidateSliceBuffer' | 'setDisplaySlicesBaseOnAxis' | 'afterLoadSlice' | 'setEmptyCanvasSize' | 'syncLayerSliceData' | 'reloadMasksFromVolume' | 'resetZoom'>;
|
|
76
|
+
/** SphereBrushTool host dependencies */
|
|
77
|
+
export type SphereBrushHostDeps = Pick<ToolHost, 'getVolumeForLayer' | 'compositeAllLayers' | 'pushUndoGroup' | 'renderSliceToCanvas' | 'getOrCreateSliceBuffer' | 'setEmptyCanvasSize' | 'reloadMasksFromVolume' | 'getEraserUrls'>;
|
|
@@ -8,13 +8,14 @@
|
|
|
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
|
+
export type { ToolHost, ImageStoreHostDeps, PanHostDeps, ContrastHostDeps, ZoomHostDeps, SphereHostDeps, SphereBrushHostDeps, DrawingHostDeps, DragSliceHostDeps, LayerChannelHostDeps, SliceRenderHostDeps, DataLoaderHostDeps, } from "./ToolHost";
|
|
12
12
|
export { EraserTool } from "./EraserTool";
|
|
13
13
|
export { DrawingTool } from "./DrawingTool";
|
|
14
14
|
export { PanTool } from "./PanTool";
|
|
15
15
|
export { ZoomTool } from "./ZoomTool";
|
|
16
16
|
export { SphereTool, SPHERE_CHANNEL_MAP } from "./SphereTool";
|
|
17
17
|
export type { SphereType } from "./SphereTool";
|
|
18
|
+
export { SphereBrushTool } from "./SphereBrushTool";
|
|
18
19
|
export { CrosshairTool } from "./CrosshairTool";
|
|
19
20
|
export { ContrastTool } from "./ContrastTool";
|
|
20
21
|
export { ImageStoreHelper } from "./ImageStoreHelper";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -24,6 +24,6 @@ import type { ToolMode, IAnnotationCallbacks } from "./Utils/segmentation/core/t
|
|
|
24
24
|
import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss } from "./Utils/segmentation/core/index";
|
|
25
25
|
import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
|
|
26
26
|
import "./css/style.css";
|
|
27
|
-
export declare const REVISION = "v3.
|
|
27
|
+
export declare const REVISION = "v3.2.0-beta";
|
|
28
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, };
|
|
29
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.
|
|
4
|
+
"version": "3.2.0",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"moudle": "dist/bundle.esm.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|