copper3d 3.6.2 → 3.6.5
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/Loader/copperNrrdLoader.js +1 -1
- package/dist/Loader/copperNrrdLoader.js.map +1 -1
- package/dist/Scene/copperScene.d.ts +4 -4
- package/dist/Scene/copperScene.js +4 -4
- package/dist/Scene/copperScene.js.map +1 -1
- package/dist/Utils/segmentation/NrrdTools.d.ts +41 -2
- package/dist/Utils/segmentation/NrrdTools.js +30 -2
- package/dist/Utils/segmentation/NrrdTools.js.map +1 -1
- package/dist/Utils/segmentation/tools/AiAssistTool.d.ts +108 -5
- package/dist/Utils/segmentation/tools/AiAssistTool.js +408 -25
- package/dist/Utils/segmentation/tools/AiAssistTool.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/MeshGraph.d.ts +12 -10
- package/dist/Utils/surfaceAnnotation/MeshGraph.js +14 -12
- package/dist/Utils/surfaceAnnotation/MeshGraph.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/SurfaceAnnotator.d.ts +48 -28
- package/dist/Utils/surfaceAnnotation/SurfaceAnnotator.js +76 -50
- package/dist/Utils/surfaceAnnotation/SurfaceAnnotator.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/annotationStore.d.ts +4 -4
- package/dist/Utils/surfaceAnnotation/annotationStore.js +4 -4
- package/dist/Utils/surfaceAnnotation/annotationStore.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/contourRender.d.ts +1 -1
- package/dist/Utils/surfaceAnnotation/contourRender.js +16 -11
- package/dist/Utils/surfaceAnnotation/contourRender.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/geodesicContour.d.ts +11 -10
- package/dist/Utils/surfaceAnnotation/geodesicContour.js +16 -15
- package/dist/Utils/surfaceAnnotation/geodesicContour.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/pointMarkers.d.ts +3 -2
- package/dist/Utils/surfaceAnnotation/pointMarkers.js +6 -2
- package/dist/Utils/surfaceAnnotation/pointMarkers.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/raycastSurface.d.ts +3 -2
- package/dist/Utils/surfaceAnnotation/raycastSurface.js +71 -5
- package/dist/Utils/surfaceAnnotation/raycastSurface.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/strokeContour.d.ts +9 -6
- package/dist/Utils/surfaceAnnotation/strokeContour.js +15 -10
- package/dist/Utils/surfaceAnnotation/strokeContour.js.map +1 -1
- package/dist/Utils/surfaceAnnotation/types.d.ts +5 -5
- package/dist/Utils/surfaceAnnotation/types.js +2 -2
- package/dist/Utils/surfaceAnnotation/types.js.map +1 -1
- package/dist/Utils/texture2d.js +4 -2
- package/dist/Utils/texture2d.js.map +1 -1
- package/dist/Utils/workers/reformatSaveDataWorker.js +2 -2
- package/dist/Utils/workers/reformatSaveDataWorker.js.map +1 -1
- package/dist/bundle.esm.js +684 -157
- package/dist/bundle.umd.js +684 -157
- package/dist/index.d.ts +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/three-vignette.js +8 -2
- package/dist/lib/three-vignette.js.map +1 -1
- package/dist/types/Scene/copperScene.d.ts +4 -4
- package/dist/types/Utils/segmentation/NrrdTools.d.ts +41 -2
- package/dist/types/Utils/segmentation/tools/AiAssistTool.d.ts +108 -5
- package/dist/types/Utils/surfaceAnnotation/MeshGraph.d.ts +12 -10
- package/dist/types/Utils/surfaceAnnotation/SurfaceAnnotator.d.ts +48 -28
- package/dist/types/Utils/surfaceAnnotation/annotationStore.d.ts +4 -4
- package/dist/types/Utils/surfaceAnnotation/contourRender.d.ts +1 -1
- package/dist/types/Utils/surfaceAnnotation/geodesicContour.d.ts +11 -10
- package/dist/types/Utils/surfaceAnnotation/pointMarkers.d.ts +3 -2
- package/dist/types/Utils/surfaceAnnotation/raycastSurface.d.ts +3 -2
- package/dist/types/Utils/surfaceAnnotation/strokeContour.d.ts +9 -6
- package/dist/types/Utils/surfaceAnnotation/types.d.ts +5 -5
- package/dist/types/index.d.ts +1 -1
- package/package.json +2 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as THREE from "three";
|
|
2
2
|
import type { AnnotationVertex, SurfaceHit } from "./types";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
* pointermove
|
|
6
|
-
*
|
|
4
|
+
* State machine for one stroke in mode A (freehand).
|
|
5
|
+
* On pointermove it keeps calling addSample; samples whose world distance from the previous
|
|
6
|
+
* sample is < minGap are dropped to avoid over-density.
|
|
7
|
+
* Vertices are stored in local space (the mesh converts the world hit point to local).
|
|
7
8
|
*/
|
|
8
9
|
export declare class StrokeContour {
|
|
9
10
|
private minGap;
|
|
@@ -14,9 +15,11 @@ export declare class StrokeContour {
|
|
|
14
15
|
private lastNormal;
|
|
15
16
|
private has;
|
|
16
17
|
/**
|
|
17
|
-
* @param minGap
|
|
18
|
-
* @param maxJump
|
|
19
|
-
*
|
|
18
|
+
* @param minGap minimum sample spacing (world space), debounce
|
|
19
|
+
* @param maxJump jump threshold (world space): drop the sample when distance > maxJump and the
|
|
20
|
+
* normal flips sharply, to prevent adjacent points landing at different depths
|
|
21
|
+
* (and the straight segment cutting through the model) when the stroke grazes a
|
|
22
|
+
* groove or contour edge.
|
|
20
23
|
*/
|
|
21
24
|
constructor(minGap: number, maxJump: number, mesh: THREE.Mesh);
|
|
22
25
|
begin(): void;
|
|
@@ -5,7 +5,7 @@ export interface SurfaceHit {
|
|
|
5
5
|
normal: THREE.Vector3;
|
|
6
6
|
faceIndex: number;
|
|
7
7
|
}
|
|
8
|
-
/**
|
|
8
|
+
/** Annotation vertex: position and normal are both in **model local space** (single source of truth, unaffected by camera/placement). */
|
|
9
9
|
export interface AnnotationVertex {
|
|
10
10
|
x: number;
|
|
11
11
|
y: number;
|
|
@@ -26,14 +26,14 @@ export interface Annotation {
|
|
|
26
26
|
object3D: THREE.Object3D | null;
|
|
27
27
|
}
|
|
28
28
|
export interface ExportOptions {
|
|
29
|
-
/**
|
|
29
|
+
/** Export coordinate space, defaults to "local" (model space, reproducible and unaffected by camera/placement). */
|
|
30
30
|
space?: "local" | "world";
|
|
31
|
-
/**
|
|
31
|
+
/** Whether to attach a normal to each point [x,y,z,nx,ny,nz]. */
|
|
32
32
|
includeNormals?: boolean;
|
|
33
33
|
}
|
|
34
|
-
/**
|
|
34
|
+
/** World-space hit point → local vertex (position via worldToLocal, normal via inverse transform). */
|
|
35
35
|
export declare function worldHitToLocalVertex(h: SurfaceHit, mesh: THREE.Mesh): AnnotationVertex;
|
|
36
|
-
/**
|
|
36
|
+
/** Local vertex → world position + world normal (for rendering). */
|
|
37
37
|
export declare function localVertexToWorld(v: AnnotationVertex, mesh: THREE.Mesh): {
|
|
38
38
|
p: THREE.Vector3;
|
|
39
39
|
n: THREE.Vector3;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -28,6 +28,6 @@ import { CHANNEL_COLORS, CHANNEL_HEX_COLORS, AI_MASK_CHANNEL_COLORS, AI_CHANNEL_
|
|
|
28
28
|
import type { LayerId, ChannelValue } from "./Utils/segmentation/core/index";
|
|
29
29
|
import type { AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult } from "./Utils/segmentation/tools/AiAssistTool";
|
|
30
30
|
import "./css/style.css";
|
|
31
|
-
export declare const REVISION
|
|
31
|
+
export declare const REVISION: string;
|
|
32
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
33
|
export type { positionType, screenPosType, optsType, nrrdMeshesType, nrrdSliceType, SensorDecodedValue_kiwrious, SensorReadResult_kiwrious, HeartRateResult_kiwrious, loadingBarType, IPaintImage, exportPaintImageType, IOptVTKLoader, aligned4DSurfaceType, aligned4DOptsType, Aligned4DController, ICommXYZ, IGUIStates, IGuiParameterSettings, INrrdStates, NrrdState, GuiState, IGuiMeta, ToolMode, IAnnotationCallbacks, LayerId, ChannelValue, AiPromptTool, AiPromptPoint, AiPromptPayload, AiMaskResult, SurfaceAnnotatorOptions, Annotation, AnnotationMode, ExportOptions, };
|
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.6.
|
|
4
|
+
"version": "3.6.5",
|
|
5
5
|
"main": "dist/bundle.umd.js",
|
|
6
6
|
"moudle": "dist/bundle.esm.js",
|
|
7
7
|
"types": "dist/types/index.d.ts",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"homepage": "https://github.com/LinkunGao/copper3d_visualisation#readme",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rollup/plugin-image": "^2.1.1",
|
|
35
|
+
"@rollup/plugin-replace": "^4.0.0",
|
|
35
36
|
"@rollup/plugin-typescript": "^8.3.2",
|
|
36
37
|
"@types/file-saver": "^2.0.5",
|
|
37
38
|
"postcss": "^8.4.14",
|