larvitar 3.4.8 → 3.5.0
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/imaging/MetaDataReadable.d.ts +43 -0
- package/dist/imaging/MetaDataTypes.d.ts +3494 -0
- package/dist/imaging/imageStore.d.ts +1 -1
- package/dist/imaging/tools/custom/EllipticalRoiUSTool.d.ts +1 -1
- package/dist/imaging/tools/custom/RectangleRoiUSTool.d.ts +1 -1
- package/dist/imaging/tools/custom/gspsUtils/types.d.ts +178 -0
- package/dist/imaging/tools/custom/watershedSegmentationTool.d.ts +1 -1
- package/dist/imaging/tools/segmentation.d.ts +1 -1
- package/dist/imaging/tools/types.d.ts +458 -0
- package/dist/imaging/types.d.ts +356 -0
- package/dist/larvitar.js +1 -1
- package/package.json +1 -1
- package/imaging/MetaDataReadable.d.ts +0 -43
- package/imaging/MetaDataTypes.d.ts +0 -3498
- package/imaging/tools/custom/gspsUtils/types.d.ts +0 -172
- package/imaging/tools/types.d.ts +0 -477
- package/imaging/types.d.ts +0 -400
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { HandlePosition, Overlay } from "../../types";
|
|
2
|
+
export type AnnotationDetails = {
|
|
3
|
+
description?: string;
|
|
4
|
+
annotationID?: string;
|
|
5
|
+
annotationRenderingOrder?: number;
|
|
6
|
+
presentationGSValue?: number;
|
|
7
|
+
annotationCIELabColor?: [number, number, number];
|
|
8
|
+
annotationDescription?: string;
|
|
9
|
+
imageUIDsToApply?: string[];
|
|
10
|
+
};
|
|
11
|
+
export type AnnotationOverlay = {
|
|
12
|
+
isGraphicAnnotation?: boolean;
|
|
13
|
+
isOverlay?: boolean;
|
|
14
|
+
columns?: number;
|
|
15
|
+
description?: string;
|
|
16
|
+
label?: string | number;
|
|
17
|
+
pixelData?: number[];
|
|
18
|
+
roiArea?: number;
|
|
19
|
+
roiMean?: number;
|
|
20
|
+
roiStandardDeviation?: number;
|
|
21
|
+
rows?: number;
|
|
22
|
+
x?: number;
|
|
23
|
+
y?: number;
|
|
24
|
+
visible?: boolean;
|
|
25
|
+
type?: string;
|
|
26
|
+
fillStyle?: string;
|
|
27
|
+
renderingOrder?: number;
|
|
28
|
+
canBeRendered?: boolean;
|
|
29
|
+
bitsAllocated?: number;
|
|
30
|
+
bitPosition?: number;
|
|
31
|
+
subtype?: string;
|
|
32
|
+
isTextAnnotation?: boolean;
|
|
33
|
+
isgraphicFilled?: string;
|
|
34
|
+
active?: boolean;
|
|
35
|
+
color?: string;
|
|
36
|
+
invalidated?: boolean;
|
|
37
|
+
handles?: {
|
|
38
|
+
start?: HandlePosition;
|
|
39
|
+
end?: HandlePosition;
|
|
40
|
+
points?: HandlePosition[];
|
|
41
|
+
initialRotation?: number;
|
|
42
|
+
textBox: AnnotationTextBox;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
interface AnnotationTextBox {
|
|
46
|
+
text?: string;
|
|
47
|
+
active: boolean;
|
|
48
|
+
hasMoved: boolean;
|
|
49
|
+
movesIndependently: boolean;
|
|
50
|
+
drawnIndependently: boolean;
|
|
51
|
+
allowedOutsideImage: boolean;
|
|
52
|
+
hasBoundingBox: boolean;
|
|
53
|
+
boundingBox?: {
|
|
54
|
+
width: number;
|
|
55
|
+
height: number;
|
|
56
|
+
left: number;
|
|
57
|
+
top: number;
|
|
58
|
+
};
|
|
59
|
+
anchorPoint?: {
|
|
60
|
+
x: number | null;
|
|
61
|
+
y: number | null;
|
|
62
|
+
};
|
|
63
|
+
anchorpointVisibility?: string;
|
|
64
|
+
textFormat?: string;
|
|
65
|
+
x?: number;
|
|
66
|
+
y?: number;
|
|
67
|
+
}
|
|
68
|
+
export type TextDetails = {
|
|
69
|
+
unformattedTextValue?: string;
|
|
70
|
+
textFormat?: string;
|
|
71
|
+
boundingBoxUnits?: string;
|
|
72
|
+
anchorPointUnits?: string;
|
|
73
|
+
anchorpointVisibility: boolean;
|
|
74
|
+
boundingBox?: {
|
|
75
|
+
tlhc?: {
|
|
76
|
+
x: number | null;
|
|
77
|
+
y: number | null;
|
|
78
|
+
};
|
|
79
|
+
brhc?: {
|
|
80
|
+
x: number | null;
|
|
81
|
+
y: number | null;
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
isTextAnnotation?: boolean;
|
|
85
|
+
anchorPointVisibility?: string;
|
|
86
|
+
anchorPoint?: {
|
|
87
|
+
x: number | null;
|
|
88
|
+
y: number | null;
|
|
89
|
+
};
|
|
90
|
+
compoundGraphicInstanceUID?: number;
|
|
91
|
+
graphicGroupID?: number;
|
|
92
|
+
trackingID?: string;
|
|
93
|
+
trackingUID?: string;
|
|
94
|
+
textStyleSequence: {
|
|
95
|
+
fontName?: string;
|
|
96
|
+
fontNameType?: string;
|
|
97
|
+
cssFontName?: string;
|
|
98
|
+
textColorCIELabValue?: [number, number, number];
|
|
99
|
+
horizontalAlignment?: number;
|
|
100
|
+
verticalAlignment?: number;
|
|
101
|
+
shadowStyle?: string;
|
|
102
|
+
shadowOffsetX?: number;
|
|
103
|
+
shadowOffsetY?: number;
|
|
104
|
+
shadowColorCIELabValue?: [number, number, number];
|
|
105
|
+
shadowOpacity: number;
|
|
106
|
+
underlined?: string;
|
|
107
|
+
bold?: string;
|
|
108
|
+
italic?: string;
|
|
109
|
+
} | null;
|
|
110
|
+
};
|
|
111
|
+
export type GraphicDetails = {
|
|
112
|
+
graphicAnnotationUnits?: string;
|
|
113
|
+
graphicDimensions?: number;
|
|
114
|
+
graphicPointsNumber?: number;
|
|
115
|
+
graphicData?: number[];
|
|
116
|
+
graphicType?: string;
|
|
117
|
+
graphicFilled?: string;
|
|
118
|
+
compoundGraphicInstanceUID?: number;
|
|
119
|
+
graphicGroupID?: number;
|
|
120
|
+
trackingID?: string;
|
|
121
|
+
trackingUID?: string;
|
|
122
|
+
lineStyleSequence: {
|
|
123
|
+
patternOnColorCIELabValue?: [number, number, number];
|
|
124
|
+
patternOffColorCIELabValue?: [number, number, number];
|
|
125
|
+
patternOnOpacity?: number;
|
|
126
|
+
patternOffOpacity?: number;
|
|
127
|
+
lineThickness?: number;
|
|
128
|
+
lineDashingStyle?: number;
|
|
129
|
+
linePattern?: number;
|
|
130
|
+
shadowStyle?: string;
|
|
131
|
+
shadowOffsetX?: number;
|
|
132
|
+
shadowOffsetY?: number;
|
|
133
|
+
shadowColorCIELabValue?: [number, number, number];
|
|
134
|
+
shadowOpacity?: number;
|
|
135
|
+
} | null;
|
|
136
|
+
};
|
|
137
|
+
export type CompoundDetails = {
|
|
138
|
+
isCompoundAnnotation?: boolean;
|
|
139
|
+
compoundGraphicUnits?: string;
|
|
140
|
+
graphicDimensions?: number;
|
|
141
|
+
graphicPointsNumber?: number;
|
|
142
|
+
graphicData?: number[];
|
|
143
|
+
graphicType?: string;
|
|
144
|
+
graphicFilled?: string;
|
|
145
|
+
compoundGraphicInstanceUID?: number;
|
|
146
|
+
graphicGroupID?: number;
|
|
147
|
+
rotationAngle?: number;
|
|
148
|
+
rotationPoint?: [number, number];
|
|
149
|
+
gapLength?: number;
|
|
150
|
+
diameterOfVisibility?: number;
|
|
151
|
+
majorTicks?: MajorTicks[];
|
|
152
|
+
tickFormat?: string;
|
|
153
|
+
tickLabelFormat?: string;
|
|
154
|
+
showTick?: string;
|
|
155
|
+
lineStyleSequence: {
|
|
156
|
+
patternOnColorCIELabValue?: [number, number, number];
|
|
157
|
+
patternOffColorCIELabValue?: [number, number, number];
|
|
158
|
+
patternOnOpacity?: number;
|
|
159
|
+
patternOffOpacity?: number;
|
|
160
|
+
lineThickness?: number;
|
|
161
|
+
lineDashingStyle?: number;
|
|
162
|
+
linePattern?: number;
|
|
163
|
+
shadowStyle?: string;
|
|
164
|
+
shadowOffsetX?: number;
|
|
165
|
+
shadowOffsetY?: number;
|
|
166
|
+
shadowColorCIELabValue?: [number, number, number];
|
|
167
|
+
shadowOpacity?: number;
|
|
168
|
+
} | null;
|
|
169
|
+
};
|
|
170
|
+
export type ToolAnnotations = MergedDetails[];
|
|
171
|
+
export type MergedDetails = TextDetails & GraphicDetails & CompoundDetails & Overlay & {
|
|
172
|
+
imageUIDsToApply: string[];
|
|
173
|
+
};
|
|
174
|
+
export type MajorTicks = {
|
|
175
|
+
tickPosition?: number;
|
|
176
|
+
tickLabel?: string;
|
|
177
|
+
};
|
|
178
|
+
export {};
|
|
@@ -191,7 +191,7 @@ export default class WSToggleTool extends BaseBrushTool {
|
|
|
191
191
|
* @returns {void}
|
|
192
192
|
*/
|
|
193
193
|
_paintInit(evt: WSMouseEvent, eventData: WSEventData): {
|
|
194
|
-
image: Image;
|
|
194
|
+
image: import("../../types").Image;
|
|
195
195
|
shouldEraseManually: boolean;
|
|
196
196
|
shouldActivateLabelPicker: boolean | undefined;
|
|
197
197
|
shouldApplyWatershed: boolean;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @desc This file provides functionalities
|
|
3
3
|
* for handling masks and luts
|
|
4
4
|
*/
|
|
5
|
-
import { BrushProperties, MaskProperties, SegmentationConfig } from "./types
|
|
5
|
+
import { BrushProperties, MaskProperties, SegmentationConfig } from "./types";
|
|
6
6
|
import type { TypedArray } from "../types";
|
|
7
7
|
export declare function rgbToHex(c: number[]): string;
|
|
8
8
|
export declare function hexToRgb(hex: string): number[];
|
|
@@ -0,0 +1,458 @@
|
|
|
1
|
+
import { EnabledElement } from "cornerstone-core";
|
|
2
|
+
import { Image, Viewport } from "../types";
|
|
3
|
+
type ToolOptions = {
|
|
4
|
+
mouseButtonMask?: number | number[];
|
|
5
|
+
supportedInteractionTypes?: string[];
|
|
6
|
+
loop?: boolean;
|
|
7
|
+
allowSkipping?: boolean;
|
|
8
|
+
invert?: boolean;
|
|
9
|
+
} & {
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export type ToolConfig = {
|
|
13
|
+
name: string;
|
|
14
|
+
viewports: string | string[];
|
|
15
|
+
configuration: Object;
|
|
16
|
+
options: ToolOptions;
|
|
17
|
+
class: string;
|
|
18
|
+
sync?: string;
|
|
19
|
+
cleanable?: boolean;
|
|
20
|
+
defaultActive?: boolean;
|
|
21
|
+
shortcut?: string;
|
|
22
|
+
type?: "utils" | "annotation" | "segmentation" | "overlay";
|
|
23
|
+
description?: string;
|
|
24
|
+
currentMode?: string;
|
|
25
|
+
offset?: number;
|
|
26
|
+
};
|
|
27
|
+
export type ToolStyle = {
|
|
28
|
+
width: number;
|
|
29
|
+
color: string;
|
|
30
|
+
activeColor: string;
|
|
31
|
+
fillColor: string;
|
|
32
|
+
fontFamily: string;
|
|
33
|
+
fontSize: number;
|
|
34
|
+
backgroundColor: string;
|
|
35
|
+
};
|
|
36
|
+
export type ToolSettings = {
|
|
37
|
+
mouseEnabled: boolean;
|
|
38
|
+
touchEnabled: boolean;
|
|
39
|
+
showSVGCursors: boolean;
|
|
40
|
+
globalToolSyncEnabled: boolean;
|
|
41
|
+
autoResizeViewports: boolean;
|
|
42
|
+
lineDash: [number, number];
|
|
43
|
+
};
|
|
44
|
+
export type ToolMouseKeys = {
|
|
45
|
+
debug: boolean;
|
|
46
|
+
mouse_button_left: {
|
|
47
|
+
shift: string;
|
|
48
|
+
ctrl: string;
|
|
49
|
+
default: string;
|
|
50
|
+
};
|
|
51
|
+
mouse_button_right: {
|
|
52
|
+
shift: string;
|
|
53
|
+
ctrl: string;
|
|
54
|
+
default: string;
|
|
55
|
+
};
|
|
56
|
+
keyboard_shortcuts: {
|
|
57
|
+
[key: string]: string;
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
export type WSConfig = {
|
|
61
|
+
multiImage: boolean;
|
|
62
|
+
startIndex: number | null;
|
|
63
|
+
endIndex: number | null;
|
|
64
|
+
masksNumber: number;
|
|
65
|
+
onload?: boolean;
|
|
66
|
+
};
|
|
67
|
+
export type WSToolConfig = {
|
|
68
|
+
name: string;
|
|
69
|
+
viewports: string | string[];
|
|
70
|
+
configuration: WSConfig;
|
|
71
|
+
options: ToolOptions;
|
|
72
|
+
class: string;
|
|
73
|
+
sync?: string;
|
|
74
|
+
cleanable?: boolean;
|
|
75
|
+
defaultActive?: boolean;
|
|
76
|
+
shortcut?: string;
|
|
77
|
+
type?: "utils" | "annotation" | "segmentation" | "overlay";
|
|
78
|
+
description?: string;
|
|
79
|
+
currentMode?: string;
|
|
80
|
+
};
|
|
81
|
+
export type WSMouseEvent = {
|
|
82
|
+
detail: WSEventData;
|
|
83
|
+
};
|
|
84
|
+
export interface WSEventData {
|
|
85
|
+
currentPoints: {
|
|
86
|
+
image: {
|
|
87
|
+
x: number;
|
|
88
|
+
y: number;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
element: Element | HTMLElement;
|
|
92
|
+
buttons: number;
|
|
93
|
+
shiftKey: boolean;
|
|
94
|
+
event: {
|
|
95
|
+
altKey: boolean;
|
|
96
|
+
shiftKey: boolean;
|
|
97
|
+
};
|
|
98
|
+
image: Image;
|
|
99
|
+
}
|
|
100
|
+
export type pixelData3D = {
|
|
101
|
+
pixelData: number[];
|
|
102
|
+
segmentsOnLabelmap: number[];
|
|
103
|
+
}[];
|
|
104
|
+
export type CachedImage = {
|
|
105
|
+
image: {
|
|
106
|
+
imageId: string;
|
|
107
|
+
getPixelData: () => number[];
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
export type LabelMapType = {
|
|
111
|
+
pixelData?: number[];
|
|
112
|
+
labelmaps2D?: labelmaps2DType[];
|
|
113
|
+
};
|
|
114
|
+
export type labelmaps2DType = {
|
|
115
|
+
pixelData: number[];
|
|
116
|
+
segmentsOnLabelmap: number[];
|
|
117
|
+
};
|
|
118
|
+
export type HandlePosition = {
|
|
119
|
+
active?: boolean;
|
|
120
|
+
allowedOutsideImage?: boolean;
|
|
121
|
+
drawnIndependently?: boolean;
|
|
122
|
+
highlight?: boolean;
|
|
123
|
+
index?: number;
|
|
124
|
+
locked?: boolean;
|
|
125
|
+
moving?: boolean;
|
|
126
|
+
x: number;
|
|
127
|
+
y: number;
|
|
128
|
+
lines?: HandlePosition[];
|
|
129
|
+
hasBoundingBox?: boolean;
|
|
130
|
+
boundingBox?: HandleTextBox;
|
|
131
|
+
};
|
|
132
|
+
export interface ViewportComplete extends Viewport {
|
|
133
|
+
initialRotation: number;
|
|
134
|
+
displayedArea: any;
|
|
135
|
+
scale: number;
|
|
136
|
+
rotation: number;
|
|
137
|
+
vflip: boolean;
|
|
138
|
+
hflip: boolean;
|
|
139
|
+
}
|
|
140
|
+
export type ImageParameters = {
|
|
141
|
+
color: string;
|
|
142
|
+
columns: number;
|
|
143
|
+
rows: number;
|
|
144
|
+
slope: number;
|
|
145
|
+
intercept: number;
|
|
146
|
+
};
|
|
147
|
+
export declare const enum DisplayAreaVisualizations {
|
|
148
|
+
"SCALE TO FIT" = 0,
|
|
149
|
+
"TRUE SIZE" = 1,
|
|
150
|
+
"MAGNIFY" = 2
|
|
151
|
+
}
|
|
152
|
+
export type Overlay = {
|
|
153
|
+
isGraphicAnnotation?: boolean;
|
|
154
|
+
isOverlay?: boolean;
|
|
155
|
+
columns?: number;
|
|
156
|
+
description?: string;
|
|
157
|
+
label?: string | number;
|
|
158
|
+
pixelData: number[];
|
|
159
|
+
roiArea?: number;
|
|
160
|
+
roiMean?: number;
|
|
161
|
+
roiStandardDeviation?: number;
|
|
162
|
+
rows?: number;
|
|
163
|
+
type?: string;
|
|
164
|
+
x?: number;
|
|
165
|
+
y?: number;
|
|
166
|
+
visible: boolean;
|
|
167
|
+
fillStyle: string;
|
|
168
|
+
renderingOrder?: number;
|
|
169
|
+
canBeRendered?: boolean;
|
|
170
|
+
bitsAllocated?: number;
|
|
171
|
+
bitPosition?: number;
|
|
172
|
+
subtype?: string;
|
|
173
|
+
};
|
|
174
|
+
export type HandleTextBox = {
|
|
175
|
+
active: boolean;
|
|
176
|
+
allowedOutsideImage: boolean;
|
|
177
|
+
boundingBox: {
|
|
178
|
+
height: number;
|
|
179
|
+
left: number;
|
|
180
|
+
top: number;
|
|
181
|
+
width: number;
|
|
182
|
+
};
|
|
183
|
+
drawnIndependently: boolean;
|
|
184
|
+
hasBoundingBox: boolean;
|
|
185
|
+
hasMoved: boolean;
|
|
186
|
+
highlight?: boolean;
|
|
187
|
+
index?: number;
|
|
188
|
+
movesIndependently: boolean;
|
|
189
|
+
x: number;
|
|
190
|
+
y: number;
|
|
191
|
+
};
|
|
192
|
+
type BaseToolStateData = {
|
|
193
|
+
active: boolean;
|
|
194
|
+
color: string;
|
|
195
|
+
invalidated: boolean;
|
|
196
|
+
uuid: string;
|
|
197
|
+
visible: boolean;
|
|
198
|
+
};
|
|
199
|
+
type AngleStateData = BaseToolStateData & {
|
|
200
|
+
handles: {
|
|
201
|
+
end: HandlePosition;
|
|
202
|
+
middle: HandlePosition;
|
|
203
|
+
start: HandlePosition;
|
|
204
|
+
textBox: HandleTextBox;
|
|
205
|
+
};
|
|
206
|
+
rAngle: number;
|
|
207
|
+
};
|
|
208
|
+
type ArrowAnnotateStateData = BaseToolStateData & {
|
|
209
|
+
handles: {
|
|
210
|
+
end: HandlePosition;
|
|
211
|
+
start: HandlePosition;
|
|
212
|
+
textBox: HandleTextBox;
|
|
213
|
+
};
|
|
214
|
+
text: string;
|
|
215
|
+
};
|
|
216
|
+
type BidirectionalStateData = BaseToolStateData & {
|
|
217
|
+
handles: {
|
|
218
|
+
end: HandlePosition;
|
|
219
|
+
perpendicularEnd: HandlePosition;
|
|
220
|
+
perpendicularStart: HandlePosition;
|
|
221
|
+
start: HandlePosition;
|
|
222
|
+
textBox: HandleTextBox;
|
|
223
|
+
};
|
|
224
|
+
isCreating: boolean;
|
|
225
|
+
longestDiameter: number;
|
|
226
|
+
shortestDiameter: number;
|
|
227
|
+
toolName: "Bidirectional";
|
|
228
|
+
toolType: "Bidirectional";
|
|
229
|
+
};
|
|
230
|
+
type EllipticalRoiStateData = BaseToolStateData & {
|
|
231
|
+
cachedStats: {
|
|
232
|
+
area: number;
|
|
233
|
+
count: number;
|
|
234
|
+
max: number;
|
|
235
|
+
mean: number;
|
|
236
|
+
meanStdDevSUV?: number;
|
|
237
|
+
min: number;
|
|
238
|
+
stdDev: number;
|
|
239
|
+
variance: number;
|
|
240
|
+
};
|
|
241
|
+
handles: {
|
|
242
|
+
end: HandlePosition;
|
|
243
|
+
initialRotation: number;
|
|
244
|
+
start: HandlePosition;
|
|
245
|
+
textBox: HandleTextBox;
|
|
246
|
+
};
|
|
247
|
+
unit: string;
|
|
248
|
+
};
|
|
249
|
+
type FreehandRoiStateData = BaseToolStateData & {
|
|
250
|
+
area: number;
|
|
251
|
+
canComplete: boolean;
|
|
252
|
+
handles: {
|
|
253
|
+
points: HandlePosition[];
|
|
254
|
+
textBox: HandleTextBox;
|
|
255
|
+
invalidHandlePlacement: boolean;
|
|
256
|
+
};
|
|
257
|
+
highlight: boolean;
|
|
258
|
+
meanStdDev: {
|
|
259
|
+
count: number;
|
|
260
|
+
mean: number;
|
|
261
|
+
variance: number;
|
|
262
|
+
stdDev: number;
|
|
263
|
+
};
|
|
264
|
+
meanStdDevSUV: undefined;
|
|
265
|
+
polyBoundingBox: {
|
|
266
|
+
left: number;
|
|
267
|
+
top: number;
|
|
268
|
+
width: number;
|
|
269
|
+
height: number;
|
|
270
|
+
};
|
|
271
|
+
unit: string;
|
|
272
|
+
};
|
|
273
|
+
type LengthStateData = BaseToolStateData & {
|
|
274
|
+
handles: {
|
|
275
|
+
end: HandlePosition;
|
|
276
|
+
start: HandlePosition;
|
|
277
|
+
textBox: HandleTextBox;
|
|
278
|
+
};
|
|
279
|
+
length: number;
|
|
280
|
+
unit: string;
|
|
281
|
+
};
|
|
282
|
+
type ProbeStateData = BaseToolStateData;
|
|
283
|
+
type RectangleRoiStateData = BaseToolStateData & {
|
|
284
|
+
cachedStats: {
|
|
285
|
+
area: number;
|
|
286
|
+
count: number;
|
|
287
|
+
max: number;
|
|
288
|
+
mean: number;
|
|
289
|
+
meanStdDevSUV?: number;
|
|
290
|
+
min: number;
|
|
291
|
+
perimeter: number;
|
|
292
|
+
stdDev: number;
|
|
293
|
+
variance: number;
|
|
294
|
+
};
|
|
295
|
+
handles: {
|
|
296
|
+
end: HandlePosition;
|
|
297
|
+
initialRotation: number;
|
|
298
|
+
start: HandlePosition;
|
|
299
|
+
textBox: HandleTextBox;
|
|
300
|
+
};
|
|
301
|
+
unit: string;
|
|
302
|
+
};
|
|
303
|
+
export type ToolState = {
|
|
304
|
+
[imageId: string]: {
|
|
305
|
+
Angle: AngleStateData;
|
|
306
|
+
ArrowAnnotate: ArrowAnnotateStateData;
|
|
307
|
+
Bidirectional: BidirectionalStateData;
|
|
308
|
+
EllipticalRoi: EllipticalRoiStateData;
|
|
309
|
+
FreehandRoi: FreehandRoiStateData;
|
|
310
|
+
Length: LengthStateData;
|
|
311
|
+
Probe: ProbeStateData;
|
|
312
|
+
RectangleRoi: RectangleRoiStateData;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
export type SegmentationConfig = {
|
|
316
|
+
arrayType: number;
|
|
317
|
+
renderOutline: boolean;
|
|
318
|
+
renderFill: boolean;
|
|
319
|
+
shouldRenderInactiveLabelmaps: boolean;
|
|
320
|
+
radius: number;
|
|
321
|
+
minRadius: number;
|
|
322
|
+
maxRadius: number;
|
|
323
|
+
segmentsPerLabelmap: number;
|
|
324
|
+
fillAlpha: number;
|
|
325
|
+
fillAlphaInactive: number;
|
|
326
|
+
outlineAlpha: number;
|
|
327
|
+
outlineAlphaInactive: number;
|
|
328
|
+
outlineWidth: number;
|
|
329
|
+
storeHistory: boolean;
|
|
330
|
+
};
|
|
331
|
+
export declare const enum MaskVisualizations {
|
|
332
|
+
FILL = 0,
|
|
333
|
+
CONTOUR = 1,
|
|
334
|
+
HIDDEN = 2
|
|
335
|
+
}
|
|
336
|
+
export type MaskProperties = {
|
|
337
|
+
color: string;
|
|
338
|
+
labelId: number;
|
|
339
|
+
opacity: number;
|
|
340
|
+
visualization: MaskVisualizations;
|
|
341
|
+
};
|
|
342
|
+
export type BrushProperties = {
|
|
343
|
+
radius: number;
|
|
344
|
+
thresholds: [number, number];
|
|
345
|
+
};
|
|
346
|
+
export type dataSets = {
|
|
347
|
+
points: number[];
|
|
348
|
+
pixelValues: number[];
|
|
349
|
+
color: string;
|
|
350
|
+
}[];
|
|
351
|
+
export type PixelSpacing = {
|
|
352
|
+
rowPixelSpacing: number;
|
|
353
|
+
colPixelSpacing: number;
|
|
354
|
+
};
|
|
355
|
+
export interface MeasurementData {
|
|
356
|
+
polyBoundingBox?: Rectangle;
|
|
357
|
+
meanStdDev?: number;
|
|
358
|
+
meanStdDevSUV?: {
|
|
359
|
+
mean: number;
|
|
360
|
+
stdDev: number;
|
|
361
|
+
};
|
|
362
|
+
area?: number;
|
|
363
|
+
unit?: string;
|
|
364
|
+
visible: boolean;
|
|
365
|
+
active: boolean;
|
|
366
|
+
color?: string;
|
|
367
|
+
invalidated: boolean;
|
|
368
|
+
handles: Handles;
|
|
369
|
+
length?: number;
|
|
370
|
+
cachedStats?: Stats;
|
|
371
|
+
}
|
|
372
|
+
export type Stats = {
|
|
373
|
+
area: number;
|
|
374
|
+
perimeter?: number;
|
|
375
|
+
count: number;
|
|
376
|
+
mean: number;
|
|
377
|
+
variance: number;
|
|
378
|
+
stdDev: number;
|
|
379
|
+
min: number;
|
|
380
|
+
max: number;
|
|
381
|
+
meanStdDev?: {
|
|
382
|
+
mean: number;
|
|
383
|
+
stdDev: number;
|
|
384
|
+
};
|
|
385
|
+
meanStdDevSUV?: {
|
|
386
|
+
mean: number;
|
|
387
|
+
stdDev: number;
|
|
388
|
+
};
|
|
389
|
+
unit?: string;
|
|
390
|
+
};
|
|
391
|
+
export type MeasurementConfig = {
|
|
392
|
+
handleRadius?: number;
|
|
393
|
+
drawHandlesOnHover?: boolean;
|
|
394
|
+
hideHandlesIfMoving?: boolean;
|
|
395
|
+
renderDashed?: boolean;
|
|
396
|
+
color?: string;
|
|
397
|
+
drawHandlesIfActive?: boolean;
|
|
398
|
+
lineDash?: boolean;
|
|
399
|
+
fill?: boolean;
|
|
400
|
+
};
|
|
401
|
+
export type Rectangle = {
|
|
402
|
+
left: number;
|
|
403
|
+
top: number;
|
|
404
|
+
width: number;
|
|
405
|
+
height: number;
|
|
406
|
+
};
|
|
407
|
+
export interface Handles {
|
|
408
|
+
start?: HandlePosition;
|
|
409
|
+
end?: HandlePosition;
|
|
410
|
+
offset?: number;
|
|
411
|
+
textBox?: HandleTextBox;
|
|
412
|
+
initialRotation?: number;
|
|
413
|
+
points?: HandlePosition[];
|
|
414
|
+
}
|
|
415
|
+
export interface MeasurementMouseEvent {
|
|
416
|
+
detail: EventData;
|
|
417
|
+
currentTarget: any;
|
|
418
|
+
}
|
|
419
|
+
export interface Coords {
|
|
420
|
+
x: number;
|
|
421
|
+
y: number;
|
|
422
|
+
}
|
|
423
|
+
export interface EventData {
|
|
424
|
+
currentPoints: {
|
|
425
|
+
image: Coords;
|
|
426
|
+
client: Coords;
|
|
427
|
+
};
|
|
428
|
+
startPoints: {
|
|
429
|
+
image: Coords;
|
|
430
|
+
client: Coords;
|
|
431
|
+
};
|
|
432
|
+
element: HTMLElement;
|
|
433
|
+
buttons: number;
|
|
434
|
+
shiftKey: boolean;
|
|
435
|
+
viewport: ViewportComplete;
|
|
436
|
+
event: {
|
|
437
|
+
altKey: boolean;
|
|
438
|
+
shiftKey: boolean;
|
|
439
|
+
ctrlKey: boolean;
|
|
440
|
+
};
|
|
441
|
+
image: cornerstone.Image;
|
|
442
|
+
enabledElement?: EnabledElement;
|
|
443
|
+
canvasContext: CanvasRenderingContext2D;
|
|
444
|
+
}
|
|
445
|
+
export type PreventEvent = {
|
|
446
|
+
stopImmediatePropagation: Function;
|
|
447
|
+
stopPropagation: Function;
|
|
448
|
+
preventDefault: Function;
|
|
449
|
+
};
|
|
450
|
+
export interface PlotlyData {
|
|
451
|
+
x: number[];
|
|
452
|
+
y: number[];
|
|
453
|
+
type: string;
|
|
454
|
+
line: {
|
|
455
|
+
color: string;
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
export {};
|