@cornerstonejs/tools 4.18.2 → 4.18.4
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 +10 -35
- package/dist/esm/tools/VolumeCroppingControlTool.js +179 -699
- package/dist/esm/tools/VolumeCroppingTool.d.ts +32 -32
- package/dist/esm/tools/VolumeCroppingTool.js +775 -525
- package/dist/esm/utilities/draw3D/addLine3DBetweenPoints.d.ts +7 -0
- package/dist/esm/utilities/draw3D/addLine3DBetweenPoints.js +34 -0
- package/dist/esm/utilities/draw3D/calculateAdaptiveSphereRadius.d.ts +6 -0
- package/dist/esm/utilities/draw3D/calculateAdaptiveSphereRadius.js +7 -0
- package/dist/esm/utilities/draw3D/index.d.ts +2 -0
- package/dist/esm/utilities/draw3D/index.js +2 -0
- package/dist/esm/utilities/index.d.ts +2 -1
- package/dist/esm/utilities/index.js +2 -1
- package/dist/esm/utilities/volumeCropping/computePlanePlaneIntersection.d.ts +6 -0
- package/dist/esm/utilities/volumeCropping/computePlanePlaneIntersection.js +37 -0
- package/dist/esm/utilities/volumeCropping/constants.d.ts +31 -0
- package/dist/esm/utilities/volumeCropping/constants.js +31 -0
- package/dist/esm/utilities/volumeCropping/copyClippingPlanes.d.ts +2 -0
- package/dist/esm/utilities/volumeCropping/copyClippingPlanes.js +6 -0
- package/dist/esm/utilities/volumeCropping/extractVolumeDirectionVectors.d.ts +9 -0
- package/dist/esm/utilities/volumeCropping/extractVolumeDirectionVectors.js +9 -0
- package/dist/esm/utilities/volumeCropping/findLineBoundsIntersection.d.ts +5 -0
- package/dist/esm/utilities/volumeCropping/findLineBoundsIntersection.js +50 -0
- package/dist/esm/utilities/volumeCropping/getColorKeyForPlaneIndex.d.ts +1 -0
- package/dist/esm/utilities/volumeCropping/getColorKeyForPlaneIndex.js +13 -0
- package/dist/esm/utilities/volumeCropping/getOrientationFromNormal.d.ts +2 -0
- package/dist/esm/utilities/volumeCropping/getOrientationFromNormal.js +19 -0
- package/dist/esm/utilities/volumeCropping/index.d.ts +9 -0
- package/dist/esm/utilities/volumeCropping/index.js +9 -0
- package/dist/esm/utilities/volumeCropping/parseCornerKey.d.ts +8 -0
- package/dist/esm/utilities/volumeCropping/parseCornerKey.js +11 -0
- package/dist/esm/utilities/volumeCropping/types.d.ts +5 -0
- package/dist/esm/utilities/volumeCropping/types.js +0 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type vtkPlane from '@kitware/vtk.js/Common/DataModel/Plane';
|
|
2
1
|
import { AnnotationTool } from './base';
|
|
3
2
|
import type { Types } from '@cornerstonejs/core';
|
|
4
3
|
import type { Annotation, Annotations, EventTypes, ToolHandle, PublicToolProps, ToolProps, InteractionTypes, SVGDrawingHelper } from '../types';
|
|
4
|
+
import { type ClippingPlane } from '../utilities/volumeCropping';
|
|
5
5
|
type ReferenceLine = [
|
|
6
6
|
viewport: {
|
|
7
7
|
id: string;
|
|
@@ -10,60 +10,39 @@ type ReferenceLine = [
|
|
|
10
10
|
},
|
|
11
11
|
startPoint: Types.Point2,
|
|
12
12
|
endPoint: Types.Point2,
|
|
13
|
-
type: 'min' | 'max'
|
|
13
|
+
type: 'min' | 'max',
|
|
14
|
+
planeIndex?: number
|
|
14
15
|
];
|
|
15
16
|
interface VolumeCroppingAnnotation extends Annotation {
|
|
16
17
|
data: {
|
|
17
18
|
handles: {
|
|
18
19
|
activeOperation: number | null;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
activeType?: 'min' | 'max';
|
|
21
|
+
activePlaneIndex?: number;
|
|
22
|
+
clippingPlanes: ClippingPlane[];
|
|
22
23
|
};
|
|
23
24
|
activeViewportIds: string[];
|
|
24
25
|
viewportId: string;
|
|
25
26
|
referenceLines: ReferenceLine[];
|
|
26
|
-
clippingPlanes?: vtkPlane[];
|
|
27
|
-
clippingPlaneReferenceLines?: ReferenceLine[];
|
|
28
27
|
orientation?: string;
|
|
29
28
|
};
|
|
30
|
-
isVirtual?: boolean;
|
|
31
|
-
virtualNormal?: Types.Point3;
|
|
32
29
|
}
|
|
33
30
|
declare class VolumeCroppingControlTool extends AnnotationTool {
|
|
34
|
-
_virtualAnnotations: VolumeCroppingAnnotation[];
|
|
35
31
|
static toolName: any;
|
|
36
32
|
seriesInstanceUID?: string;
|
|
37
|
-
|
|
38
|
-
point: Types.Point3;
|
|
39
|
-
axis: string;
|
|
40
|
-
uid: string;
|
|
41
|
-
sphereSource: any;
|
|
42
|
-
sphereActor: any;
|
|
43
|
-
}[];
|
|
44
|
-
draggingSphereIndex: number | null;
|
|
45
|
-
toolCenter: Types.Point3;
|
|
46
|
-
toolCenterMin: Types.Point3;
|
|
47
|
-
toolCenterMax: Types.Point3;
|
|
33
|
+
clippingPlanes: ClippingPlane[];
|
|
48
34
|
_getReferenceLineColor?: (viewportId: string) => string;
|
|
49
35
|
_getReferenceLineControllable?: (viewportId: string) => boolean;
|
|
50
36
|
constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
|
|
51
|
-
|
|
52
|
-
initializeViewport: ({ renderingEngineId, viewportId, }: Types.IViewportId) => {
|
|
53
|
-
normal: Types.Point3;
|
|
54
|
-
point: Types.Point3;
|
|
55
|
-
};
|
|
37
|
+
initializeViewport: ({ renderingEngineId, viewportId, }: Types.IViewportId) => void;
|
|
56
38
|
_getViewportsInfo: () => any[];
|
|
57
39
|
onSetToolInactive(): void;
|
|
58
40
|
onSetToolActive(): void;
|
|
59
41
|
onSetToolEnabled(): void;
|
|
60
42
|
onSetToolDisabled(): void;
|
|
61
43
|
resetCroppingSpheres: () => void;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
_getOrientationFromNormal(normal: Types.Point3): string | null;
|
|
65
|
-
_syncWithVolumeCroppingTool(originalClippingPlanes: any): void;
|
|
66
|
-
setToolCenter(toolCenter: Types.Point3, handleType: any): void;
|
|
44
|
+
_initializeViewports: (viewportsInfo: Types.IViewportId[]) => void;
|
|
45
|
+
_syncWithVolumeCroppingTool(originalClippingPlanes: ClippingPlane[]): void;
|
|
67
46
|
addNewAnnotation(evt: EventTypes.InteractionEventType): VolumeCroppingAnnotation;
|
|
68
47
|
cancel: () => void;
|
|
69
48
|
isPointNearTool: (element: HTMLDivElement, annotation: VolumeCroppingAnnotation, canvasCoords: Types.Point2, proximity: number) => boolean;
|
|
@@ -78,14 +57,10 @@ declare class VolumeCroppingControlTool extends AnnotationTool {
|
|
|
78
57
|
_onNewVolume: () => void;
|
|
79
58
|
_unsubscribeToViewportNewVolumeSet(viewportsInfo: any): void;
|
|
80
59
|
_subscribeToViewportNewVolumeSet(viewports: any): void;
|
|
81
|
-
_getAnnotationsForViewportsWithDifferentCameras: (enabledElement: any, annotations: any) => any;
|
|
82
|
-
_filterViewportWithSameOrientation: (enabledElement: any, referenceAnnotation: any, annotations: any) => any;
|
|
83
60
|
_activateModify: (element: any) => void;
|
|
84
61
|
_deactivateModify: (element: any) => void;
|
|
85
62
|
_endCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
86
63
|
_dragCallback: (evt: EventTypes.InteractionEventType) => void;
|
|
87
|
-
_applyDeltaShiftToSelectedViewportCameras(renderingEngine: any, viewportsAnnotationsToUpdate: any, delta: any): void;
|
|
88
|
-
_applyDeltaShiftToViewportCamera(renderingEngine: Types.IRenderingEngine, annotation: any, delta: any): void;
|
|
89
64
|
_pointNearTool(element: any, annotation: any, canvasCoords: any, proximity: any): boolean;
|
|
90
65
|
}
|
|
91
66
|
export default VolumeCroppingControlTool;
|