@cornerstonejs/tools 4.18.4 → 5.0.0-beta.1
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/esm/tools/VolumeCroppingControlTool.d.ts +35 -10
- package/dist/esm/tools/VolumeCroppingControlTool.js +699 -179
- package/dist/esm/tools/VolumeCroppingTool.d.ts +32 -32
- package/dist/esm/tools/VolumeCroppingTool.js +525 -775
- package/dist/esm/utilities/index.d.ts +1 -2
- package/dist/esm/utilities/index.js +1 -2
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +3 -3
- package/dist/esm/utilities/draw3D/addLine3DBetweenPoints.d.ts +0 -7
- package/dist/esm/utilities/draw3D/addLine3DBetweenPoints.js +0 -34
- package/dist/esm/utilities/draw3D/calculateAdaptiveSphereRadius.d.ts +0 -6
- package/dist/esm/utilities/draw3D/calculateAdaptiveSphereRadius.js +0 -7
- package/dist/esm/utilities/draw3D/index.d.ts +0 -2
- package/dist/esm/utilities/draw3D/index.js +0 -2
- package/dist/esm/utilities/volumeCropping/computePlanePlaneIntersection.d.ts +0 -6
- package/dist/esm/utilities/volumeCropping/computePlanePlaneIntersection.js +0 -37
- package/dist/esm/utilities/volumeCropping/constants.d.ts +0 -31
- package/dist/esm/utilities/volumeCropping/constants.js +0 -31
- package/dist/esm/utilities/volumeCropping/copyClippingPlanes.d.ts +0 -2
- package/dist/esm/utilities/volumeCropping/copyClippingPlanes.js +0 -6
- package/dist/esm/utilities/volumeCropping/extractVolumeDirectionVectors.d.ts +0 -9
- package/dist/esm/utilities/volumeCropping/extractVolumeDirectionVectors.js +0 -9
- package/dist/esm/utilities/volumeCropping/findLineBoundsIntersection.d.ts +0 -5
- package/dist/esm/utilities/volumeCropping/findLineBoundsIntersection.js +0 -50
- package/dist/esm/utilities/volumeCropping/getColorKeyForPlaneIndex.d.ts +0 -1
- package/dist/esm/utilities/volumeCropping/getColorKeyForPlaneIndex.js +0 -13
- package/dist/esm/utilities/volumeCropping/getOrientationFromNormal.d.ts +0 -2
- package/dist/esm/utilities/volumeCropping/getOrientationFromNormal.js +0 -19
- package/dist/esm/utilities/volumeCropping/index.d.ts +0 -9
- package/dist/esm/utilities/volumeCropping/index.js +0 -9
- package/dist/esm/utilities/volumeCropping/parseCornerKey.d.ts +0 -8
- package/dist/esm/utilities/volumeCropping/parseCornerKey.js +0 -11
- package/dist/esm/utilities/volumeCropping/types.d.ts +0 -5
- package/dist/esm/utilities/volumeCropping/types.js +0 -0
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData';
|
|
2
2
|
import vtkActor from '@kitware/vtk.js/Rendering/Core/Actor';
|
|
3
|
-
import type vtkVolumeMapper from '@kitware/vtk.js/Rendering/Core/VolumeMapper';
|
|
4
3
|
import { BaseTool } from './base';
|
|
5
4
|
import type { Types } from '@cornerstonejs/core';
|
|
6
5
|
import type { EventTypes, PublicToolProps, ToolProps } from '../types';
|
|
7
|
-
import { type ClippingPlane } from '../utilities/volumeCropping';
|
|
8
6
|
declare class VolumeCroppingTool extends BaseTool {
|
|
9
7
|
static toolName: any;
|
|
10
8
|
seriesInstanceUID?: string;
|
|
@@ -14,16 +12,14 @@ declare class VolumeCroppingTool extends BaseTool {
|
|
|
14
12
|
_resizeObservers: Map<any, any>;
|
|
15
13
|
_viewportAddedListener: (evt: any) => void;
|
|
16
14
|
_hasResolutionChanged: boolean;
|
|
17
|
-
originalClippingPlanes:
|
|
15
|
+
originalClippingPlanes: {
|
|
16
|
+
origin: number[];
|
|
17
|
+
normal: number[];
|
|
18
|
+
}[];
|
|
18
19
|
draggingSphereIndex: number | null;
|
|
19
|
-
|
|
20
|
+
toolCenter: Types.Point3;
|
|
20
21
|
cornerDragOffset: [number, number, number] | null;
|
|
21
22
|
faceDragOffset: number | null;
|
|
22
|
-
volumeDirectionVectors: {
|
|
23
|
-
xDir: Types.Point3;
|
|
24
|
-
yDir: Types.Point3;
|
|
25
|
-
zDir: Types.Point3;
|
|
26
|
-
} | null;
|
|
27
23
|
sphereStates: {
|
|
28
24
|
point: Types.Point3;
|
|
29
25
|
axis: string;
|
|
@@ -52,25 +48,42 @@ declare class VolumeCroppingTool extends BaseTool {
|
|
|
52
48
|
getHandlesVisible(): any;
|
|
53
49
|
getClippingPlanesVisible(): any;
|
|
54
50
|
setClippingPlanesVisible(visible: boolean): void;
|
|
55
|
-
getRotatePlanesOnDrag(): boolean;
|
|
56
|
-
setRotatePlanesOnDrag(enable: boolean): void;
|
|
57
51
|
_dragCallback(evt: EventTypes.InteractionEventType): void;
|
|
58
52
|
_onMouseMoveSphere: (evt: any) => boolean;
|
|
59
53
|
_onControlToolChange: (evt: any) => void;
|
|
60
54
|
_updateClippingPlanes(viewport: any): void;
|
|
61
55
|
_updateHandlesVisibility(): void;
|
|
56
|
+
_addLine3DBetweenPoints(viewport: any, point1: any, point2: any, color?: [number, number, number], uid?: string): {
|
|
57
|
+
actor: vtkActor;
|
|
58
|
+
source: vtkPolyData;
|
|
59
|
+
};
|
|
62
60
|
_getViewportsInfo: () => any[];
|
|
63
|
-
_addSphere(viewport:
|
|
64
|
-
|
|
65
|
-
_initialize3DViewports: (viewportsInfo:
|
|
61
|
+
_addSphere(viewport: any, point: any, axis: any, position: any, cornerKey: any, adaptiveRadius: any): void;
|
|
62
|
+
_calculateAdaptiveSphereRadius(diagonal: any): number;
|
|
63
|
+
_initialize3DViewports: (viewportsInfo: any) => void;
|
|
66
64
|
_getViewportAndWorldCoords: (evt: any) => {
|
|
67
|
-
viewport: import("@cornerstonejs/core").
|
|
65
|
+
viewport: import("@cornerstonejs/core").Viewport;
|
|
68
66
|
world: Types.Point3;
|
|
69
67
|
};
|
|
70
|
-
_getViewport: () =>
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
68
|
+
_getViewport: () => import("@cornerstonejs/core").Viewport;
|
|
69
|
+
_handleCornerSphereMovement: (sphereState: any, world: any, viewport: any) => void;
|
|
70
|
+
_handleFaceSphereMovement: (sphereState: any, world: any, viewport: any) => void;
|
|
71
|
+
_calculateNewCornerPosition: (world: any) => any[];
|
|
72
|
+
_parseCornerKey: (uid: any) => {
|
|
73
|
+
isXMin: any;
|
|
74
|
+
isXMax: any;
|
|
75
|
+
isYMin: any;
|
|
76
|
+
isYMax: any;
|
|
77
|
+
isZMin: any;
|
|
78
|
+
isZMax: any;
|
|
79
|
+
};
|
|
80
|
+
_updateSpherePosition: (sphereState: any, newPosition: any) => void;
|
|
81
|
+
_updateRelatedCorners: (draggedSphere: any, newCorner: any, axisFlags: any) => void;
|
|
82
|
+
_shouldUpdateCorner: (cornerKey: any, axisFlags: any) => any;
|
|
83
|
+
_updateCornerCoordinates: (state: any, newCorner: any, cornerKey: any, axisFlags: any) => void;
|
|
84
|
+
_updateAfterCornerMovement: (viewport: any) => void;
|
|
85
|
+
_updateAfterFaceMovement: (viewport: any) => void;
|
|
86
|
+
_triggerToolChangedEvent: (sphereState: any) => void;
|
|
74
87
|
_updateClippingPlanesFromFaceSpheres(viewport: any): void;
|
|
75
88
|
_updateCornerSpheresFromFaces(): void;
|
|
76
89
|
_updateFaceSpheresFromCorners(): void;
|
|
@@ -78,19 +91,6 @@ declare class VolumeCroppingTool extends BaseTool {
|
|
|
78
91
|
_onNewVolume: () => void;
|
|
79
92
|
_unsubscribeToViewportNewVolumeSet(viewportsInfo: any): void;
|
|
80
93
|
_subscribeToViewportNewVolumeSet(viewports: any): void;
|
|
81
|
-
_rotateClippingPlanes: (evt: EventTypes.InteractionEventType) => void;
|
|
82
|
-
_getDirectionVectors(): {
|
|
83
|
-
xDir: Types.Point3;
|
|
84
|
-
yDir: Types.Point3;
|
|
85
|
-
zDir: Types.Point3;
|
|
86
|
-
};
|
|
87
|
-
_updateSpherePosition(sphereIndex: number, newPoint: Types.Point3): void;
|
|
88
|
-
_updateFaceSpheresFromClippingPlanes(): void;
|
|
89
|
-
_averagePoints(points: Types.Point3[]): Types.Point3;
|
|
90
|
-
_notifyClippingPlanesChanged(viewport?: any): void;
|
|
91
|
-
_calculateCornerFromFaces(faceX: Types.Point3, faceY: Types.Point3, faceZ: Types.Point3, xDir: Types.Point3, yDir: Types.Point3, zDir: Types.Point3): Types.Point3;
|
|
92
|
-
_calculateCornerFromProjection(faceX: Types.Point3, faceY: Types.Point3, faceZ: Types.Point3, xDir: Types.Point3, yDir: Types.Point3, zDir: Types.Point3): Types.Point3;
|
|
93
|
-
_updateEdgeLines(): void;
|
|
94
94
|
_rotateCamera: (viewport: any, centerWorld: any, axis: any, angle: any) => void;
|
|
95
95
|
}
|
|
96
96
|
export default VolumeCroppingTool;
|