@cornerstonejs/tools 2.0.0-beta.3 → 2.0.0-beta.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/cjs/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +1 -1
- package/dist/cjs/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +1 -1
- package/dist/cjs/eventListeners/keyboard/keyDownListener.js +1 -2
- package/dist/cjs/eventListeners/keyboard/keyDownListener.js.map +1 -1
- package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +4 -8
- package/dist/cjs/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js +2 -3
- package/dist/cjs/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/addSegmentationRepresentations.js.map +1 -1
- package/dist/cjs/stateManagement/segmentation/addSegmentations.js +1 -5
- package/dist/cjs/stateManagement/segmentation/addSegmentations.js.map +1 -1
- package/dist/cjs/store/ToolGroupManager/ToolGroup.js +1 -2
- package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
- package/dist/cjs/store/state.js +1 -5
- package/dist/cjs/store/state.js.map +1 -1
- package/dist/cjs/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
- package/dist/cjs/tools/AdvancedMagnifyViewport.d.ts +2 -2
- package/dist/cjs/tools/AdvancedMagnifyViewportManager.d.ts +1 -1
- package/dist/cjs/tools/displayTools/Contour/contourConfigCache.d.ts +1 -1
- package/dist/cjs/tools/segmentation/strategies/eraseCircle.d.ts +1 -1
- package/dist/cjs/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
- package/dist/cjs/tools/segmentation/strategies/eraseSphere.d.ts +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillCircle.d.ts +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
- package/dist/cjs/tools/segmentation/strategies/fillSphere.d.ts +1 -1
- package/dist/cjs/types/AnnotationGroupSelector.d.ts +1 -1
- package/dist/cjs/types/AnnotationStyle.d.ts +7 -7
- package/dist/cjs/types/AnnotationTypes.d.ts +4 -4
- package/dist/cjs/types/BoundsIJK.d.ts +1 -1
- package/dist/cjs/types/CINETypes.d.ts +2 -2
- package/dist/cjs/types/CalculatorTypes.d.ts +1 -1
- package/dist/cjs/types/ContourTypes.d.ts +3 -3
- package/dist/cjs/types/CursorTypes.d.ts +2 -2
- package/dist/cjs/types/EventTypes.d.ts +81 -81
- package/dist/cjs/types/FloodFillTypes.d.ts +5 -5
- package/dist/cjs/types/IDistance.d.ts +1 -1
- package/dist/cjs/types/IPoints.d.ts +1 -1
- package/dist/cjs/types/ISetToolModeOptions.d.ts +5 -5
- package/dist/cjs/types/IToolClassReference.d.ts +1 -1
- package/dist/cjs/types/ITouchPoints.d.ts +1 -1
- package/dist/cjs/types/InteractionTypes.d.ts +1 -1
- package/dist/cjs/types/InternalToolTypes.d.ts +3 -3
- package/dist/cjs/types/JumpToSliceOptions.d.ts +1 -1
- package/dist/cjs/types/LabelmapTypes.d.ts +3 -3
- package/dist/cjs/types/PlanarBoundingBox.d.ts +1 -1
- package/dist/cjs/types/SVGDrawingHelper.d.ts +1 -1
- package/dist/cjs/types/ScrollOptions.d.ts +1 -1
- package/dist/cjs/types/SegmentationStateTypes.d.ts +15 -15
- package/dist/cjs/types/ToolAction.d.ts +1 -1
- package/dist/cjs/types/ToolHandle.d.ts +3 -3
- package/dist/cjs/types/ToolProps.d.ts +4 -4
- package/dist/cjs/utilities/getModalityUnit.d.ts +1 -1
- package/dist/cjs/utilities/getToolsWithModesForElement.d.ts +1 -1
- package/dist/cjs/utilities/math/angle/angleBetweenLines.d.ts +3 -3
- package/dist/cjs/utilities/math/basic/BasicStatsCalculator.js.map +1 -1
- package/dist/cjs/utilities/math/circle/_types.d.ts +1 -1
- package/dist/cjs/utilities/math/ellipse/getCanvasEllipseCorners.d.ts +1 -1
- package/dist/cjs/utilities/math/ellipse/pointInEllipse.d.ts +1 -1
- package/dist/cjs/utilities/math/ellipse/pointInEllipsoidWithConstraint.d.ts +1 -1
- package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +3 -3
- package/dist/cjs/utilities/math/sphere/pointInSphere.d.ts +1 -1
- package/dist/cjs/utilities/pointInShapeCallback.d.ts +3 -3
- package/dist/cjs/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.d.ts +1 -1
- package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +8 -8
- package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -2
- package/dist/cjs/utilities/segmentation/createLabelmapVolumeForViewport.js.map +1 -1
- package/dist/cjs/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +2 -2
- package/dist/cjs/utilities/segmentation/thresholdVolumeByRange.d.ts +1 -1
- package/dist/cjs/utilities/segmentation/utilities.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +1 -1
- package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +1 -1
- package/dist/esm/eventListeners/keyboard/keyDownListener.js +1 -2
- package/dist/esm/eventListeners/keyboard/keyDownListener.js.map +1 -1
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js +4 -5
- package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +2 -3
- package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.js.map +1 -1
- package/dist/esm/stateManagement/segmentation/addSegmentations.js +1 -2
- package/dist/esm/stateManagement/segmentation/addSegmentations.js.map +1 -1
- package/dist/esm/store/ToolGroupManager/ToolGroup.js +1 -2
- package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
- package/dist/esm/store/state.js +9 -2
- package/dist/esm/store/state.js.map +1 -1
- package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
- package/dist/esm/tools/AdvancedMagnifyViewport.d.ts +2 -2
- package/dist/esm/tools/AdvancedMagnifyViewportManager.d.ts +1 -1
- package/dist/esm/tools/OrientationMarkerTool.js +4 -4
- package/dist/esm/tools/OrientationMarkerTool.js.map +1 -1
- package/dist/esm/tools/displayTools/Contour/contourConfigCache.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/eraseCircle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/eraseSphere.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillCircle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
- package/dist/esm/tools/segmentation/strategies/fillSphere.d.ts +1 -1
- package/dist/esm/types/AnnotationGroupSelector.d.ts +1 -1
- package/dist/esm/types/AnnotationStyle.d.ts +7 -7
- package/dist/esm/types/AnnotationTypes.d.ts +4 -4
- package/dist/esm/types/BoundsIJK.d.ts +1 -1
- package/dist/esm/types/CINETypes.d.ts +2 -2
- package/dist/esm/types/CalculatorTypes.d.ts +1 -1
- package/dist/esm/types/ContourTypes.d.ts +3 -3
- package/dist/esm/types/CursorTypes.d.ts +2 -2
- package/dist/esm/types/EventTypes.d.ts +81 -81
- package/dist/esm/types/FloodFillTypes.d.ts +5 -5
- package/dist/esm/types/IDistance.d.ts +1 -1
- package/dist/esm/types/IPoints.d.ts +1 -1
- package/dist/esm/types/ISetToolModeOptions.d.ts +5 -5
- package/dist/esm/types/IToolClassReference.d.ts +1 -1
- package/dist/esm/types/ITouchPoints.d.ts +1 -1
- package/dist/esm/types/InteractionTypes.d.ts +1 -1
- package/dist/esm/types/InternalToolTypes.d.ts +3 -3
- package/dist/esm/types/JumpToSliceOptions.d.ts +1 -1
- package/dist/esm/types/LabelmapTypes.d.ts +3 -3
- package/dist/esm/types/PlanarBoundingBox.d.ts +1 -1
- package/dist/esm/types/SVGDrawingHelper.d.ts +1 -1
- package/dist/esm/types/ScrollOptions.d.ts +1 -1
- package/dist/esm/types/SegmentationStateTypes.d.ts +15 -15
- package/dist/esm/types/ToolAction.d.ts +1 -1
- package/dist/esm/types/ToolHandle.d.ts +3 -3
- package/dist/esm/types/ToolProps.d.ts +4 -4
- package/dist/esm/utilities/getModalityUnit.d.ts +1 -1
- package/dist/esm/utilities/getToolsWithModesForElement.d.ts +1 -1
- package/dist/esm/utilities/math/angle/angleBetweenLines.d.ts +3 -3
- package/dist/esm/utilities/math/basic/BasicStatsCalculator.js.map +1 -1
- package/dist/esm/utilities/math/circle/_types.d.ts +1 -1
- package/dist/esm/utilities/math/ellipse/getCanvasEllipseCorners.d.ts +1 -1
- package/dist/esm/utilities/math/ellipse/pointInEllipse.d.ts +1 -1
- package/dist/esm/utilities/math/ellipse/pointInEllipsoidWithConstraint.d.ts +1 -1
- package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +3 -3
- package/dist/esm/utilities/math/sphere/pointInSphere.d.ts +1 -1
- package/dist/esm/utilities/pointInShapeCallback.d.ts +3 -3
- package/dist/esm/utilities/rectangleROITool/getBoundsIJKFromRectangleAnnotations.d.ts +1 -1
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +8 -8
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -2
- package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js.map +1 -1
- package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +2 -2
- package/dist/esm/utilities/segmentation/thresholdVolumeByRange.d.ts +1 -1
- package/dist/esm/utilities/segmentation/utilities.d.ts +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.map +1 -1
- package/package.json +3 -3
- package/src/eventListeners/keyboard/keyDownListener.ts +1 -2
- package/src/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.ts +4 -5
- package/src/stateManagement/segmentation/SegmentationStateManager.ts +2 -3
- package/src/stateManagement/segmentation/addSegmentationRepresentations.ts +0 -1
- package/src/stateManagement/segmentation/addSegmentations.ts +1 -2
- package/src/store/ToolGroupManager/ToolGroup.ts +1 -2
- package/src/store/state.ts +9 -3
- package/src/utilities/segmentation/createLabelmapVolumeForViewport.ts +9 -10
|
@@ -6,26 +6,26 @@ import IDistance from './IDistance';
|
|
|
6
6
|
import { SetToolBindingsType } from './ISetToolModeOptions';
|
|
7
7
|
import { Swipe } from '../enums/Touch';
|
|
8
8
|
import { ToolModes } from '../enums';
|
|
9
|
-
|
|
9
|
+
type NormalizedInteractionEventDetail = {
|
|
10
10
|
eventName: string;
|
|
11
11
|
renderingEngineId: string;
|
|
12
12
|
viewportId: string;
|
|
13
13
|
camera: Record<string, unknown>;
|
|
14
14
|
element: HTMLDivElement;
|
|
15
15
|
};
|
|
16
|
-
|
|
16
|
+
type MouseCustomEventDetail = NormalizedInteractionEventDetail & {
|
|
17
17
|
event: Record<string, unknown> | MouseEvent;
|
|
18
18
|
};
|
|
19
|
-
|
|
19
|
+
type TouchCustomEventDetail = NormalizedInteractionEventDetail & {
|
|
20
20
|
event: Record<string, unknown> | TouchEvent;
|
|
21
21
|
};
|
|
22
|
-
|
|
22
|
+
type MousePointsDetail = {
|
|
23
23
|
startPoints: IPoints;
|
|
24
24
|
lastPoints: IPoints;
|
|
25
25
|
currentPoints: IPoints;
|
|
26
26
|
deltaPoints: IPoints;
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
type TouchPointsDetail = {
|
|
29
29
|
startPoints: ITouchPoints;
|
|
30
30
|
lastPoints: ITouchPoints;
|
|
31
31
|
currentPoints: ITouchPoints;
|
|
@@ -35,125 +35,125 @@ declare type TouchPointsDetail = {
|
|
|
35
35
|
deltaPoints: IPoints;
|
|
36
36
|
deltaDistance: IDistance;
|
|
37
37
|
};
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
type InteractionEventDetail = NormalizedInteractionEventDetail & (MouseCustomEventDetail | TouchCustomEventDetail) & (MousePointsDetail | TouchPointsDetail);
|
|
39
|
+
type InteractionStartEventDetail = InteractionEventDetail;
|
|
40
|
+
type InteractionEndEventDetail = InteractionEventDetail;
|
|
41
|
+
type ToolModeChangedEventDetail = {
|
|
42
42
|
toolGroupId: string;
|
|
43
43
|
toolName: string;
|
|
44
44
|
mode: ToolModes;
|
|
45
45
|
toolBindingsOptions?: SetToolBindingsType;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
type ToolActivatedEventDetail = {
|
|
48
48
|
toolGroupId: string;
|
|
49
49
|
toolName: string;
|
|
50
50
|
toolBindingsOptions: SetToolBindingsType;
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
type AnnotationAddedEventDetail = {
|
|
53
53
|
viewportId: string;
|
|
54
54
|
renderingEngineId: string;
|
|
55
55
|
annotation: Annotation;
|
|
56
56
|
};
|
|
57
|
-
|
|
57
|
+
type AnnotationCompletedEventDetail = {
|
|
58
58
|
annotation: Annotation;
|
|
59
59
|
};
|
|
60
|
-
|
|
60
|
+
type AnnotationModifiedEventDetail = {
|
|
61
61
|
viewportId: string;
|
|
62
62
|
renderingEngineId: string;
|
|
63
63
|
annotation: Annotation;
|
|
64
64
|
};
|
|
65
|
-
|
|
65
|
+
type AnnotationRemovedEventDetail = {
|
|
66
66
|
annotation: Annotation;
|
|
67
67
|
annotationManagerUID: string;
|
|
68
68
|
};
|
|
69
|
-
|
|
69
|
+
type AnnotationSelectionChangeEventDetail = {
|
|
70
70
|
added: Array<string>;
|
|
71
71
|
removed: Array<string>;
|
|
72
72
|
selection: Array<string>;
|
|
73
73
|
};
|
|
74
|
-
|
|
74
|
+
type AnnotationLockChangeEventDetail = {
|
|
75
75
|
added: Array<Annotation>;
|
|
76
76
|
removed: Array<Annotation>;
|
|
77
77
|
locked: Array<Annotation>;
|
|
78
78
|
};
|
|
79
|
-
|
|
79
|
+
type AnnotationVisibilityChangeEventDetail = {
|
|
80
80
|
lastHidden: Array<string>;
|
|
81
81
|
lastVisible: Array<string>;
|
|
82
82
|
hidden: Array<string>;
|
|
83
83
|
};
|
|
84
|
-
|
|
84
|
+
type AnnotationRenderedEventDetail = {
|
|
85
85
|
element: HTMLDivElement;
|
|
86
86
|
viewportId: string;
|
|
87
87
|
renderingEngineId: string;
|
|
88
88
|
};
|
|
89
|
-
|
|
89
|
+
type SegmentationDataModifiedEventDetail = {
|
|
90
90
|
segmentationId: string;
|
|
91
91
|
modifiedSlicesToUse?: number[];
|
|
92
92
|
};
|
|
93
|
-
|
|
93
|
+
type SegmentationRenderedEventDetail = {
|
|
94
94
|
viewportId: string;
|
|
95
95
|
toolGroupId: string;
|
|
96
96
|
};
|
|
97
|
-
|
|
97
|
+
type SegmentationRepresentationModifiedEventDetail = {
|
|
98
98
|
toolGroupId: string;
|
|
99
99
|
segmentationRepresentationUID: string;
|
|
100
100
|
};
|
|
101
|
-
|
|
101
|
+
type SegmentationRemovedEventDetail = {
|
|
102
102
|
segmentationId: string;
|
|
103
103
|
};
|
|
104
|
-
|
|
104
|
+
type SegmentationRepresentationRemovedEventDetail = {
|
|
105
105
|
toolGroupId: string;
|
|
106
106
|
segmentationRepresentationUID: string;
|
|
107
107
|
};
|
|
108
|
-
|
|
108
|
+
type SegmentationModifiedEventDetail = {
|
|
109
109
|
segmentationId: string;
|
|
110
110
|
};
|
|
111
|
-
|
|
111
|
+
type KeyDownEventDetail = {
|
|
112
112
|
element: HTMLDivElement;
|
|
113
113
|
viewportId: string;
|
|
114
114
|
renderingEngineId: string;
|
|
115
115
|
key: string;
|
|
116
116
|
keyCode: number;
|
|
117
117
|
};
|
|
118
|
-
|
|
119
|
-
|
|
118
|
+
type KeyUpEventDetail = KeyDownEventDetail;
|
|
119
|
+
type MouseDownEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & {
|
|
120
120
|
mouseButton: number;
|
|
121
121
|
};
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
type TouchStartEventDetail = NormalizedInteractionEventDetail & TouchCustomEventDetail & TouchPointsDetail;
|
|
123
|
+
type MouseDragEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & {
|
|
124
124
|
mouseButton: number;
|
|
125
125
|
};
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
type TouchDragEventDetail = NormalizedInteractionEventDetail & TouchCustomEventDetail & TouchPointsDetail;
|
|
127
|
+
type MouseMoveEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & {
|
|
128
128
|
currentPoints: IPoints;
|
|
129
129
|
};
|
|
130
|
-
|
|
130
|
+
type MouseUpEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & {
|
|
131
131
|
mouseButton: number;
|
|
132
132
|
};
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
type TouchEndEventDetail = NormalizedInteractionEventDetail & TouchPointsDetail & TouchCustomEventDetail;
|
|
134
|
+
type MouseDownActivateEventDetail = NormalizedInteractionEventDetail & MousePointsDetail & MouseCustomEventDetail & {
|
|
135
135
|
mouseButton: number;
|
|
136
136
|
};
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
type TouchStartActivateEventDetail = NormalizedInteractionEventDetail & TouchCustomEventDetail & TouchPointsDetail;
|
|
138
|
+
type MouseClickEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail & {
|
|
139
139
|
mouseButton: number;
|
|
140
140
|
};
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
type MouseDoubleClickEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & MousePointsDetail;
|
|
142
|
+
type TouchTapEventDetail = NormalizedInteractionEventDetail & TouchCustomEventDetail & {
|
|
143
143
|
currentPointsList: ITouchPoints[];
|
|
144
144
|
currentPoints: ITouchPoints;
|
|
145
145
|
taps: number;
|
|
146
146
|
};
|
|
147
|
-
|
|
147
|
+
type TouchSwipeEventDetail = NormalizedInteractionEventDetail & TouchCustomEventDetail & {
|
|
148
148
|
swipe: Swipe;
|
|
149
149
|
};
|
|
150
|
-
|
|
150
|
+
type TouchPressEventDetail = NormalizedInteractionEventDetail & TouchCustomEventDetail & {
|
|
151
151
|
startPointsList: ITouchPoints[];
|
|
152
152
|
lastPointsList: ITouchPoints[];
|
|
153
153
|
startPoints: ITouchPoints;
|
|
154
154
|
lastPoints: ITouchPoints;
|
|
155
155
|
};
|
|
156
|
-
|
|
156
|
+
type MouseWheelEventDetail = NormalizedInteractionEventDetail & MouseCustomEventDetail & {
|
|
157
157
|
detail: Record<string, any>;
|
|
158
158
|
wheel: {
|
|
159
159
|
spinX: number;
|
|
@@ -164,7 +164,7 @@ declare type MouseWheelEventDetail = NormalizedInteractionEventDetail & MouseCus
|
|
|
164
164
|
};
|
|
165
165
|
points: IPoints;
|
|
166
166
|
};
|
|
167
|
-
|
|
167
|
+
type VolumeScrollOutOfBoundsEventDetail = {
|
|
168
168
|
volumeId: string;
|
|
169
169
|
viewport: Types.IVolumeViewport;
|
|
170
170
|
desiredStepIndex: number;
|
|
@@ -173,43 +173,43 @@ declare type VolumeScrollOutOfBoundsEventDetail = {
|
|
|
173
173
|
numScrollSteps: number;
|
|
174
174
|
currentImageId: string;
|
|
175
175
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
176
|
+
type NormalizedMouseEventType = Types.CustomEventType<MouseCustomEventDetail>;
|
|
177
|
+
type NormalizedTouchEventType = Types.CustomEventType<TouchCustomEventDetail>;
|
|
178
|
+
type ToolModeChangedEventType = Types.CustomEventType<ToolModeChangedEventDetail>;
|
|
179
|
+
type ToolActivatedEventType = Types.CustomEventType<ToolActivatedEventDetail>;
|
|
180
|
+
type AnnotationAddedEventType = Types.CustomEventType<AnnotationAddedEventDetail>;
|
|
181
|
+
type AnnotationCompletedEventType = Types.CustomEventType<AnnotationCompletedEventDetail>;
|
|
182
|
+
type AnnotationModifiedEventType = Types.CustomEventType<AnnotationModifiedEventDetail>;
|
|
183
|
+
type AnnotationRemovedEventType = Types.CustomEventType<AnnotationRemovedEventDetail>;
|
|
184
|
+
type AnnotationSelectionChangeEventType = Types.CustomEventType<AnnotationSelectionChangeEventDetail>;
|
|
185
|
+
type AnnotationRenderedEventType = Types.CustomEventType<AnnotationRenderedEventDetail>;
|
|
186
|
+
type AnnotationLockChangeEventType = Types.CustomEventType<AnnotationLockChangeEventDetail>;
|
|
187
|
+
type AnnotationVisibilityChangeEventType = Types.CustomEventType<AnnotationVisibilityChangeEventDetail>;
|
|
188
|
+
type SegmentationDataModifiedEventType = Types.CustomEventType<SegmentationDataModifiedEventDetail>;
|
|
189
|
+
type SegmentationRepresentationModifiedEventType = Types.CustomEventType<SegmentationRepresentationModifiedEventDetail>;
|
|
190
|
+
type SegmentationRemovedEventType = Types.CustomEventType<SegmentationRemovedEventDetail>;
|
|
191
|
+
type SegmentationRepresentationRemovedEventType = Types.CustomEventType<SegmentationRepresentationRemovedEventDetail>;
|
|
192
|
+
type SegmentationRenderedEventType = Types.CustomEventType<SegmentationRenderedEventDetail>;
|
|
193
|
+
type SegmentationModifiedEventType = Types.CustomEventType<SegmentationModifiedEventDetail>;
|
|
194
|
+
type KeyDownEventType = Types.CustomEventType<KeyDownEventDetail>;
|
|
195
|
+
type KeyUpEventType = Types.CustomEventType<KeyUpEventDetail>;
|
|
196
|
+
type MouseDownEventType = Types.CustomEventType<MouseDownEventDetail>;
|
|
197
|
+
type TouchTapEventType = Types.CustomEventType<TouchTapEventDetail>;
|
|
198
|
+
type TouchSwipeEventType = Types.CustomEventType<TouchSwipeEventDetail>;
|
|
199
|
+
type TouchPressEventType = Types.CustomEventType<TouchPressEventDetail>;
|
|
200
|
+
type TouchStartEventType = Types.CustomEventType<TouchStartEventDetail>;
|
|
201
|
+
type InteractionEventType = Types.CustomEventType<InteractionEventDetail>;
|
|
202
|
+
type InteractionStartType = Types.CustomEventType<InteractionStartEventDetail>;
|
|
203
|
+
type InteractionEndType = Types.CustomEventType<InteractionEndEventDetail>;
|
|
204
|
+
type MouseDownActivateEventType = Types.CustomEventType<MouseDownActivateEventDetail>;
|
|
205
|
+
type TouchStartActivateEventType = Types.CustomEventType<TouchStartActivateEventDetail>;
|
|
206
|
+
type MouseDragEventType = Types.CustomEventType<MouseDragEventDetail>;
|
|
207
|
+
type TouchDragEventType = Types.CustomEventType<TouchDragEventDetail>;
|
|
208
|
+
type MouseUpEventType = Types.CustomEventType<MouseUpEventDetail>;
|
|
209
|
+
type TouchEndEventType = Types.CustomEventType<TouchEndEventDetail>;
|
|
210
|
+
type MouseClickEventType = Types.CustomEventType<MouseClickEventDetail>;
|
|
211
|
+
type MouseMoveEventType = Types.CustomEventType<MouseMoveEventDetail>;
|
|
212
|
+
type MouseDoubleClickEventType = Types.CustomEventType<MouseDoubleClickEventDetail>;
|
|
213
|
+
type MouseWheelEventType = Types.CustomEventType<MouseWheelEventDetail>;
|
|
214
|
+
type VolumeScrollOutOfBoundsEventType = Types.CustomEventType<VolumeScrollOutOfBoundsEventDetail>;
|
|
215
215
|
export { InteractionStartType, InteractionEndType, InteractionEventType, NormalizedInteractionEventDetail, NormalizedMouseEventType, NormalizedTouchEventType, ToolModeChangedEventDetail, ToolModeChangedEventType, ToolActivatedEventDetail, ToolActivatedEventType, AnnotationAddedEventDetail, AnnotationAddedEventType, AnnotationCompletedEventDetail, AnnotationCompletedEventType, AnnotationModifiedEventDetail, AnnotationModifiedEventType, AnnotationRemovedEventDetail, AnnotationRemovedEventType, AnnotationSelectionChangeEventDetail, AnnotationSelectionChangeEventType, AnnotationRenderedEventDetail, AnnotationRenderedEventType, AnnotationLockChangeEventDetail, AnnotationVisibilityChangeEventDetail, AnnotationLockChangeEventType, AnnotationVisibilityChangeEventType, SegmentationDataModifiedEventType, SegmentationRepresentationModifiedEventDetail, SegmentationRepresentationModifiedEventType, SegmentationRepresentationRemovedEventDetail, SegmentationRepresentationRemovedEventType, SegmentationRemovedEventType, SegmentationRemovedEventDetail, SegmentationDataModifiedEventDetail, SegmentationRenderedEventType, SegmentationRenderedEventDetail, SegmentationModifiedEventType, SegmentationModifiedEventDetail, KeyDownEventDetail, KeyDownEventType, KeyUpEventDetail, KeyUpEventType, MouseDownEventDetail, TouchStartEventDetail, MouseDownEventType, TouchStartEventType, MouseDownActivateEventDetail, TouchStartActivateEventDetail, MouseDownActivateEventType, TouchStartActivateEventType, MouseDragEventDetail, TouchDragEventDetail, MouseDragEventType, TouchDragEventType, MouseUpEventDetail, TouchEndEventDetail, MouseUpEventType, TouchEndEventType, MouseClickEventDetail, MouseClickEventType, TouchTapEventDetail, TouchTapEventType, TouchSwipeEventDetail, TouchSwipeEventType, TouchPressEventDetail, TouchPressEventType, MouseMoveEventDetail, MouseMoveEventType, MouseDoubleClickEventDetail, MouseDoubleClickEventType, MouseWheelEventDetail, MouseWheelEventType, VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEventType, };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
|
-
|
|
2
|
+
type FloodFillResult = {
|
|
3
3
|
flooded: Types.Point2[] | Types.Point3[];
|
|
4
4
|
boundaries: Types.Point2[] | Types.Point3[];
|
|
5
5
|
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
type FloodFillGetter3D = (x: number, y: number, z: number) => number;
|
|
7
|
+
type FloodFillGetter2D = (x: number, y: number) => number;
|
|
8
|
+
type FloodFillGetter = FloodFillGetter2D | FloodFillGetter3D;
|
|
9
|
+
type FloodFillOptions = {
|
|
10
10
|
onFlood?: (x: any, y: any) => void;
|
|
11
11
|
onBoundary?: (x: any, y: any) => void;
|
|
12
12
|
equals?: (a: any, b: any) => boolean;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ToolModes, MouseBindings, KeyboardBindings } from '../enums';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
type ToolBindingMouseType = (typeof MouseBindings)[keyof typeof MouseBindings];
|
|
3
|
+
type ToolBindingKeyboardType = (typeof KeyboardBindings)[keyof typeof KeyboardBindings];
|
|
4
|
+
type IToolBinding = {
|
|
5
5
|
mouseButton?: ToolBindingMouseType;
|
|
6
6
|
modifierKey?: ToolBindingKeyboardType;
|
|
7
7
|
numTouchPoints?: number;
|
|
8
8
|
};
|
|
9
|
-
|
|
9
|
+
type SetToolBindingsType = {
|
|
10
10
|
bindings: IToolBinding[];
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type ToolOptionsType = {
|
|
13
13
|
bindings: IToolBinding[];
|
|
14
14
|
mode: ToolModes;
|
|
15
15
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
type InteractionTypes = 'Mouse' | 'Touch';
|
|
2
2
|
export default InteractionTypes;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Types } from '@cornerstonejs/core';
|
|
2
2
|
import { AnnotationTool } from '../tools';
|
|
3
3
|
import { Annotation, Annotations } from './AnnotationTypes';
|
|
4
|
-
|
|
4
|
+
type ToolAnnotationsPair = {
|
|
5
5
|
tool: AnnotationTool;
|
|
6
6
|
annotations: Annotations;
|
|
7
7
|
};
|
|
8
|
-
|
|
8
|
+
type ToolAnnotationPair = {
|
|
9
9
|
tool: AnnotationTool;
|
|
10
10
|
annotation: Annotation;
|
|
11
11
|
};
|
|
12
|
-
|
|
12
|
+
type ToolsWithMoveableHandles = ToolAnnotationPair & {
|
|
13
13
|
handle: Types.Point3;
|
|
14
14
|
};
|
|
15
15
|
export { ToolsWithMoveableHandles, ToolAnnotationsPair, ToolAnnotationPair };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { vtkColorTransferFunction } from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction';
|
|
2
2
|
import type { vtkPiecewiseFunction } from '@kitware/vtk.js/Common/DataModel/PiecewiseFunction';
|
|
3
|
-
export
|
|
3
|
+
export type LabelmapConfig = {
|
|
4
4
|
renderOutline?: boolean;
|
|
5
5
|
outlineWidthActive?: number;
|
|
6
6
|
outlineWidthInactive?: number;
|
|
@@ -11,11 +11,11 @@ export declare type LabelmapConfig = {
|
|
|
11
11
|
outlineOpacity?: number;
|
|
12
12
|
outlineOpacityInactive?: number;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type LabelmapRenderingConfig = {
|
|
15
15
|
cfun?: vtkColorTransferFunction;
|
|
16
16
|
ofun?: vtkPiecewiseFunction;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type LabelmapSegmentationData = {
|
|
19
19
|
volumeId: string;
|
|
20
20
|
referencedVolumeId?: string;
|
|
21
21
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import * as Enums from '../enums';
|
|
2
2
|
import { ContourConfig, ContourRenderingConfig, ContourSegmentationData } from './ContourTypes';
|
|
3
3
|
import type { LabelmapConfig, LabelmapRenderingConfig, LabelmapSegmentationData } from './LabelmapTypes';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
4
|
+
export type Color = [number, number, number, number];
|
|
5
|
+
export type ColorLUT = Array<Color>;
|
|
6
|
+
export type SegmentSpecificRepresentationConfig = {
|
|
7
7
|
[key: number | string]: RepresentationConfig;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type RepresentationConfig = {
|
|
10
10
|
LABELMAP?: LabelmapConfig;
|
|
11
11
|
CONTOUR?: ContourConfig;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type SegmentationRepresentationConfig = {
|
|
14
14
|
renderInactiveSegmentations: boolean;
|
|
15
15
|
representations: RepresentationConfig;
|
|
16
16
|
};
|
|
17
|
-
export
|
|
17
|
+
export type SegmentationRepresentationData = {
|
|
18
18
|
LABELMAP?: LabelmapSegmentationData;
|
|
19
19
|
CONTOUR?: ContourSegmentationData;
|
|
20
20
|
};
|
|
21
|
-
export
|
|
21
|
+
export type Segmentation = {
|
|
22
22
|
segmentationId: string;
|
|
23
23
|
type: Enums.SegmentationRepresentations;
|
|
24
24
|
label: string;
|
|
@@ -32,7 +32,7 @@ export declare type Segmentation = {
|
|
|
32
32
|
};
|
|
33
33
|
representationData: SegmentationRepresentationData;
|
|
34
34
|
};
|
|
35
|
-
export
|
|
35
|
+
export type ToolGroupSpecificRepresentationState = {
|
|
36
36
|
segmentationRepresentationUID: string;
|
|
37
37
|
segmentationId: string;
|
|
38
38
|
type: Enums.SegmentationRepresentations;
|
|
@@ -40,19 +40,19 @@ export declare type ToolGroupSpecificRepresentationState = {
|
|
|
40
40
|
segmentsHidden: Set<number>;
|
|
41
41
|
colorLUTIndex: number;
|
|
42
42
|
};
|
|
43
|
-
export
|
|
43
|
+
export type ToolGroupSpecificLabelmapRepresentation = ToolGroupSpecificRepresentationState & {
|
|
44
44
|
config: LabelmapRenderingConfig;
|
|
45
45
|
segmentationRepresentationSpecificConfig?: RepresentationConfig;
|
|
46
46
|
segmentSpecificConfig?: SegmentSpecificRepresentationConfig;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type ToolGroupSpecificContourRepresentation = ToolGroupSpecificRepresentationState & {
|
|
49
49
|
config: ContourRenderingConfig;
|
|
50
50
|
segmentationRepresentationSpecificConfig?: RepresentationConfig;
|
|
51
51
|
segmentSpecificConfig?: SegmentSpecificRepresentationConfig;
|
|
52
52
|
};
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
53
|
+
export type ToolGroupSpecificRepresentation = ToolGroupSpecificLabelmapRepresentation | ToolGroupSpecificContourRepresentation;
|
|
54
|
+
export type ToolGroupSpecificRepresentations = Array<ToolGroupSpecificRepresentation>;
|
|
55
|
+
export type SegmentationState = {
|
|
56
56
|
colorLUT: ColorLUT[];
|
|
57
57
|
segmentations: Segmentation[];
|
|
58
58
|
globalConfig: SegmentationRepresentationConfig;
|
|
@@ -63,14 +63,14 @@ export declare type SegmentationState = {
|
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
65
|
};
|
|
66
|
-
export
|
|
66
|
+
export type SegmentationPublicInput = {
|
|
67
67
|
segmentationId: string;
|
|
68
68
|
representation: {
|
|
69
69
|
type: Enums.SegmentationRepresentations;
|
|
70
70
|
data: LabelmapSegmentationData | ContourSegmentationData;
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
|
-
export
|
|
73
|
+
export type RepresentationPublicInput = {
|
|
74
74
|
segmentationId: string;
|
|
75
75
|
type: Enums.SegmentationRepresentations;
|
|
76
76
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Annotation } from './AnnotationTypes';
|
|
2
2
|
import type { InteractionEventType } from './EventTypes';
|
|
3
3
|
import type { SetToolBindingsType } from './ISetToolModeOptions';
|
|
4
|
-
|
|
4
|
+
type ToolAction = {
|
|
5
5
|
method: string | ((evt: InteractionEventType, annotation: Annotation) => void);
|
|
6
6
|
bindings: SetToolBindingsType[];
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
type AnnotationHandle = Types.Point3;
|
|
3
|
+
type TextBoxHandle = {
|
|
4
4
|
hasMoved: boolean;
|
|
5
5
|
worldBoundingBox: {
|
|
6
6
|
bottomLeft: Types.Point3;
|
|
@@ -10,6 +10,6 @@ declare type TextBoxHandle = {
|
|
|
10
10
|
};
|
|
11
11
|
worldPosition: Types.Point3;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
type ToolHandle = AnnotationHandle | TextBoxHandle;
|
|
14
14
|
export default ToolHandle;
|
|
15
15
|
export type { AnnotationHandle, TextBoxHandle };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { Calculator } from '../utilities/math/basic';
|
|
2
|
-
|
|
2
|
+
type SharedToolProp = {
|
|
3
3
|
supportedInteractionTypes?: Array<string>;
|
|
4
4
|
configuration?: ToolConfiguration;
|
|
5
5
|
};
|
|
6
|
-
export
|
|
6
|
+
export type ToolConfiguration = Record<string, any> & {
|
|
7
7
|
statsCalculator?: Calculator;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type ToolProps = SharedToolProp;
|
|
10
|
+
export type PublicToolProps = SharedToolProp & {
|
|
11
11
|
name?: string;
|
|
12
12
|
};
|
|
13
13
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Types } from '@cornerstonejs/core';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
type Line2D = [Types.Point2, Types.Point2];
|
|
3
|
+
type Line3D = [Types.Point3, Types.Point3];
|
|
4
|
+
type Line = Line2D | Line3D;
|
|
5
5
|
export default function angleBetweenLines(line1: Line, line2: Line): number;
|
|
6
6
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BasicStatsCalculator.js","sourceRoot":"","sources":["../../../../../src/utilities/math/basic/BasicStatsCalculator.ts"],"names":[],"mappings":";;;;;;AACA,8DAAsC;AAEtC,MAAqB,oBAAqB,SAAQ,oBAAU;;AAA5D,uCAwDC;;AAvDgB,wBAAG,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"BasicStatsCalculator.js","sourceRoot":"","sources":["../../../../../src/utilities/math/basic/BasicStatsCalculator.ts"],"names":[],"mappings":";;;;;;AACA,8DAAsC;AAEtC,MAAqB,oBAAqB,SAAQ,oBAAU;;AAA5D,uCAwDC;;AAvDgB,wBAAG,GAAG,CAAC,QAAQ,CAAC;AAChB,+BAAU,GAAG,CAAC,CAAC;AACf,wBAAG,GAAG,CAAC,CAAC;AACR,+BAAU,GAAG,CAAC,CAAC;AACf,mCAAc,GAAG,CAAC,CAAC;AACnB,0BAAK,GAAG,CAAC,CAAC;AAOlB,kCAAa,GAAG,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAQ,EAAE;IACnD,IAAI,QAAQ,GAAG,EAAI,CAAC,GAAG,EAAE;QACvB,EAAI,CAAC,GAAG,GAAG,QAAQ,CAAC;QACpB,EAAI,CAAC,UAAU,GAAG,QAAQ,CAAC;KAC5B;IAED,EAAI,CAAC,KAAK,IAAI,CAAC,CAAC;IAEhB,EAAI,CAAC,GAAG,IAAI,QAAQ,CAAC;IACrB,EAAI,CAAC,UAAU,IAAI,SAAA,QAAQ,EAAI,CAAC,CAAA,CAAC;IACjC,EAAI,CAAC,cAAc,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,GAAG,EAAI,CAAC,GAAG,GAAG,EAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AACvE,CAAC,CAAC;AAYK,kCAAa,GAAG,GAAiB,EAAE;IACxC,MAAM,IAAI,GAAG,EAAI,CAAC,GAAG,GAAG,EAAI,CAAC,KAAK,CAAC;IACnC,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,EAAI,CAAC,cAAc,GAAG,EAAI,CAAC,KAAK,CAAC,CAAC;IAC3D,MAAM,mBAAmB,GAAG,IAAI,CAAC,IAAI,CACnC,EAAI,CAAC,UAAU,GAAG,EAAI,CAAC,KAAK,GAAG,SAAA,IAAI,EAAI,CAAC,CAAA,CACzC,CAAC;IAEF,EAAI,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC;IACrB,EAAI,CAAC,GAAG,GAAG,CAAC,CAAC;IACb,EAAI,CAAC,UAAU,GAAG,CAAC,CAAC;IACpB,EAAI,CAAC,cAAc,GAAG,CAAC,CAAC;IACxB,EAAI,CAAC,KAAK,GAAG,CAAC,CAAC;IAEf,OAAO;QACL,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAI,CAAC,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE;QACnD,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE;QACzC,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE;QAC7C,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,mBAAmB,EAAE,IAAI,EAAE,IAAI,EAAE;KACxE,CAAC;AACJ,CAAC,CAAC"}
|