copper3d 3.7.0 → 3.7.2
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/Copper3dOrbitControls.d.ts +54 -0
- package/dist/Controls/Copper3dOrbitControls.js +134 -0
- package/dist/Controls/Copper3dOrbitControls.js.map +1 -0
- package/dist/Controls/Copper3dTrackballControls.d.ts +45 -45
- package/dist/Controls/Copper3dTrackballControls.js.map +1 -1
- package/dist/Controls/copperControls.d.ts +17 -17
- package/dist/Controls/copperControls.js.map +1 -1
- package/dist/Controls/orbitFraming.d.ts +71 -0
- package/dist/Controls/orbitFraming.js +94 -0
- package/dist/Controls/orbitFraming.js.map +1 -0
- package/dist/Loader/copperDicomLoader.d.ts +13 -13
- package/dist/Loader/copperDicomLoader.js.map +1 -1
- package/dist/Loader/copperGltfLoader.d.ts +3 -3
- package/dist/Loader/copperNrrdLoader.d.ts +13 -13
- package/dist/Loader/copperNrrdLoader.js +27 -0
- package/dist/Loader/copperNrrdLoader.js.map +1 -1
- package/dist/Loader/copperOBJLoader.d.ts +3 -3
- package/dist/Loader/copperRaw4DVolumeLoader.d.ts +10 -10
- package/dist/Loader/copperRaw4DVolumeLoader.js.map +1 -1
- package/dist/Loader/copperVtkLoader.d.ts +8 -8
- package/dist/Loader/copperVtkLoader.js.map +1 -1
- package/dist/Loader/mhdParser.d.ts +83 -83
- package/dist/Loader/mhdParser.js.map +1 -1
- package/dist/Renderer/baseRenderer.d.ts +32 -33
- package/dist/Renderer/baseRenderer.js +1 -1
- package/dist/Renderer/baseRenderer.js.map +1 -1
- package/dist/Renderer/copperMSceneRenderer.d.ts +24 -24
- package/dist/Renderer/copperMSceneRenderer.js.map +1 -1
- package/dist/Renderer/copperRenderer.d.ts +20 -20
- package/dist/Renderer/copperRenderer.js.map +1 -1
- package/dist/Renderer/copperRendererOnDemond.d.ts +12 -12
- package/dist/Renderer/copperRendererOnDemond.js.map +1 -1
- package/dist/Scene/baseScene.d.ts +38 -38
- package/dist/Scene/baseScene.js.map +1 -1
- package/dist/Scene/commonSceneMethod.d.ts +50 -50
- package/dist/Scene/commonSceneMethod.js.map +1 -1
- package/dist/Scene/copperMScene.d.ts +42 -42
- package/dist/Scene/copperMScene.js.map +1 -1
- package/dist/Scene/copperScene.d.ts +64 -64
- package/dist/Scene/copperScene.js.map +1 -1
- package/dist/Scene/copperSceneOnDemond.d.ts +13 -13
- package/dist/Scene/copperSceneOnDemond.js.map +1 -1
- package/dist/Scene/preRenderRegistry.d.ts +33 -33
- package/dist/Utils/MeshNodeTool.d.ts +41 -41
- package/dist/Utils/MeshNodeTool.js.map +1 -1
- package/dist/Utils/add3DLabel.d.ts +18 -18
- package/dist/Utils/add3DLabel.js.map +1 -1
- package/dist/Utils/colormapData.d.ts +9 -9
- package/dist/Utils/colormapData.js.map +1 -1
- package/dist/Utils/convet.d.ts +1 -1
- package/dist/Utils/convet.js.map +1 -1
- package/dist/Utils/download.d.ts +1 -1
- package/dist/Utils/download.js.map +1 -1
- package/dist/Utils/getVOILUT.d.ts +13 -13
- package/dist/Utils/getVOILUT.js.map +1 -1
- package/dist/Utils/kiwrious/configKiwrious.d.ts +4 -4
- package/dist/Utils/kiwrious/configKiwrious.js.map +1 -1
- package/dist/Utils/raycaster.d.ts +8 -8
- package/dist/Utils/raycaster.js.map +1 -1
- package/dist/Utils/segmentation/CanvasState.d.ts +31 -31
- package/dist/Utils/segmentation/CanvasState.js.map +1 -1
- package/dist/Utils/segmentation/DragOperator.d.ts +45 -45
- package/dist/Utils/segmentation/DragOperator.js.map +1 -1
- package/dist/Utils/segmentation/DrawToolCore.d.ts +168 -168
- package/dist/Utils/segmentation/DrawToolCore.js.map +1 -1
- package/dist/Utils/segmentation/NrrdTools.d.ts +334 -334
- package/dist/Utils/segmentation/NrrdTools.js +1 -1
- package/dist/Utils/segmentation/NrrdTools.js.map +1 -1
- package/dist/Utils/segmentation/RenderingUtils.d.ts +96 -96
- package/dist/Utils/segmentation/RenderingUtils.js.map +1 -1
- package/dist/Utils/segmentation/core/GaussianSmoother.d.ts +55 -55
- package/dist/Utils/segmentation/core/GaussianSmoother.js.map +1 -1
- package/dist/Utils/segmentation/core/MarchingSquares.d.ts +80 -80
- package/dist/Utils/segmentation/core/MarchingSquares.js.map +1 -1
- package/dist/Utils/segmentation/core/MaskVolume.d.ts +471 -471
- package/dist/Utils/segmentation/core/MaskVolume.js.map +1 -1
- package/dist/Utils/segmentation/core/UndoManager.d.ts +51 -51
- package/dist/Utils/segmentation/core/UndoManager.js.map +1 -1
- package/dist/Utils/segmentation/core/index.d.ts +76 -76
- package/dist/Utils/segmentation/core/types.d.ts +505 -505
- package/dist/Utils/segmentation/core/types.js +36 -36
- package/dist/Utils/segmentation/core/types.js.map +1 -1
- package/dist/Utils/segmentation/coreTools/GuiState.d.ts +22 -22
- package/dist/Utils/segmentation/coreTools/NrrdState.d.ts +25 -25
- package/dist/Utils/segmentation/coreTools/divControlTools.d.ts +19 -19
- package/dist/Utils/segmentation/coreTools/gui.d.ts +42 -42
- package/dist/Utils/segmentation/coreTools/gui.js.map +1 -1
- package/dist/Utils/segmentation/eventRouter/EventRouter.d.ts +157 -157
- package/dist/Utils/segmentation/eventRouter/EventRouter.js.map +1 -1
- package/dist/Utils/segmentation/eventRouter/index.d.ts +7 -7
- package/dist/Utils/segmentation/eventRouter/types.d.ts +71 -71
- package/dist/Utils/segmentation/tools/AiAssistTool.d.ts +249 -249
- package/dist/Utils/segmentation/tools/AiAssistTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/BaseTool.d.ts +31 -31
- package/dist/Utils/segmentation/tools/ContrastTool.d.ts +23 -23
- package/dist/Utils/segmentation/tools/ContrastTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/CrosshairTool.d.ts +40 -40
- package/dist/Utils/segmentation/tools/CrosshairTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/DataLoader.d.ts +33 -33
- package/dist/Utils/segmentation/tools/DataLoader.js.map +1 -1
- package/dist/Utils/segmentation/tools/DragSliceTool.d.ts +33 -33
- package/dist/Utils/segmentation/tools/DragSliceTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/DrawingTool.d.ts +126 -126
- package/dist/Utils/segmentation/tools/DrawingTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/EraserTool.d.ts +16 -16
- package/dist/Utils/segmentation/tools/EraserTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/ImageStoreHelper.d.ts +42 -42
- package/dist/Utils/segmentation/tools/ImageStoreHelper.js.map +1 -1
- package/dist/Utils/segmentation/tools/LayerChannelManager.d.ts +56 -56
- package/dist/Utils/segmentation/tools/LayerChannelManager.js.map +1 -1
- package/dist/Utils/segmentation/tools/PanTool.d.ts +47 -47
- package/dist/Utils/segmentation/tools/PanTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/SliceRenderPipeline.d.ts +85 -85
- package/dist/Utils/segmentation/tools/SliceRenderPipeline.js.map +1 -1
- package/dist/Utils/segmentation/tools/SphereBrushTool.d.ts +204 -204
- package/dist/Utils/segmentation/tools/SphereBrushTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/SphereTool.d.ts +249 -249
- package/dist/Utils/segmentation/tools/SphereTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/ToolHost.d.ts +76 -76
- package/dist/Utils/segmentation/tools/ZoomTool.d.ts +16 -16
- package/dist/Utils/segmentation/tools/ZoomTool.js.map +1 -1
- package/dist/Utils/segmentation/tools/index.d.ts +25 -25
- package/dist/Utils/surfaceAnnotation/MeshGraph.d.ts +46 -46
- package/dist/Utils/surfaceAnnotation/MeshGraph.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/SurfaceAnnotator.d.ts +213 -213
- package/dist/Utils/surfaceAnnotation/SurfaceAnnotator.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/annotationStore.d.ts +32 -32
- package/dist/Utils/surfaceAnnotation/annotationStore.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/contourRender.d.ts +7 -7
- package/dist/Utils/surfaceAnnotation/geodesicContour.d.ts +59 -59
- package/dist/Utils/surfaceAnnotation/geodesicContour.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/index.d.ts +3 -3
- package/dist/Utils/surfaceAnnotation/pointMarkers.d.ts +16 -16
- package/dist/Utils/surfaceAnnotation/raycastSurface.d.ts +8 -8
- package/dist/Utils/surfaceAnnotation/raycastSurface.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/strokeContour.d.ts +29 -29
- package/dist/Utils/surfaceAnnotation/strokeContour.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/types.d.ts +47 -47
- package/dist/Utils/texture2d.d.ts +14 -14
- package/dist/Utils/texture2d.js.map +1 -1
- package/dist/Utils/utils.d.ts +37 -37
- package/dist/Utils/utils.js.map +1 -1
- package/dist/Utils/volumeColormap.d.ts +6 -6
- package/dist/Utils/volumeShader.d.ts +7 -7
- package/dist/Utils/workers/reformatSaveDataWorker.d.ts +13 -13
- package/dist/Utils/workers/reformatSaveDataWorker.js.map +1 -1
- package/dist/bundle.esm.js +64886 -44206
- package/dist/bundle.umd.js +64903 -44222
- package/dist/index.d.ts +35 -33
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/dicom_pharser_dictionary.d.ts +1 -1
- package/dist/lib/environment/index.d.ts +8 -8
- package/dist/lib/three-vignette.d.ts +11 -11
- package/dist/lib/three-vignette.js.map +1 -1
- package/dist/types/Controls/Copper3dOrbitControls.d.ts +54 -0
- package/dist/types/Controls/orbitFraming.d.ts +71 -0
- package/dist/types/Loader/copperDicomLoader.d.ts +1 -1
- package/dist/types/Renderer/baseRenderer.d.ts +0 -1
- package/dist/types/Scene/copperScene.d.ts +1 -1
- package/dist/types/Utils/convet.d.ts +1 -1
- package/dist/types/Utils/segmentation/core/MaskVolume.d.ts +1 -1
- package/dist/types/Utils/workers/reformatSaveDataWorker.d.ts +1 -1
- package/dist/types/index.d.ts +3 -1
- package/dist/types/types.d.ts +310 -310
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
import { copperRenderer } from "./Renderer/copperRenderer";
|
|
2
|
-
import { setHDRFilePath } from "./lib/environment/index";
|
|
3
|
-
import { copperScene } from "./Scene/copperScene";
|
|
4
|
-
import { CameraViewPoint } from "./Controls/copperControls";
|
|
5
|
-
import { addLabelToScene, positionType, screenPosType, convert3DPostoScreenPos, convertScreenPosto3DPos } from "./Utils/add3DLabel";
|
|
6
|
-
import { addBoxHelper, optsType } from "./Loader/copperNrrdLoader";
|
|
7
|
-
import { fullScreenListenner, loading, throttle } from "./Utils/utils";
|
|
8
|
-
import { copperRendererOnDemond } from "./Renderer/copperRendererOnDemond";
|
|
9
|
-
import { copperSceneOnDemond } from "./Scene/copperSceneOnDemond";
|
|
10
|
-
import { copperMSceneRenderer } from "./Renderer/copperMSceneRenderer";
|
|
11
|
-
import { copperMScene } from "./Scene/copperMScene";
|
|
12
|
-
import { createTexture2D_NRRD } from "./Utils/texture2d";
|
|
13
|
-
import { configKiwriousHeart } from "./Utils/kiwrious/configKiwrious";
|
|
14
|
-
import kiwrious from "./Utils/kiwrious/configKiwrious";
|
|
15
|
-
import { NrrdTools } from "./Utils/segmentation/NrrdTools";
|
|
16
|
-
import { GaussianSmoother } from "./Utils/segmentation/core/GaussianSmoother";
|
|
17
|
-
import { Copper3dTrackballControls } from "./Controls/Copper3dTrackballControls";
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import
|
|
27
|
-
import {
|
|
28
|
-
import
|
|
29
|
-
import type {
|
|
30
|
-
import "./
|
|
31
|
-
|
|
32
|
-
export
|
|
33
|
-
export
|
|
1
|
+
import { copperRenderer } from "./Renderer/copperRenderer";
|
|
2
|
+
import { setHDRFilePath } from "./lib/environment/index";
|
|
3
|
+
import { copperScene } from "./Scene/copperScene";
|
|
4
|
+
import { CameraViewPoint } from "./Controls/copperControls";
|
|
5
|
+
import { addLabelToScene, positionType, screenPosType, convert3DPostoScreenPos, convertScreenPosto3DPos } from "./Utils/add3DLabel";
|
|
6
|
+
import { addBoxHelper, optsType } from "./Loader/copperNrrdLoader";
|
|
7
|
+
import { fullScreenListenner, loading, throttle } from "./Utils/utils";
|
|
8
|
+
import { copperRendererOnDemond } from "./Renderer/copperRendererOnDemond";
|
|
9
|
+
import { copperSceneOnDemond } from "./Scene/copperSceneOnDemond";
|
|
10
|
+
import { copperMSceneRenderer } from "./Renderer/copperMSceneRenderer";
|
|
11
|
+
import { copperMScene } from "./Scene/copperMScene";
|
|
12
|
+
import { createTexture2D_NRRD } from "./Utils/texture2d";
|
|
13
|
+
import { configKiwriousHeart } from "./Utils/kiwrious/configKiwrious";
|
|
14
|
+
import kiwrious from "./Utils/kiwrious/configKiwrious";
|
|
15
|
+
import { NrrdTools } from "./Utils/segmentation/NrrdTools";
|
|
16
|
+
import { GaussianSmoother } from "./Utils/segmentation/core/GaussianSmoother";
|
|
17
|
+
import { Copper3dTrackballControls } from "./Controls/Copper3dTrackballControls";
|
|
18
|
+
import { Copper3dOrbitControls } from "./Controls/Copper3dOrbitControls";
|
|
19
|
+
import { MeshNodeTool } from "./Utils/MeshNodeTool";
|
|
20
|
+
import { removeGuiFolderChilden } from "./Utils/segmentation/coreTools/gui";
|
|
21
|
+
import { SurfaceAnnotator } from "./Utils/surfaceAnnotation";
|
|
22
|
+
import type { SurfaceAnnotatorOptions, Annotation, AnnotationMode, ExportOptions } from "./Utils/surfaceAnnotation";
|
|
23
|
+
import { nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, exportPaintImageType, IOptVTKLoader, aligned4DSurfaceType, aligned4DOptsType, Aligned4DController, raw4DVolumeTransformType, raw4DVolumeOptsType, Raw4DVolumeController } from "./types/types";
|
|
24
|
+
import { IPaintImage, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, IGuiMeta } from "./Utils/segmentation/core/types";
|
|
25
|
+
import { NrrdState } from "./Utils/segmentation/coreTools/NrrdState";
|
|
26
|
+
import { GuiState } from "./Utils/segmentation/coreTools/GuiState";
|
|
27
|
+
import type { ToolMode, IAnnotationCallbacks } from "./Utils/segmentation/core/types";
|
|
28
|
+
import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss } from "./Utils/segmentation/core/index";
|
|
29
|
+
import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
|
|
30
|
+
import type { AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult } from "./Utils/segmentation/tools/AiAssistTool";
|
|
31
|
+
import "./css/style.css";
|
|
32
|
+
export declare const REVISION: string;
|
|
33
|
+
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, NrrdTools, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, };
|
|
34
|
+
export type { positionType, screenPosType, optsType, 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, LayerId, ChannelValue, AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult, SurfaceAnnotatorOptions, Annotation, AnnotationMode, ExportOptions, };
|
|
35
|
+
export type { CameraViewPreset } from "./Controls/orbitFraming";
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { NrrdTools } from "./Utils/segmentation/NrrdTools";
|
|
|
17
17
|
import { GaussianSmoother } from "./Utils/segmentation/core/GaussianSmoother";
|
|
18
18
|
// Phase 7: Segmentation Module - Unified exports
|
|
19
19
|
import { Copper3dTrackballControls } from "./Controls/Copper3dTrackballControls";
|
|
20
|
+
import { Copper3dOrbitControls } from "./Controls/Copper3dOrbitControls";
|
|
20
21
|
import { MeshNodeTool } from "./Utils/MeshNodeTool";
|
|
21
22
|
import { removeGuiFolderChilden } from "./Utils/segmentation/coreTools/gui";
|
|
22
23
|
import { SurfaceAnnotator } from "./Utils/surfaceAnnotation";
|
|
@@ -40,5 +41,5 @@ if (typeof window !== "undefined") {
|
|
|
40
41
|
if (typeof console !== "undefined") {
|
|
41
42
|
console.log(`%cCopper3D Visualisation %c${REVISION}`, "padding: 3px;color:white; background:#023047", "padding: 3px;color:white; background:#f50a25");
|
|
42
43
|
}
|
|
43
|
-
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, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, };
|
|
44
|
+
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, NrrdTools, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, };
|
|
44
45
|
//# 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,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,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,QAAQ,MAAM,iCAAiC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,gBAAgB,EAChB,gBAAgB,GACjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare var TAG_DICT: any;
|
|
1
|
+
export declare var TAG_DICT: any;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export type environmentType = {
|
|
2
|
-
id: string;
|
|
3
|
-
name: string;
|
|
4
|
-
path: string | null;
|
|
5
|
-
format: string;
|
|
6
|
-
};
|
|
7
|
-
export declare function setHDRFilePath(url: string): void;
|
|
8
|
-
export declare const environments: Array<environmentType>;
|
|
1
|
+
export type environmentType = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
path: string | null;
|
|
5
|
+
format: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function setHDRFilePath(url: string): void;
|
|
8
|
+
export declare const environments: Array<environmentType>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Mesh, RawShaderMaterial } from "three";
|
|
2
|
-
interface optType {
|
|
3
|
-
[key: string]: any;
|
|
4
|
-
}
|
|
5
|
-
interface customMeshType {
|
|
6
|
-
mesh: Mesh<any, RawShaderMaterial>;
|
|
7
|
-
[key: string]: any;
|
|
8
|
-
}
|
|
9
|
-
declare function createBackground(opt?: optType): customMeshType;
|
|
10
|
-
export { createBackground };
|
|
11
|
-
export type { customMeshType };
|
|
1
|
+
import { Mesh, RawShaderMaterial } from "three";
|
|
2
|
+
interface optType {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
interface customMeshType {
|
|
6
|
+
mesh: Mesh<any, RawShaderMaterial>;
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
}
|
|
9
|
+
declare function createBackground(opt?: optType): customMeshType;
|
|
10
|
+
export { createBackground };
|
|
11
|
+
export type { customMeshType };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"three-vignette.js","sourceRoot":"","sources":["../../src/lib/three-vignette.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,UAAU,E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able with Copper3dTrackballControls: same new X(camera, domElement)
|
|
6
|
+
* signature and the same core surface (update / dispose / reset / target /
|
|
7
|
+
* mouseButtons / enabled, inherited from OrbitControls), plus setPivot / frameBox /
|
|
8
|
+
* applyView for the medical features.
|
|
9
|
+
*
|
|
10
|
+
* Seam: copperScene.render() calls controls.update() every frame, so assigning an
|
|
11
|
+
* instance to copperScene.controls lets copper's own loop drive it — no extra rAF loop.
|
|
12
|
+
*
|
|
13
|
+
* Never drive the camera via copperScene.loadView(): it unconditionally touches
|
|
14
|
+
* controls.up0, which OrbitControls does not have. applyView() replaces it.
|
|
15
|
+
*/
|
|
16
|
+
import * as THREE from 'three';
|
|
17
|
+
import { OrbitControls } from 'three/examples/jsm/controls/OrbitControls.js';
|
|
18
|
+
import { type CameraViewPreset } from './orbitFraming';
|
|
19
|
+
export declare class Copper3dOrbitControls extends OrbitControls {
|
|
20
|
+
private _pivot;
|
|
21
|
+
private _dist;
|
|
22
|
+
private _currentPreset;
|
|
23
|
+
private readonly _onStart;
|
|
24
|
+
constructor(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera, domElement: HTMLElement);
|
|
25
|
+
/** The point rotation orbits; a rotate gesture snaps target back to it. */
|
|
26
|
+
setPivot(pivot: THREE.Vector3): void;
|
|
27
|
+
/**
|
|
28
|
+
* Frame a bounding box: pivot = box centre, auto distance from box size and the
|
|
29
|
+
* camera's fov, min/max zoom limits, then re-apply the current view so near/far are
|
|
30
|
+
* recomputed for the new size. The caller supplies the box (e.g. the union of the
|
|
31
|
+
* three orthogonal NRRD slice planes) so this class stays engine-agnostic.
|
|
32
|
+
*
|
|
33
|
+
* Perspective cameras only: auto-framing derives the distance from the vertical fov,
|
|
34
|
+
* which an OrthographicCamera does not have. Rather than silently produce a NaN camera
|
|
35
|
+
* position (model vanishes), we warn and skip for a non-perspective camera.
|
|
36
|
+
*/
|
|
37
|
+
frameBox(box: THREE.Box3): void;
|
|
38
|
+
/**
|
|
39
|
+
* Apply a view preset. Equivalent to copperScene.loadView but never touches up0.
|
|
40
|
+
* Authoritative + idempotent: saveState() at the end makes reset() mean "back to this
|
|
41
|
+
* view's initial framing".
|
|
42
|
+
*/
|
|
43
|
+
applyView(preset: CameraViewPreset): void;
|
|
44
|
+
dispose(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Rewrite OrbitControls' cached orbit-pole quaternion from the given up.
|
|
47
|
+
*
|
|
48
|
+
* r170 caches _quat once in the constructor from object.up and never recomputes it in
|
|
49
|
+
* update() (OrbitControls.js:132 sets it; :299/:388 only consume it), so after a view
|
|
50
|
+
* change the pole would be stale. Writing these private fields is acceptable: three is
|
|
51
|
+
* version-pinned to 0.170.0.
|
|
52
|
+
*/
|
|
53
|
+
private refreshPole;
|
|
54
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure camera-framing math for the right panel's OrbitControls.
|
|
3
|
+
*
|
|
4
|
+
* Deliberately free of DOM / copperScene / OrbitControls: every mistake here shows
|
|
5
|
+
* up only as "rotation feels wrong" and never throws, so it must be unit-tested.
|
|
6
|
+
* The wiring lives in Copper3dOrbitControls.ts.
|
|
7
|
+
*/
|
|
8
|
+
import * as THREE from 'three';
|
|
9
|
+
/** Shape of src/assets/nrrd_view*.json. */
|
|
10
|
+
export interface CameraViewPreset {
|
|
11
|
+
farPlane: number;
|
|
12
|
+
nearPlane: number;
|
|
13
|
+
eyePosition: number[];
|
|
14
|
+
targetPosition: number[];
|
|
15
|
+
upVector: number[];
|
|
16
|
+
}
|
|
17
|
+
export interface Framing {
|
|
18
|
+
/** Rotation pivot = bounding-box centre (decision C4). */
|
|
19
|
+
pivot: THREE.Vector3;
|
|
20
|
+
/** Bounding-box diagonal length; view-independent, shared by all three presets. */
|
|
21
|
+
size: number;
|
|
22
|
+
/** Camera-to-pivot distance (decision C5 auto-framing). */
|
|
23
|
+
dist: number;
|
|
24
|
+
}
|
|
25
|
+
export interface ViewPose {
|
|
26
|
+
position: THREE.Vector3;
|
|
27
|
+
up: THREE.Vector3;
|
|
28
|
+
target: THREE.Vector3;
|
|
29
|
+
}
|
|
30
|
+
/** Leave ~30% margin so the model does not touch the panel edge while pan/rotating. */
|
|
31
|
+
export declare const FRAMING_MARGIN = 1.3;
|
|
32
|
+
/**
|
|
33
|
+
* Whether this gesture is a pure rotate. Used to decide whether to snap the rotation
|
|
34
|
+
* pivot back to the model centre: OrbitControls' pan moves target with the camera, so
|
|
35
|
+
* after a pan target is off the model and a rotate would orbit an empty point. We snap
|
|
36
|
+
* target back on rotate start, but must NOT on pan/dolly (or the model jumps at pan start).
|
|
37
|
+
*
|
|
38
|
+
* Picking the wrong state constant is a silent bug (rotate not re-pivoting, or pan wrongly
|
|
39
|
+
* re-pivoting), so it is unit-tested.
|
|
40
|
+
*/
|
|
41
|
+
export declare function isRotateGesture(state: number): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Bounding box -> pivot + size + framing distance.
|
|
44
|
+
*
|
|
45
|
+
* fovDeg is read from the camera by the caller at runtime (copper3d uses 75); it is
|
|
46
|
+
* not hardcoded here.
|
|
47
|
+
*/
|
|
48
|
+
export declare function computeFraming(box: THREE.Box3, fovDeg: number): Framing;
|
|
49
|
+
/**
|
|
50
|
+
* Preset + pivot + distance -> camera pose.
|
|
51
|
+
*
|
|
52
|
+
* The preset's eyePosition is absolute; only its DIRECTION is taken here, and the
|
|
53
|
+
* distance comes from C5 auto-framing (the implicit 600 in the JSON is ignored).
|
|
54
|
+
*
|
|
55
|
+
* up must be Gram-Schmidt-orthogonalised against the view direction (decision D1):
|
|
56
|
+
* OrbitControls uses camera.up as its polar axis, and nrrd_view_coronal.json's up
|
|
57
|
+
* (0,1,-1) is not perpendicular to its own view direction (0,1,0) — feeding it raw
|
|
58
|
+
* gives a 45-degree-tilted pole. The old trackball path got away with it only because
|
|
59
|
+
* three's lookAt() orthogonalises internally.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveViewPose(preset: CameraViewPreset, pivot: THREE.Vector3, dist: number): ViewPose;
|
|
62
|
+
/**
|
|
63
|
+
* Far clipping plane (decision D2).
|
|
64
|
+
*
|
|
65
|
+
* The preset's farPlane is 1000, but a large volume's maxDistance (= size*5) can
|
|
66
|
+
* exceed it, which would clip the model when the user zooms all the way out.
|
|
67
|
+
*
|
|
68
|
+
* The Number.isFinite guard is required: right after construction and before the first
|
|
69
|
+
* frameBox, OrbitControls' maxDistance is still the default Infinity.
|
|
70
|
+
*/
|
|
71
|
+
export declare function resolveFarPlane(presetFar: number, maxDistance: number, dist: number): number;
|
|
@@ -9,5 +9,5 @@ export declare function computeImagePlaneCorners(ipp: number[], iop: number[], s
|
|
|
9
9
|
export declare function getLut(data: Uint16Array, windowWidth: number, windowCenter: number, invert: boolean, voiLUT: any): {
|
|
10
10
|
minPixelValue: number;
|
|
11
11
|
maxPixelValue: number;
|
|
12
|
-
lutArray: Uint8ClampedArray
|
|
12
|
+
lutArray: Uint8ClampedArray<ArrayBuffer>;
|
|
13
13
|
};
|
|
@@ -57,7 +57,7 @@ export declare class copperScene extends baseScene {
|
|
|
57
57
|
resetView(): void;
|
|
58
58
|
updateCamera(viewpoint: CameraViewPoint): void;
|
|
59
59
|
getCurrentTime(): number;
|
|
60
|
-
getCurrentMixer(): THREE.AnimationMixer | null;
|
|
60
|
+
getCurrentMixer(): THREE.AnimationMixer<THREE.AnimationMixerEventMap> | null;
|
|
61
61
|
updateControls(camera: THREE.PerspectiveCamera | THREE.OrthographicCamera): void;
|
|
62
62
|
onRenderCameraChange(): void;
|
|
63
63
|
render(time?: number): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function resize3dnrrd(pixels: Float32Array, dimOrigin: Array<number>, dimTarget: Array<number>): Float32Array
|
|
1
|
+
export declare function resize3dnrrd(pixels: Float32Array, dimOrigin: Array<number>, dimTarget: Array<number>): Float32Array<ArrayBuffer>;
|
|
@@ -255,7 +255,7 @@ export declare class MaskVolume {
|
|
|
255
255
|
* If undefined, all channels are visible.
|
|
256
256
|
* @param opacity Opacity multiplier 0.0–1.0 (default 1.0).
|
|
257
257
|
*/
|
|
258
|
-
renderLabelSliceInto(sliceIndex: number, axis: "
|
|
258
|
+
renderLabelSliceInto(sliceIndex: number, axis: "x" | "y" | "z" | undefined, target: ImageData, channelVisible?: Record<number, boolean>, opacity?: number): void;
|
|
259
259
|
/**
|
|
260
260
|
* Return a copy of the volume dimensions.
|
|
261
261
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IPaintImage } from "../segmentation/core/types";
|
|
2
|
-
declare function pruningData(originArr: IPaintImage[]):
|
|
2
|
+
declare function pruningData(originArr: IPaintImage[]): ImageDataArray[];
|
|
3
3
|
declare function restructData(originArr: IPaintImage[], len: number, width: number, height: number): {
|
|
4
4
|
sliceIndex: number;
|
|
5
5
|
dataFormat: string;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ import kiwrious from "./Utils/kiwrious/configKiwrious";
|
|
|
15
15
|
import { NrrdTools } from "./Utils/segmentation/NrrdTools";
|
|
16
16
|
import { GaussianSmoother } from "./Utils/segmentation/core/GaussianSmoother";
|
|
17
17
|
import { Copper3dTrackballControls } from "./Controls/Copper3dTrackballControls";
|
|
18
|
+
import { Copper3dOrbitControls } from "./Controls/Copper3dOrbitControls";
|
|
18
19
|
import { MeshNodeTool } from "./Utils/MeshNodeTool";
|
|
19
20
|
import { removeGuiFolderChilden } from "./Utils/segmentation/coreTools/gui";
|
|
20
21
|
import { SurfaceAnnotator } from "./Utils/surfaceAnnotation";
|
|
@@ -29,5 +30,6 @@ import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
|
|
|
29
30
|
import type { AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult } from "./Utils/segmentation/tools/AiAssistTool";
|
|
30
31
|
import "./css/style.css";
|
|
31
32
|
export declare const REVISION: string;
|
|
32
|
-
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, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, };
|
|
33
|
+
export { copperRenderer, copperRendererOnDemond, copperMSceneRenderer, setHDRFilePath, addLabelToScene, convert3DPostoScreenPos, convertScreenPosto3DPos, addBoxHelper, fullScreenListenner, configKiwriousHeart, copperScene, copperSceneOnDemond, copperMScene, CameraViewPoint, kiwrious, NrrdTools, loading, Copper3dTrackballControls, Copper3dOrbitControls, createTexture2D_NRRD, MeshNodeTool, throttle, removeGuiFolderChilden, CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_HEX_COLORS, rgbaToHex, rgbaToCss, GaussianSmoother, SurfaceAnnotator, };
|
|
33
34
|
export type { positionType, screenPosType, optsType, 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, LayerId, ChannelValue, AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult, SurfaceAnnotatorOptions, Annotation, AnnotationMode, ExportOptions, };
|
|
35
|
+
export type { CameraViewPreset } from "./Controls/orbitFraming";
|