copper3d 2.2.3 → 3.0.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/README.md +1056 -5
- package/dist/Scene/copperScene.d.ts +3 -0
- package/dist/Scene/copperScene.js +13 -0
- package/dist/Scene/copperScene.js.map +1 -1
- package/dist/Utils/segmentation/CommToolsData.d.ts +109 -6
- package/dist/Utils/segmentation/CommToolsData.js +314 -50
- package/dist/Utils/segmentation/CommToolsData.js.map +1 -1
- package/dist/Utils/segmentation/DragOperator.d.ts +13 -7
- package/dist/Utils/segmentation/DragOperator.js +51 -165
- package/dist/Utils/segmentation/DragOperator.js.map +1 -1
- package/dist/Utils/segmentation/DrawToolCore.d.ts +57 -76
- package/dist/Utils/segmentation/DrawToolCore.js +368 -878
- package/dist/Utils/segmentation/DrawToolCore.js.map +1 -1
- package/dist/Utils/segmentation/NrrdTools.d.ts +277 -15
- package/dist/Utils/segmentation/NrrdTools.js +594 -232
- package/dist/Utils/segmentation/NrrdTools.js.map +1 -1
- package/dist/Utils/segmentation/core/MaskVolume.d.ts +477 -0
- package/dist/Utils/segmentation/core/MaskVolume.js +1238 -0
- package/dist/Utils/segmentation/core/MaskVolume.js.map +1 -0
- package/dist/Utils/segmentation/core/MigrationUtils.d.ts +97 -0
- package/dist/Utils/segmentation/core/MigrationUtils.js +163 -0
- package/dist/Utils/segmentation/core/MigrationUtils.js.map +1 -0
- package/dist/Utils/segmentation/core/UndoManager.d.ts +47 -0
- package/dist/Utils/segmentation/core/UndoManager.js +86 -0
- package/dist/Utils/segmentation/core/UndoManager.js.map +1 -0
- package/dist/Utils/segmentation/core/index.d.ts +76 -0
- package/dist/Utils/segmentation/core/index.js +75 -0
- package/dist/Utils/segmentation/core/index.js.map +1 -0
- package/dist/Utils/segmentation/core/types.d.ts +106 -0
- package/dist/Utils/segmentation/core/types.js +98 -0
- package/dist/Utils/segmentation/core/types.js.map +1 -0
- package/dist/Utils/segmentation/coreTools/coreType.d.ts +55 -36
- package/dist/Utils/segmentation/coreTools/coreType.js.map +1 -1
- package/dist/Utils/segmentation/coreTools/gui.d.ts +6 -16
- package/dist/Utils/segmentation/coreTools/gui.js +23 -27
- package/dist/Utils/segmentation/coreTools/gui.js.map +1 -1
- package/dist/Utils/segmentation/eventRouter/EventRouter.d.ts +144 -0
- package/dist/Utils/segmentation/eventRouter/EventRouter.js +369 -0
- package/dist/Utils/segmentation/eventRouter/EventRouter.js.map +1 -0
- package/dist/Utils/segmentation/eventRouter/index.d.ts +7 -0
- package/dist/Utils/segmentation/eventRouter/index.js +7 -0
- package/dist/Utils/segmentation/eventRouter/index.js.map +1 -0
- package/dist/Utils/segmentation/eventRouter/types.d.ts +70 -0
- package/dist/Utils/segmentation/eventRouter/types.js +7 -0
- package/dist/Utils/segmentation/eventRouter/types.js.map +1 -0
- package/dist/Utils/segmentation/tools/BaseTool.d.ts +25 -0
- package/dist/Utils/segmentation/tools/BaseTool.js +18 -0
- package/dist/Utils/segmentation/tools/BaseTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/ContrastTool.d.ts +26 -0
- package/dist/Utils/segmentation/tools/ContrastTool.js +118 -0
- package/dist/Utils/segmentation/tools/ContrastTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/CrosshairTool.d.ts +30 -0
- package/dist/Utils/segmentation/tools/CrosshairTool.js +157 -0
- package/dist/Utils/segmentation/tools/CrosshairTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/DragSliceTool.d.ts +44 -0
- package/dist/Utils/segmentation/tools/DragSliceTool.js +170 -0
- package/dist/Utils/segmentation/tools/DragSliceTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/EraserTool.d.ts +16 -0
- package/dist/Utils/segmentation/tools/EraserTool.js +92 -0
- package/dist/Utils/segmentation/tools/EraserTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/ImageStoreHelper.d.ts +65 -0
- package/dist/Utils/segmentation/tools/ImageStoreHelper.js +174 -0
- package/dist/Utils/segmentation/tools/ImageStoreHelper.js.map +1 -0
- package/dist/Utils/segmentation/tools/SphereTool.d.ts +38 -0
- package/dist/Utils/segmentation/tools/SphereTool.js +193 -0
- package/dist/Utils/segmentation/tools/SphereTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/ZoomTool.d.ts +20 -0
- package/dist/Utils/segmentation/tools/ZoomTool.js +59 -0
- package/dist/Utils/segmentation/tools/ZoomTool.js.map +1 -0
- package/dist/Utils/segmentation/tools/index.d.ts +22 -0
- package/dist/Utils/segmentation/tools/index.js +23 -0
- package/dist/Utils/segmentation/tools/index.js.map +1 -0
- package/dist/bundle.esm.js +4740 -1979
- package/dist/bundle.umd.js +4743 -1978
- package/dist/index.d.ts +5 -3
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/types/Renderer/copperRenderer.d.ts +1 -1
- package/dist/types/Renderer/copperRendererOnDemond.d.ts +1 -1
- package/dist/types/Scene/copperScene.d.ts +3 -0
- package/dist/types/Utils/segmentation/CommToolsData.d.ts +109 -6
- package/dist/types/Utils/segmentation/DragOperator.d.ts +13 -7
- package/dist/types/Utils/segmentation/DrawToolCore.d.ts +57 -76
- package/dist/types/Utils/segmentation/NrrdTools.d.ts +277 -15
- package/dist/types/Utils/segmentation/core/MaskVolume.d.ts +477 -0
- package/dist/types/Utils/segmentation/core/MigrationUtils.d.ts +97 -0
- package/dist/types/Utils/segmentation/core/UndoManager.d.ts +47 -0
- package/dist/types/Utils/segmentation/core/index.d.ts +76 -0
- package/dist/types/Utils/segmentation/core/types.d.ts +106 -0
- package/dist/types/Utils/segmentation/coreTools/coreType.d.ts +55 -36
- package/dist/types/Utils/segmentation/coreTools/gui.d.ts +6 -16
- package/dist/types/Utils/segmentation/eventRouter/EventRouter.d.ts +144 -0
- package/dist/types/Utils/segmentation/eventRouter/index.d.ts +7 -0
- package/dist/types/Utils/segmentation/eventRouter/types.d.ts +70 -0
- package/dist/types/Utils/segmentation/tools/BaseTool.d.ts +25 -0
- package/dist/types/Utils/segmentation/tools/ContrastTool.d.ts +26 -0
- package/dist/types/Utils/segmentation/tools/CrosshairTool.d.ts +30 -0
- package/dist/types/Utils/segmentation/tools/DragSliceTool.d.ts +44 -0
- package/dist/types/Utils/segmentation/tools/EraserTool.d.ts +16 -0
- package/dist/types/Utils/segmentation/tools/ImageStoreHelper.d.ts +65 -0
- package/dist/types/Utils/segmentation/tools/SphereTool.d.ts +38 -0
- package/dist/types/Utils/segmentation/tools/ZoomTool.d.ts +20 -0
- package/dist/types/Utils/segmentation/tools/index.d.ts +22 -0
- package/dist/types/index.d.ts +5 -3
- package/dist/types/types/types.d.ts +3 -3
- package/dist/types/types.d.ts +3 -3
- package/package.json +1 -1
- package/dist/Utils/segmentation/coreTools/archive.d.ts +0 -1
- package/dist/Utils/segmentation/coreTools/archive.js +0 -23
- package/dist/Utils/segmentation/coreTools/archive.js.map +0 -1
- package/dist/types/Utils/segmentation/coreTools/archive.d.ts +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DragSliceTool - Drag-based slice navigation
|
|
3
|
+
*
|
|
4
|
+
* Extracted from DragOperator.ts:
|
|
5
|
+
* - updateIndex
|
|
6
|
+
* - drawDragSlice
|
|
7
|
+
* - drawMaskToLayerCtx
|
|
8
|
+
* - cleanCanvases
|
|
9
|
+
* - updateShowNumDiv / updateCurrentContrastSlice
|
|
10
|
+
*/
|
|
11
|
+
import { BaseTool } from "./BaseTool";
|
|
12
|
+
import type { ToolContext } from "./BaseTool";
|
|
13
|
+
import type { ILayerRenderTarget } from "../coreTools/coreType";
|
|
14
|
+
export interface DragSliceCallbacks {
|
|
15
|
+
setSyncsliceNum: () => void;
|
|
16
|
+
setIsDrawFalse: (target: number) => void;
|
|
17
|
+
flipDisplayImageByAxis: () => void;
|
|
18
|
+
setEmptyCanvasSize: (axis?: "x" | "y" | "z") => void;
|
|
19
|
+
getOrCreateSliceBuffer: (axis: "x" | "y" | "z") => ImageData | null;
|
|
20
|
+
renderSliceToCanvas: (layer: string, axis: "x" | "y" | "z", sliceIndex: number, buffer: ImageData, targetCtx: CanvasRenderingContext2D, scaledWidth: number, scaledHeight: number) => void;
|
|
21
|
+
}
|
|
22
|
+
interface IDragEffectCanvases {
|
|
23
|
+
drawingCanvasLayerMaster: HTMLCanvasElement;
|
|
24
|
+
displayCanvas: HTMLCanvasElement;
|
|
25
|
+
layerTargets: Map<string, ILayerRenderTarget>;
|
|
26
|
+
[key: string]: HTMLCanvasElement | Map<string, ILayerRenderTarget>;
|
|
27
|
+
}
|
|
28
|
+
export declare class DragSliceTool extends BaseTool {
|
|
29
|
+
private callbacks;
|
|
30
|
+
private showDragNumberDiv;
|
|
31
|
+
private dragEffectCanvases;
|
|
32
|
+
constructor(ctx: ToolContext, callbacks: DragSliceCallbacks, showDragNumberDiv: HTMLDivElement, dragEffectCanvases: IDragEffectCanvases);
|
|
33
|
+
setShowDragNumberDiv(div: HTMLDivElement): void;
|
|
34
|
+
updateIndex(move: number): void;
|
|
35
|
+
private drawDragSlice;
|
|
36
|
+
/**
|
|
37
|
+
* Composite all visible layer canvases to the master display canvas.
|
|
38
|
+
*/
|
|
39
|
+
private compositeAllLayers;
|
|
40
|
+
private cleanCanvases;
|
|
41
|
+
updateShowNumDiv(contrastNum: number): void;
|
|
42
|
+
updateCurrentContrastSlice(): any;
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EraserTool - Channel-aware circular eraser implementation
|
|
3
|
+
*
|
|
4
|
+
* Phase 3.5: Updated to only erase pixels matching the active channel color
|
|
5
|
+
* on the current layer canvas. Other channels/layers are untouched.
|
|
6
|
+
*/
|
|
7
|
+
import { BaseTool } from "./BaseTool";
|
|
8
|
+
export declare class EraserTool extends BaseTool {
|
|
9
|
+
/**
|
|
10
|
+
* Create the circular eraser function.
|
|
11
|
+
*
|
|
12
|
+
* Channel-aware: only erases pixels whose RGB matches the active channel's color.
|
|
13
|
+
* Only operates on the current layer canvas + master canvas.
|
|
14
|
+
*/
|
|
15
|
+
createClearArc(): (x: number, y: number, radius: number) => void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ImageStoreHelper - Cross-axis image storage
|
|
3
|
+
*
|
|
4
|
+
* Extracted from DrawToolCore.ts:
|
|
5
|
+
* - storeAllImages / storeImageToAxis / storeImageToLayer / storeEachLayerImage
|
|
6
|
+
*
|
|
7
|
+
* Phase 2 Day 7: Updated to write/read MaskVolume alongside legacy IPaintImages.
|
|
8
|
+
* Volume is the primary storage; IPaintImages kept for backward compatibility.
|
|
9
|
+
*/
|
|
10
|
+
import { BaseTool } from "./BaseTool";
|
|
11
|
+
import type { ToolContext } from "./BaseTool";
|
|
12
|
+
import type { IPaintImage, IPaintImages } from "../coreTools/coreType";
|
|
13
|
+
export interface ImageStoreCallbacks {
|
|
14
|
+
setEmptyCanvasSize: (axis?: "x" | "y" | "z") => void;
|
|
15
|
+
drawImageOnEmptyImage: (canvas: HTMLCanvasElement) => void;
|
|
16
|
+
}
|
|
17
|
+
export declare class ImageStoreHelper extends BaseTool {
|
|
18
|
+
private callbacks;
|
|
19
|
+
constructor(ctx: ToolContext, callbacks: ImageStoreCallbacks);
|
|
20
|
+
/**
|
|
21
|
+
* Get MaskVolume for a specific layer.
|
|
22
|
+
* Delegates to the volumes stored in protectedData.maskData.
|
|
23
|
+
*
|
|
24
|
+
* @param layer - "layer1", "layer2", or "layer3"
|
|
25
|
+
* @returns MaskVolume for the given layer, or layer1 as fallback
|
|
26
|
+
*/
|
|
27
|
+
private getVolumeForLayer;
|
|
28
|
+
/**
|
|
29
|
+
* Get MaskVolume for the currently active layer.
|
|
30
|
+
*/
|
|
31
|
+
private getCurrentVolume;
|
|
32
|
+
/**
|
|
33
|
+
* Get the canvas element for a specific layer.
|
|
34
|
+
*/
|
|
35
|
+
private getCanvasForLayer;
|
|
36
|
+
/**
|
|
37
|
+
* Phase 3: Simplified to be a no-op.
|
|
38
|
+
* MaskVolume storage happens in storeAllImages via setSliceFromImageData.
|
|
39
|
+
* This method kept for backward compatibility with existing call sites.
|
|
40
|
+
*/
|
|
41
|
+
storeImageToAxis(_index: number, _paintedImages: IPaintImages, _imageData: ImageData, _axis?: "x" | "y" | "z"): void;
|
|
42
|
+
/**
|
|
43
|
+
* Retrieve the drawn image for a given axis and slice.
|
|
44
|
+
*
|
|
45
|
+
* Phase 3: Reads exclusively from MaskVolume (no legacy fallback).
|
|
46
|
+
*/
|
|
47
|
+
filterDrawedImage(axis: "x" | "y" | "z", sliceIndex: number, _paintedImages: IPaintImages): IPaintImage | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Store all layer images for the current slice (cross-axis sync).
|
|
50
|
+
*
|
|
51
|
+
* Phase 2: Also writes into the current layer's MaskVolume.
|
|
52
|
+
*/
|
|
53
|
+
storeAllImages(index: number, layer: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Store a single layer's canvas data to its MaskVolume.
|
|
56
|
+
* Reads from the individual layer canvas (not master) and uses RGB→channel reverse lookup.
|
|
57
|
+
*/
|
|
58
|
+
storeEachLayerImage(index: number, layer: string): void;
|
|
59
|
+
/**
|
|
60
|
+
* Phase 3: Simplified - extracts ImageData from canvas but no longer stores to paintImages.
|
|
61
|
+
* Kept for backward compatibility with existing call sites.
|
|
62
|
+
*/
|
|
63
|
+
storeImageToLayer(_index: number, canvas: HTMLCanvasElement, _paintedImages: IPaintImages): ImageData;
|
|
64
|
+
private hasNonZeroPixels;
|
|
65
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SphereTool - Sphere drawing and calculator sphere operations
|
|
3
|
+
*
|
|
4
|
+
* Extracted from DrawToolCore.ts:
|
|
5
|
+
* - drawSphere / drawSphereCore / clearSphereCanvas
|
|
6
|
+
* - drawSphereOnEachViews / drawCalculatorSphereOnEachViews
|
|
7
|
+
* - storeSphereImages / setSphereCanvasSize
|
|
8
|
+
* - drawCalculatorSphere / configMouseSphereWheel
|
|
9
|
+
* - getSpherePosition / clearSpherePrintStoreImages
|
|
10
|
+
*/
|
|
11
|
+
import { BaseTool } from "./BaseTool";
|
|
12
|
+
import type { ToolContext } from "./BaseTool";
|
|
13
|
+
import type { IPaintImages } from "../coreTools/coreType";
|
|
14
|
+
/**
|
|
15
|
+
* Callbacks that DrawToolCore must provide for sphere operations.
|
|
16
|
+
*/
|
|
17
|
+
export interface SphereCallbacks {
|
|
18
|
+
setEmptyCanvasSize: (axis?: "x" | "y" | "z") => void;
|
|
19
|
+
drawImageOnEmptyImage: (canvas: HTMLCanvasElement) => void;
|
|
20
|
+
storeImageToAxis: (index: number, paintedImages: IPaintImages, imageData: ImageData, axis?: "x" | "y" | "z") => void;
|
|
21
|
+
createEmptyPaintImage: (dimensions: number[], paintImages: IPaintImages) => void;
|
|
22
|
+
}
|
|
23
|
+
export declare class SphereTool extends BaseTool {
|
|
24
|
+
private callbacks;
|
|
25
|
+
constructor(ctx: ToolContext, callbacks: SphereCallbacks);
|
|
26
|
+
setCallbacks(callbacks: SphereCallbacks): void;
|
|
27
|
+
setSphereCanvasSize(axis?: "x" | "y" | "z"): void;
|
|
28
|
+
drawSphereCore(ctx: CanvasRenderingContext2D, x: number, y: number, radius: number, color: string): void;
|
|
29
|
+
clearSphereCanvas(): [HTMLCanvasElement, CanvasRenderingContext2D];
|
|
30
|
+
drawSphere(mouseX: number, mouseY: number, radius: number): void;
|
|
31
|
+
configMouseSphereWheel(): (e: WheelEvent) => void;
|
|
32
|
+
private storeSphereImages;
|
|
33
|
+
drawSphereOnEachViews(decay: number, axis: "x" | "y" | "z"): void;
|
|
34
|
+
private getSpherePosition;
|
|
35
|
+
drawCalculatorSphereOnEachViews(axis: "x" | "y" | "z"): void;
|
|
36
|
+
drawCalculatorSphere(radius: number): void;
|
|
37
|
+
clearSpherePrintStoreImages(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ZoomTool - Mouse wheel zoom configuration
|
|
3
|
+
*
|
|
4
|
+
* Extracted from DrawToolCore.ts:
|
|
5
|
+
* - configMouseZoomWheel
|
|
6
|
+
*/
|
|
7
|
+
import { BaseTool } from "./BaseTool";
|
|
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
|
+
}
|
|
14
|
+
export declare class ZoomTool extends BaseTool {
|
|
15
|
+
private container;
|
|
16
|
+
private mainAreaContainer;
|
|
17
|
+
private callbacks;
|
|
18
|
+
constructor(ctx: ToolContext, container: HTMLElement, mainAreaContainer: HTMLDivElement, callbacks: ZoomCallbacks);
|
|
19
|
+
configMouseZoomWheel(): (e: WheelEvent) => void;
|
|
20
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Legacy Tool Exports
|
|
3
|
+
*
|
|
4
|
+
* Tools extracted from DrawToolCore.ts and DragOperator.ts.
|
|
5
|
+
* These tools operate on the old INrrdStates/IGUIStates/IProtected interfaces.
|
|
6
|
+
*
|
|
7
|
+
* For the new SegmentationManager tool system, see manager/tools/.
|
|
8
|
+
*/
|
|
9
|
+
export { BaseTool } from "./BaseTool";
|
|
10
|
+
export type { ToolContext } from "./BaseTool";
|
|
11
|
+
export { EraserTool } from "./EraserTool";
|
|
12
|
+
export { ZoomTool } from "./ZoomTool";
|
|
13
|
+
export type { ZoomCallbacks } from "./ZoomTool";
|
|
14
|
+
export { SphereTool } from "./SphereTool";
|
|
15
|
+
export type { SphereCallbacks } from "./SphereTool";
|
|
16
|
+
export { CrosshairTool } from "./CrosshairTool";
|
|
17
|
+
export { ContrastTool } from "./ContrastTool";
|
|
18
|
+
export type { ContrastCallbacks } from "./ContrastTool";
|
|
19
|
+
export { ImageStoreHelper } from "./ImageStoreHelper";
|
|
20
|
+
export type { ImageStoreCallbacks } from "./ImageStoreHelper";
|
|
21
|
+
export { DragSliceTool } from "./DragSliceTool";
|
|
22
|
+
export type { DragSliceCallbacks } from "./DragSliceTool";
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,7 +18,9 @@ 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
20
|
import { IPaintImage, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates } from "./Utils/segmentation/coreTools/coreType";
|
|
21
|
+
import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss } from "./Utils/segmentation/core/index";
|
|
22
|
+
import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
|
|
21
23
|
import "./css/style.css";
|
|
22
|
-
export declare const REVISION = "
|
|
23
|
-
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, NrrdTools, loading, Copper3dTrackballControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, };
|
|
24
|
-
export type { positionType, screenPosType, optsType, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates };
|
|
24
|
+
export declare const REVISION = "v3.0.0-beta";
|
|
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
|
+
export type { positionType, screenPosType, optsType, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, LayerId, ChannelValue, };
|
|
@@ -132,9 +132,9 @@ interface exportPaintImageType {
|
|
|
132
132
|
data: number[];
|
|
133
133
|
}
|
|
134
134
|
interface storeExportPaintImageType {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
layer1: exportPaintImageType[];
|
|
136
|
+
layer2: exportPaintImageType[];
|
|
137
|
+
layer3: exportPaintImageType[];
|
|
138
138
|
}
|
|
139
139
|
interface optionsGltfExporterType {
|
|
140
140
|
trs?: boolean;
|
package/dist/types/types.d.ts
CHANGED
|
@@ -132,9 +132,9 @@ interface exportPaintImageType {
|
|
|
132
132
|
data: number[];
|
|
133
133
|
}
|
|
134
134
|
interface storeExportPaintImageType {
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
135
|
+
layer1: exportPaintImageType[];
|
|
136
|
+
layer2: exportPaintImageType[];
|
|
137
|
+
layer3: exportPaintImageType[];
|
|
138
138
|
}
|
|
139
139
|
interface optionsGltfExporterType {
|
|
140
140
|
trs?: boolean;
|
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": "
|
|
4
|
+
"version": "3.0.0",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"moudle": "dist/bundle.esm.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
// Not use this function now!!!
|
|
2
|
-
import { saveFileAsJson } from "../../download";
|
|
3
|
-
import { restructData, convertReformatDataToBlob, } from "../../workers/reformatSaveDataWorker";
|
|
4
|
-
function verifyCanvasIsEmpty(canvas, protectedData) {
|
|
5
|
-
protectedData.canvases.emptyCanvas.width = canvas.width;
|
|
6
|
-
protectedData.canvases.emptyCanvas.height = canvas.height;
|
|
7
|
-
const validation = canvas.toDataURL() === protectedData.canvases.emptyCanvas.toDataURL();
|
|
8
|
-
return validation;
|
|
9
|
-
}
|
|
10
|
-
function exportData(nrrd_states, protectedData) {
|
|
11
|
-
let exportDataFormat = { x: [], y: [], z: [] };
|
|
12
|
-
window.alert("Export masks, starting!!!");
|
|
13
|
-
const masks = restructData(protectedData.maskData.paintImages.z, nrrd_states.nrrd_z_pixel, nrrd_states.nrrd_x_pixel, nrrd_states.nrrd_y_pixel);
|
|
14
|
-
const blob = convertReformatDataToBlob(masks);
|
|
15
|
-
if (blob) {
|
|
16
|
-
saveFileAsJson(blob, "copper3D_export data_z.json");
|
|
17
|
-
window.alert("Export masks successfully!!!");
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
window.alert("Export failed!");
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
//# sourceMappingURL=archive.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../../../../src/Utils/segmentation/coreTools/archive.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EACL,YAAY,EACZ,yBAAyB,GAC1B,MAAM,sCAAsC,CAAC;AAC9C,SAAS,mBAAmB,CAAC,MAAW,EAAE,aAAkB;IAC1D,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;IACxD,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE1D,MAAM,UAAU,GACd,MAAM,CAAC,SAAS,EAAE,KAAK,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,SAAS,EAAE,CAAC;IAExE,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,SAAS,UAAU,CAAC,WAAwB,EAAE,aAAyB;IACrE,IAAI,gBAAgB,GAAa,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC;IAEzD,MAAM,CAAC,KAAK,CAAC,2BAA2B,CAAC,CAAC;IAC1C,MAAM,KAAK,GAAG,YAAY,CACxB,aAAa,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,EACpC,WAAW,CAAC,YAAY,EACxB,WAAW,CAAC,YAAY,EACxB,WAAW,CAAC,YAAY,CACzB,CAAC;IACF,MAAM,IAAI,GAAG,yBAAyB,CAAC,KAAK,CAAC,CAAC;IAC9C,IAAI,IAAI,EAAE;QACR,cAAc,CAAC,IAAI,EAAE,6BAA6B,CAAC,CAAC;QACpD,MAAM,CAAC,KAAK,CAAC,8BAA8B,CAAC,CAAC;KAC9C;SAAM;QACL,MAAM,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;KAChC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|