@ohif/app 3.8.0-beta.8 → 3.8.0-beta.80
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/{220.bundle.f7e1c96c94245e70f2be.js → 109.bundle.b4fee2a22b622839baf5.js} +4466 -3715
- package/dist/{471.bundle.49c8d281adbae4a2c4df.js → 121.bundle.787f5a848ed632a4d5fc.js} +90 -112
- package/dist/141.bundle.556b4c1e4cab770417ac.js +8620 -0
- package/dist/{687.bundle.9065db35c01823286f08.js → 164.bundle.d4598e491783753a8b6b.js} +22 -38
- package/dist/17dd54813d5acc10bf8f.wasm +0 -0
- package/dist/183.bundle.72bf18ad23ee6624986d.js +30394 -0
- package/dist/{506.bundle.5731bb4349e266491225.js → 188.bundle.b80554ec7df7dcd435a5.js} +23 -28
- package/dist/{342.bundle.e7c3d500f86fdfcc62b5.js → 206.bundle.f957e0d1cdff66dbac69.js} +1963 -1142
- package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/217.bundle.be1cc412f8e26be87d21.js +115079 -0
- package/dist/{451.bundle.57c21db5d003c75e9d61.js → 295.bundle.6f734abf8fa85b1a310d.js} +107 -127
- package/dist/{125.bundle.253395f320b72180da63.js → 297.bundle.194d8985ab974839b5b6.js} +7 -8
- package/dist/{19.bundle.f77c5787b6d8ac0b638b.js → 325.bundle.84909a08305556e9f924.js} +479 -371
- package/dist/335.bundle.c39d4aefe33aecab958f.js +2590 -0
- package/dist/{202.bundle.d3490836f71e001dd30f.js → 342.bundle.e6d0bba29351b5650a8c.js} +566 -868
- package/dist/{776.bundle.a2dedb405a12ffd7699b.js → 41.bundle.7c943bb857ed37831905.js} +7295 -3536
- package/dist/422.bundle.bd6529c536f59807fbee.js +881 -0
- package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 433.bundle.4c77c1fe8fc90ac14218.js} +14737 -27555
- package/dist/445.bundle.38c6d2af64e41cd7c614.js +7835 -0
- package/dist/{126.bundle.6e7111d58bcc937ffd80.js → 448.bundle.deedeff5744e77510734.js} +362 -430
- package/dist/487.bundle.7890ca42826941ebcd60.js +1875 -0
- package/dist/{886.bundle.c8dd3ecc42a4253de278.js → 530.bundle.7c94543955552475c56a.js} +98 -127
- package/dist/{663.bundle.d7be28450db14266cdd0.js → 540.bundle.079d43a6717e95c24392.js} +225 -188
- package/dist/{250.bundle.aea3335667054bdefe36.js → 544.bundle.1c1f57118560046649c1.js} +37 -62
- package/dist/574.bundle.be075ac52fb52b442a8b.js +2641 -0
- package/dist/{181.css → 574.css} +1 -1
- package/dist/{410.bundle.15c855b0ff4a1a674fb8.js → 594.bundle.0b1165661dd638820082.js} +183 -221
- package/dist/{221.bundle.aef554202c58483cb34e.js → 633.bundle.c1658e76f104cbd14cab.js} +349 -552
- package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 644.bundle.1e77691d2eeb96a423b0.js} +1852 -8945
- package/dist/699.bundle.4f01772e7ce6637de339.js +768 -0
- package/dist/702.bundle.963481fbf871984b646f.js +8426 -0
- package/dist/722.bundle.afab1fe6bfcd569130ac.js +1083 -0
- package/dist/{359.bundle.45ecb3d28e8c22142606.js → 724.bundle.e5794460c391ee9cba2c.js} +164 -259
- package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 726.bundle.0b3d9277d22fe7e15b89.js} +512 -879
- package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 835.bundle.15aff0b7433bb0dd6d6d.js} +37 -30
- package/dist/{822.bundle.82cdc418f8f56da6060b.js → 862.bundle.c0ee6e1d4d97e1353213.js} +77 -96
- package/dist/{236.bundle.4e9924934a747afac132.js → 889.bundle.7858e4b7ca1a2b12b64f.js} +207 -199
- package/dist/{281.bundle.deb7492d143e7768d8bf.js → 905.bundle.170908fe660fc6b40649.js} +157 -124
- package/dist/{814.bundle.c8c951d20039b63b865a.js → 907.bundle.dee4e30420caf07caea6.js} +16 -30
- package/dist/{417.bundle.af0a207c29b109f84159.js → 931.bundle.d270a1fda9a2836c3cc5.js} +26 -26
- package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 939.bundle.9d93b2e47c52338747a2.js} +7 -8
- package/dist/94.bundle.c452d9b0645277c2cf4e.js +784 -0
- package/dist/{12.bundle.b5ca13e5363f170ecb3b.js → 961.bundle.aaaaaba0ec015a3b85d8.js} +20 -33
- package/dist/app-config.js +1 -0
- package/dist/{app.bundle.a978edc59b9d82f2eb22.js → app.bundle.6c090a2d6d3ccc97a81d.js} +183240 -87650
- package/dist/app.bundle.css +16 -13
- package/dist/assets/images/CT-AAA.png +0 -0
- package/dist/assets/images/CT-AAA2.png +0 -0
- package/dist/assets/images/CT-Air.png +0 -0
- package/dist/assets/images/CT-Bone.png +0 -0
- package/dist/assets/images/CT-Bones.png +0 -0
- package/dist/assets/images/CT-Cardiac.png +0 -0
- package/dist/assets/images/CT-Cardiac2.png +0 -0
- package/dist/assets/images/CT-Cardiac3.png +0 -0
- package/dist/assets/images/CT-Chest-Contrast-Enhanced.png +0 -0
- package/dist/assets/images/CT-Chest-Vessels.png +0 -0
- package/dist/assets/images/CT-Coronary-Arteries-2.png +0 -0
- package/dist/assets/images/CT-Coronary-Arteries-3.png +0 -0
- package/dist/assets/images/CT-Coronary-Arteries.png +0 -0
- package/dist/assets/images/CT-Cropped-Volume-Bone.png +0 -0
- package/dist/assets/images/CT-Fat.png +0 -0
- package/dist/assets/images/CT-Liver-Vasculature.png +0 -0
- package/dist/assets/images/CT-Lung.png +0 -0
- package/dist/assets/images/CT-MIP.png +0 -0
- package/dist/assets/images/CT-Muscle.png +0 -0
- package/dist/assets/images/CT-Pulmonary-Arteries.png +0 -0
- package/dist/assets/images/CT-Soft-Tissue.png +0 -0
- package/dist/assets/images/DTI-FA-Brain.png +0 -0
- package/dist/assets/images/MR-Angio.png +0 -0
- package/dist/assets/images/MR-Default.png +0 -0
- package/dist/assets/images/MR-MIP.png +0 -0
- package/dist/assets/images/MR-T2-Brain.png +0 -0
- package/dist/assets/images/VolumeRendering.png +0 -0
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.d3a56dc9f62df5e11019.js} +3 -3
- package/dist/histogram-worker.bundle.829e14ec12c2b41a4323.js +359 -0
- package/dist/index.html +1 -1
- package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
- package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
- package/dist/polySeg.bundle.63011312c3c79e717ea9.js +249 -0
- package/dist/serve.json +12 -0
- package/dist/sw.js +1 -1
- package/package.json +26 -22
- package/dist/181.bundle.a62b9f0ec692299acb35.js +0 -1527
- package/dist/23.bundle.e008ad788170f2ed5569.js +0 -900
- package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
- package/dist/613.bundle.9e7072e5b575354fe51e.js +0 -532
- package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
- package/dist/75788f12450d4c5ed494.wasm +0 -0
- package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
- package/dist/788.bundle.207ac23c0dfa70cbe3fb.js +0 -2682
- package/dist/82.bundle.d6fdcca0f67540bb226a.js +0 -1049
- package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
- /package/dist/{19.css → 325.css} +0 -0
- /package/dist/{776.css → 41.css} +0 -0
- /package/dist/{579.css → 481.css} +0 -0
- /package/dist/{250.css → 544.css} +0 -0
- /package/dist/{221.css → 633.css} +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[540],{
|
|
2
3
|
|
|
3
|
-
/***/
|
|
4
|
+
/***/ 53540:
|
|
4
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5
6
|
|
|
6
|
-
"use strict";
|
|
7
7
|
// ESM COMPAT FLAG
|
|
8
8
|
__webpack_require__.r(__webpack_exports__);
|
|
9
9
|
|
|
@@ -11,30 +11,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11
11
|
__webpack_require__.d(__webpack_exports__, {
|
|
12
12
|
createReferencedImageDisplaySet: () => (/* reexport */ utils_createReferencedImageDisplaySet),
|
|
13
13
|
"default": () => (/* binding */ cornerstone_dicom_sr_src),
|
|
14
|
-
hydrateStructuredReport: () => (/* reexport */ hydrateStructuredReport/* default */.
|
|
14
|
+
hydrateStructuredReport: () => (/* reexport */ hydrateStructuredReport/* default */.A),
|
|
15
15
|
srProtocol: () => (/* reexport */ srProtocol)
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
19
|
-
var react = __webpack_require__(
|
|
19
|
+
var react = __webpack_require__(41766);
|
|
20
20
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/package.json
|
|
21
|
-
const package_namespaceObject = JSON.parse('{"
|
|
21
|
+
const package_namespaceObject = /*#__PURE__*/JSON.parse('{"UU":"@ohif/extension-cornerstone-dicom-sr"}');
|
|
22
22
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/id.js
|
|
23
23
|
|
|
24
|
-
const id = package_namespaceObject.
|
|
24
|
+
const id = package_namespaceObject.UU;
|
|
25
25
|
const SOPClassHandlerName = 'dicom-sr';
|
|
26
26
|
const SOPClassHandlerId = `${id}.sopClassHandlerModule.${SOPClassHandlerName}`;
|
|
27
27
|
|
|
28
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
29
|
-
var src = __webpack_require__(
|
|
30
|
-
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js +
|
|
31
|
-
var esm = __webpack_require__(
|
|
32
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
33
|
-
var dist_esm = __webpack_require__(
|
|
34
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
35
|
-
var core_dist_esm = __webpack_require__(
|
|
28
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 70 modules
|
|
29
|
+
var src = __webpack_require__(55411);
|
|
30
|
+
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
31
|
+
var esm = __webpack_require__(44753);
|
|
32
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 18 modules
|
|
33
|
+
var dist_esm = __webpack_require__(24542);
|
|
34
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 327 modules
|
|
35
|
+
var core_dist_esm = __webpack_require__(44656);
|
|
36
36
|
// EXTERNAL MODULE: ../../../extensions/cornerstone-dicom-sr/src/tools/modules/dicomSRModule.js
|
|
37
|
-
var dicomSRModule = __webpack_require__(
|
|
37
|
+
var dicomSRModule = __webpack_require__(74334);
|
|
38
38
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/constants/scoordTypes.js
|
|
39
39
|
/* harmony default export */ const scoordTypes = ({
|
|
40
40
|
POINT: 'POINT',
|
|
@@ -49,11 +49,9 @@ var dicomSRModule = __webpack_require__(64035);
|
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
52
|
-
constructor(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
configuration: {}
|
|
56
|
-
};
|
|
52
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
53
|
+
configuration: {}
|
|
54
|
+
}) {
|
|
57
55
|
super(toolProps, defaultToolProps);
|
|
58
56
|
// This tool should not inherit from AnnotationTool and we should not need
|
|
59
57
|
// to add the following lines.
|
|
@@ -76,7 +74,7 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
76
74
|
if (!annotations?.length) {
|
|
77
75
|
return;
|
|
78
76
|
}
|
|
79
|
-
const trackingUniqueIdentifiersForElement = (0,dicomSRModule/* getTrackingUniqueIdentifiersForElement */.
|
|
77
|
+
const trackingUniqueIdentifiersForElement = (0,dicomSRModule/* getTrackingUniqueIdentifiersForElement */.eF)(element);
|
|
80
78
|
const {
|
|
81
79
|
activeIndex,
|
|
82
80
|
trackingUniqueIdentifiers
|
|
@@ -93,6 +91,9 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
93
91
|
toolName: this.getToolName(),
|
|
94
92
|
viewportId: enabledElement.viewport.id
|
|
95
93
|
};
|
|
94
|
+
const {
|
|
95
|
+
style: annotationStyle
|
|
96
|
+
} = dist_esm.annotation.config;
|
|
96
97
|
for (let i = 0; i < filteredAnnotations.length; i++) {
|
|
97
98
|
const annotation = filteredAnnotations[i];
|
|
98
99
|
const annotationUID = annotation.annotationUID;
|
|
@@ -106,13 +107,15 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
106
107
|
referencedImageId
|
|
107
108
|
} = annotation.metadata;
|
|
108
109
|
styleSpecifier.annotationUID = annotationUID;
|
|
110
|
+
const groupStyle = annotationStyle.getToolGroupToolStyles(this.toolGroupId)[this.getToolName()];
|
|
109
111
|
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
110
112
|
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
111
113
|
const color = cachedStats.TrackingUniqueIdentifier === activeTrackingUniqueIdentifier ? 'rgb(0, 255, 0)' : this.getStyle('color', styleSpecifier, annotation);
|
|
112
114
|
const options = {
|
|
113
115
|
color,
|
|
114
116
|
lineDash,
|
|
115
|
-
lineWidth
|
|
117
|
+
lineWidth,
|
|
118
|
+
...groupStyle
|
|
116
119
|
};
|
|
117
120
|
Object.keys(renderableData).forEach(GraphicType => {
|
|
118
121
|
const renderableDataForGraphicType = renderableData[GraphicType];
|
|
@@ -145,20 +148,21 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
145
148
|
};
|
|
146
149
|
}
|
|
147
150
|
_getTextBoxLinesFromLabels(labels) {
|
|
148
|
-
// TODO -> max
|
|
151
|
+
// TODO -> max 5 for now (label + shortAxis + longAxis), need a generic solution for this!
|
|
149
152
|
|
|
150
|
-
const labelLength = Math.min(labels.length,
|
|
153
|
+
const labelLength = Math.min(labels.length, 5);
|
|
151
154
|
const lines = [];
|
|
152
155
|
for (let i = 0; i < labelLength; i++) {
|
|
153
156
|
const labelEntry = labels[i];
|
|
154
|
-
lines.push(`${_labelToShorthand(labelEntry.label)}${labelEntry.value}`);
|
|
157
|
+
lines.push(`${_labelToShorthand(labelEntry.label)}: ${labelEntry.value}`);
|
|
155
158
|
}
|
|
156
159
|
return lines;
|
|
157
160
|
}
|
|
158
161
|
renderPolyLine(svgDrawingHelper, viewport, renderableData, annotationUID, referencedImageId, options) {
|
|
159
162
|
const drawingOptions = {
|
|
160
163
|
color: options.color,
|
|
161
|
-
width: options.lineWidth
|
|
164
|
+
width: options.lineWidth,
|
|
165
|
+
lineDash: options.lineDash
|
|
162
166
|
};
|
|
163
167
|
let allCanvasCoordinates = [];
|
|
164
168
|
renderableData.map((data, index) => {
|
|
@@ -173,7 +177,6 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
173
177
|
});
|
|
174
178
|
return allCanvasCoordinates; // used for drawing textBox
|
|
175
179
|
}
|
|
176
|
-
|
|
177
180
|
renderMultipoint(svgDrawingHelper, viewport, renderableData, annotationUID, referencedImageId, options) {
|
|
178
181
|
let canvasCoordinates;
|
|
179
182
|
renderableData.map((data, index) => {
|
|
@@ -216,7 +219,6 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
216
219
|
});
|
|
217
220
|
return canvasCoordinates; // used for drawing textBox
|
|
218
221
|
}
|
|
219
|
-
|
|
220
222
|
renderEllipse(svgDrawingHelper, viewport, renderableData, annotationUID, referencedImageId, options) {
|
|
221
223
|
let canvasCoordinates;
|
|
222
224
|
renderableData.map((data, index) => {
|
|
@@ -237,13 +239,13 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
237
239
|
const lineUID = `${index}`;
|
|
238
240
|
dist_esm.drawing.drawEllipse(svgDrawingHelper, annotationUID, lineUID, canvasCorners[0], canvasCorners[1], {
|
|
239
241
|
color: options.color,
|
|
240
|
-
width: options.lineWidth
|
|
242
|
+
width: options.lineWidth,
|
|
243
|
+
lineDash: options.lineDash
|
|
241
244
|
});
|
|
242
245
|
});
|
|
243
246
|
return canvasCoordinates;
|
|
244
247
|
}
|
|
245
|
-
renderTextBox(svgDrawingHelper, viewport, canvasCoordinates, canvasCoordinatesAdapter, annotation, styleSpecifier) {
|
|
246
|
-
let options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
|
|
248
|
+
renderTextBox(svgDrawingHelper, viewport, canvasCoordinates, canvasCoordinatesAdapter, annotation, styleSpecifier, options = {}) {
|
|
247
249
|
if (!canvasCoordinates || !annotation) {
|
|
248
250
|
return;
|
|
249
251
|
}
|
|
@@ -264,7 +266,9 @@ class DICOMSRDisplayTool extends dist_esm.AnnotationTool {
|
|
|
264
266
|
}
|
|
265
267
|
const textLines = this._getTextBoxLinesFromLabels(label);
|
|
266
268
|
const canvasTextBoxCoords = dist_esm.utilities.drawing.getTextBoxCoordsCanvas(adaptedCanvasCoordinates);
|
|
267
|
-
annotation.data
|
|
269
|
+
if (!annotation.data?.handles?.textBox?.worldPosition) {
|
|
270
|
+
annotation.data.handles.textBox.worldPosition = viewport.canvasToWorld(canvasTextBoxCoords);
|
|
271
|
+
}
|
|
268
272
|
const textBoxPosition = viewport.worldToCanvas(annotation.data.handles.textBox.worldPosition);
|
|
269
273
|
const textBoxUID = '1';
|
|
270
274
|
const textBoxOptions = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
@@ -316,16 +320,14 @@ const toolNames = {
|
|
|
316
320
|
SRPlanarFreehandROI: 'SRPlanarFreehandROI'
|
|
317
321
|
};
|
|
318
322
|
/* harmony default export */ const tools_toolNames = (toolNames);
|
|
319
|
-
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/
|
|
323
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/addDICOMSRDisplayAnnotation.ts
|
|
320
324
|
|
|
321
325
|
|
|
322
326
|
|
|
323
327
|
|
|
324
328
|
|
|
325
329
|
const EPSILON = 1e-4;
|
|
326
|
-
|
|
327
|
-
function addMeasurement(measurement, imageId, displaySetInstanceUID) {
|
|
328
|
-
// TODO -> Render rotated ellipse .
|
|
330
|
+
function addDICOMSRDisplayAnnotation(measurement, imageId, frameNumber) {
|
|
329
331
|
const toolName = tools_toolNames.DICOMSRDisplay;
|
|
330
332
|
const measurementData = {
|
|
331
333
|
TrackingUniqueIdentifier: measurement.TrackingUniqueIdentifier,
|
|
@@ -341,48 +343,41 @@ function addMeasurement(measurement, imageId, displaySetInstanceUID) {
|
|
|
341
343
|
if (measurementData.renderableData[GraphicType] === undefined) {
|
|
342
344
|
measurementData.renderableData[GraphicType] = [];
|
|
343
345
|
}
|
|
344
|
-
measurementData.renderableData[GraphicType].push(_getRenderableData(GraphicType, GraphicData, imageId
|
|
346
|
+
measurementData.renderableData[GraphicType].push(_getRenderableData(GraphicType, GraphicData, imageId));
|
|
345
347
|
});
|
|
346
|
-
|
|
347
|
-
// Use the metadata provider to grab its imagePlaneModule metadata
|
|
348
348
|
const imagePlaneModule = core_dist_esm.metaData.get('imagePlaneModule', imageId);
|
|
349
|
-
const annotationManager = dist_esm.annotation.state.getAnnotationManager();
|
|
350
349
|
|
|
351
|
-
|
|
352
|
-
|
|
350
|
+
/**
|
|
351
|
+
* This annotation (DICOMSRDisplay) is only used by the SR viewport.
|
|
352
|
+
* This is used before the annotation is hydrated. If hydrated the measurement will be added
|
|
353
|
+
* to the measurement service and will be available for the other viewports.
|
|
354
|
+
*/
|
|
353
355
|
const SRAnnotation = {
|
|
354
356
|
annotationUID: measurement.TrackingUniqueIdentifier,
|
|
357
|
+
highlighted: false,
|
|
358
|
+
isLocked: false,
|
|
359
|
+
invalidated: false,
|
|
355
360
|
metadata: {
|
|
356
|
-
FrameOfReferenceUID: imagePlaneModule.frameOfReferenceUID,
|
|
357
361
|
toolName: toolName,
|
|
362
|
+
FrameOfReferenceUID: imagePlaneModule.frameOfReferenceUID,
|
|
358
363
|
referencedImageId: imageId
|
|
359
364
|
},
|
|
360
365
|
data: {
|
|
361
366
|
label: measurement.labels,
|
|
362
367
|
handles: {
|
|
363
|
-
textBox: {}
|
|
368
|
+
textBox: measurement.textBox ?? {}
|
|
364
369
|
},
|
|
365
370
|
cachedStats: {
|
|
366
371
|
TrackingUniqueIdentifier: measurementData.TrackingUniqueIdentifier,
|
|
367
372
|
renderableData: measurementData.renderableData
|
|
368
373
|
},
|
|
369
|
-
frameNumber
|
|
374
|
+
frameNumber
|
|
370
375
|
}
|
|
371
376
|
};
|
|
377
|
+
const annotationManager = dist_esm.annotation.state.getAnnotationManager();
|
|
372
378
|
annotationManager.addAnnotation(SRAnnotation);
|
|
373
|
-
measurement.loaded = true;
|
|
374
|
-
measurement.imageId = imageId;
|
|
375
|
-
measurement.displaySetInstanceUID = displaySetInstanceUID;
|
|
376
|
-
|
|
377
|
-
// Remove the unneeded coord now its processed, but keep the SOPInstanceUID.
|
|
378
|
-
// NOTE: We assume that each SCOORD in the MeasurementGroup maps onto one frame,
|
|
379
|
-
// It'd be super weird if it didn't anyway as a SCOORD.
|
|
380
|
-
measurement.ReferencedSOPInstanceUID = measurement.coords[0].ReferencedSOPSequence.ReferencedSOPInstanceUID;
|
|
381
|
-
measurement.frameNumber = frameNumber;
|
|
382
|
-
delete measurement.coords;
|
|
383
379
|
}
|
|
384
|
-
function _getRenderableData(GraphicType, GraphicData, imageId
|
|
385
|
-
const [cornerstoneTag, toolName] = TrackingIdentifier.split(':');
|
|
380
|
+
function _getRenderableData(GraphicType, GraphicData, imageId) {
|
|
386
381
|
let renderableData;
|
|
387
382
|
switch (GraphicType) {
|
|
388
383
|
case scoordTypes.POINT:
|
|
@@ -407,7 +402,7 @@ function _getRenderableData(GraphicType, GraphicData, imageId, TrackingIdentifie
|
|
|
407
402
|
// here we reshape the data for that purpose.
|
|
408
403
|
const center = pointsWorld[0];
|
|
409
404
|
const onPerimeter = pointsWorld[1];
|
|
410
|
-
const radius = esm/* vec3.distance */.
|
|
405
|
+
const radius = esm/* vec3.distance */.eR.distance(center, onPerimeter);
|
|
411
406
|
const imagePlaneModule = core_dist_esm.metaData.get('imagePlaneModule', imageId);
|
|
412
407
|
if (!imagePlaneModule) {
|
|
413
408
|
throw new Error('No imagePlaneModule found');
|
|
@@ -420,16 +415,16 @@ function _getRenderableData(GraphicType, GraphicData, imageId, TrackingIdentifie
|
|
|
420
415
|
// we need to get major/minor axis (which are both the same size major = minor)
|
|
421
416
|
|
|
422
417
|
// first axisStart
|
|
423
|
-
const firstAxisStart = esm/* vec3.create */.
|
|
424
|
-
esm/* vec3.scaleAndAdd */.
|
|
425
|
-
const firstAxisEnd = esm/* vec3.create */.
|
|
426
|
-
esm/* vec3.scaleAndAdd */.
|
|
418
|
+
const firstAxisStart = esm/* vec3.create */.eR.create();
|
|
419
|
+
esm/* vec3.scaleAndAdd */.eR.scaleAndAdd(firstAxisStart, center, columnCosines, radius);
|
|
420
|
+
const firstAxisEnd = esm/* vec3.create */.eR.create();
|
|
421
|
+
esm/* vec3.scaleAndAdd */.eR.scaleAndAdd(firstAxisEnd, center, columnCosines, -radius);
|
|
427
422
|
|
|
428
423
|
// second axisStart
|
|
429
|
-
const secondAxisStart = esm/* vec3.create */.
|
|
430
|
-
esm/* vec3.scaleAndAdd */.
|
|
431
|
-
const secondAxisEnd = esm/* vec3.create */.
|
|
432
|
-
esm/* vec3.scaleAndAdd */.
|
|
424
|
+
const secondAxisStart = esm/* vec3.create */.eR.create();
|
|
425
|
+
esm/* vec3.scaleAndAdd */.eR.scaleAndAdd(secondAxisStart, center, rowCosines, radius);
|
|
426
|
+
const secondAxisEnd = esm/* vec3.create */.eR.create();
|
|
427
|
+
esm/* vec3.scaleAndAdd */.eR.scaleAndAdd(secondAxisEnd, center, rowCosines, -radius);
|
|
433
428
|
renderableData = [firstAxisStart, firstAxisEnd, secondAxisStart, secondAxisEnd];
|
|
434
429
|
break;
|
|
435
430
|
}
|
|
@@ -445,18 +440,18 @@ function _getRenderableData(GraphicType, GraphicData, imageId, TrackingIdentifie
|
|
|
445
440
|
const worldPos = core_dist_esm.utilities.imageToWorldCoords(imageId, [GraphicData[i], GraphicData[i + 1]]);
|
|
446
441
|
pointsWorld.push(worldPos);
|
|
447
442
|
}
|
|
448
|
-
const majorAxisStart = esm/* vec3.fromValues */.
|
|
449
|
-
const majorAxisEnd = esm/* vec3.fromValues */.
|
|
450
|
-
const minorAxisStart = esm/* vec3.fromValues */.
|
|
451
|
-
const minorAxisEnd = esm/* vec3.fromValues */.
|
|
452
|
-
const majorAxisVec = esm/* vec3.create */.
|
|
453
|
-
esm/* vec3.sub */.
|
|
443
|
+
const majorAxisStart = esm/* vec3.fromValues */.eR.fromValues(...pointsWorld[0]);
|
|
444
|
+
const majorAxisEnd = esm/* vec3.fromValues */.eR.fromValues(...pointsWorld[1]);
|
|
445
|
+
const minorAxisStart = esm/* vec3.fromValues */.eR.fromValues(...pointsWorld[2]);
|
|
446
|
+
const minorAxisEnd = esm/* vec3.fromValues */.eR.fromValues(...pointsWorld[3]);
|
|
447
|
+
const majorAxisVec = esm/* vec3.create */.eR.create();
|
|
448
|
+
esm/* vec3.sub */.eR.sub(majorAxisVec, majorAxisEnd, majorAxisStart);
|
|
454
449
|
|
|
455
450
|
// normalize majorAxisVec to avoid scaling issues
|
|
456
|
-
esm/* vec3.normalize */.
|
|
457
|
-
const minorAxisVec = esm/* vec3.create */.
|
|
458
|
-
esm/* vec3.sub */.
|
|
459
|
-
esm/* vec3.normalize */.
|
|
451
|
+
esm/* vec3.normalize */.eR.normalize(majorAxisVec, majorAxisVec);
|
|
452
|
+
const minorAxisVec = esm/* vec3.create */.eR.create();
|
|
453
|
+
esm/* vec3.sub */.eR.sub(minorAxisVec, minorAxisEnd, minorAxisStart);
|
|
454
|
+
esm/* vec3.normalize */.eR.normalize(minorAxisVec, minorAxisVec);
|
|
460
455
|
const imagePlaneModule = core_dist_esm.metaData.get('imagePlaneModule', imageId);
|
|
461
456
|
if (!imagePlaneModule) {
|
|
462
457
|
throw new Error('imageId does not have imagePlaneModule metadata');
|
|
@@ -466,9 +461,9 @@ function _getRenderableData(GraphicType, GraphicData, imageId, TrackingIdentifie
|
|
|
466
461
|
} = imagePlaneModule;
|
|
467
462
|
|
|
468
463
|
// find which axis is parallel to the columnCosines
|
|
469
|
-
const columnCosinesVec = esm/* vec3.fromValues */.
|
|
470
|
-
const projectedMajorAxisOnColVec = Math.abs(esm/* vec3.dot */.
|
|
471
|
-
const projectedMinorAxisOnColVec = Math.abs(esm/* vec3.dot */.
|
|
464
|
+
const columnCosinesVec = esm/* vec3.fromValues */.eR.fromValues(...columnCosines);
|
|
465
|
+
const projectedMajorAxisOnColVec = Math.abs(esm/* vec3.dot */.eR.dot(columnCosinesVec, majorAxisVec));
|
|
466
|
+
const projectedMinorAxisOnColVec = Math.abs(esm/* vec3.dot */.eR.dot(columnCosinesVec, minorAxisVec));
|
|
472
467
|
const absoluteOfMajorDotProduct = Math.abs(projectedMajorAxisOnColVec);
|
|
473
468
|
const absoluteOfMinorDotProduct = Math.abs(projectedMinorAxisOnColVec);
|
|
474
469
|
renderableData = [];
|
|
@@ -487,11 +482,11 @@ function _getRenderableData(GraphicType, GraphicData, imageId, TrackingIdentifie
|
|
|
487
482
|
return renderableData;
|
|
488
483
|
}
|
|
489
484
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/adapters.es.js
|
|
490
|
-
var adapters_es = __webpack_require__(
|
|
485
|
+
var adapters_es = __webpack_require__(83342);
|
|
491
486
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/isRehydratable.js
|
|
492
487
|
|
|
493
|
-
const cornerstoneAdapters = adapters_es
|
|
494
|
-
const
|
|
488
|
+
const cornerstoneAdapters = adapters_es/* adaptersSR */.QX.Cornerstone3D.MeasurementReport.CORNERSTONE_TOOL_CLASSES_BY_UTILITY_TYPE;
|
|
489
|
+
const supportedLegacyCornerstoneTags = ['cornerstoneTools@^4.0.0'];
|
|
495
490
|
const CORNERSTONE_3D_TAG = cornerstoneAdapters.CORNERSTONE_3D_TAG;
|
|
496
491
|
|
|
497
492
|
/**
|
|
@@ -524,7 +519,7 @@ function isRehydratable(displaySet, mappings) {
|
|
|
524
519
|
} = measurements[i] || {};
|
|
525
520
|
const hydratable = adapters.some(adapter => {
|
|
526
521
|
let [cornerstoneTag, toolName] = TrackingIdentifier.split(':');
|
|
527
|
-
if (
|
|
522
|
+
if (supportedLegacyCornerstoneTags.includes(cornerstoneTag)) {
|
|
528
523
|
cornerstoneTag = CORNERSTONE_3D_TAG;
|
|
529
524
|
}
|
|
530
525
|
const mappedTrackingIdentifier = `${cornerstoneTag}:${toolName}`;
|
|
@@ -546,7 +541,7 @@ function isRehydratable(displaySet, mappings) {
|
|
|
546
541
|
|
|
547
542
|
const {
|
|
548
543
|
CodeScheme: Cornerstone3DCodeScheme
|
|
549
|
-
} = adapters_es
|
|
544
|
+
} = adapters_es/* adaptersSR */.QX.Cornerstone3D;
|
|
550
545
|
const {
|
|
551
546
|
ImageSet,
|
|
552
547
|
MetadataProvider: metadataProvider
|
|
@@ -565,7 +560,6 @@ const sopClassUids = ['1.2.840.10008.5.1.4.1.1.88.11',
|
|
|
565
560
|
//COMPREHENSIVE_SR:
|
|
566
561
|
'1.2.840.10008.5.1.4.1.1.88.34' //COMPREHENSIVE_3D_SR:
|
|
567
562
|
];
|
|
568
|
-
|
|
569
563
|
const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
|
|
570
564
|
const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
|
|
571
565
|
const validateSameStudyUID = (uid, instances) => {
|
|
@@ -589,7 +583,6 @@ const CodeNameCodeSequenceValues = {
|
|
|
589
583
|
// SRT
|
|
590
584
|
CornerstoneFreeText: Cornerstone3DCodeScheme.codeValues.CORNERSTONEFREETEXT //
|
|
591
585
|
};
|
|
592
|
-
|
|
593
586
|
const CodingSchemeDesignators = {
|
|
594
587
|
SRT: 'SRT',
|
|
595
588
|
CornerstoneCodeSchemes: [Cornerstone3DCodeScheme.CodingSchemeDesignator, 'CST4']
|
|
@@ -680,7 +673,7 @@ function _getDisplaySetsFromSeries(instances, servicesManager, extensionManager)
|
|
|
680
673
|
displaySet.load = () => _load(displaySet, servicesManager, extensionManager);
|
|
681
674
|
return [displaySet];
|
|
682
675
|
}
|
|
683
|
-
function _load(displaySet, servicesManager, extensionManager) {
|
|
676
|
+
async function _load(displaySet, servicesManager, extensionManager) {
|
|
684
677
|
const {
|
|
685
678
|
displaySetService,
|
|
686
679
|
measurementService
|
|
@@ -690,6 +683,28 @@ function _load(displaySet, servicesManager, extensionManager) {
|
|
|
690
683
|
const {
|
|
691
684
|
ContentSequence
|
|
692
685
|
} = displaySet.instance;
|
|
686
|
+
async function retrieveBulkData(obj, parentObj = null, key = null) {
|
|
687
|
+
for (const prop in obj) {
|
|
688
|
+
if (typeof obj[prop] === 'object' && obj[prop] !== null) {
|
|
689
|
+
await retrieveBulkData(obj[prop], obj, prop);
|
|
690
|
+
} else if (Array.isArray(obj[prop])) {
|
|
691
|
+
await Promise.all(obj[prop].map(item => retrieveBulkData(item, obj, prop)));
|
|
692
|
+
} else if (prop === 'BulkDataURI') {
|
|
693
|
+
const value = await dataSource.retrieve.bulkDataURI({
|
|
694
|
+
BulkDataURI: obj[prop],
|
|
695
|
+
StudyInstanceUID: displaySet.instance.StudyInstanceUID,
|
|
696
|
+
SeriesInstanceUID: displaySet.instance.SeriesInstanceUID,
|
|
697
|
+
SOPInstanceUID: displaySet.instance.SOPInstanceUID
|
|
698
|
+
});
|
|
699
|
+
if (parentObj && key) {
|
|
700
|
+
parentObj[key] = new Float32Array(value);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
if (displaySet.isLoaded !== true) {
|
|
706
|
+
await retrieveBulkData(ContentSequence);
|
|
707
|
+
}
|
|
693
708
|
displaySet.referencedImages = _getReferencedImagesList(ContentSequence);
|
|
694
709
|
displaySet.measurements = _getMeasurements(ContentSequence);
|
|
695
710
|
const mappings = measurementService.getSourceMappings(CORNERSTONE_3D_TOOLS_SOURCE_NAME, CORNERSTONE_3D_TOOLS_SOURCE_VERSION);
|
|
@@ -699,7 +714,7 @@ function _load(displaySet, servicesManager, extensionManager) {
|
|
|
699
714
|
|
|
700
715
|
// Check currently added displaySets and add measurements if the sources exist.
|
|
701
716
|
displaySetService.activeDisplaySets.forEach(activeDisplaySet => {
|
|
702
|
-
_checkIfCanAddMeasurementsToDisplaySet(displaySet, activeDisplaySet, dataSource);
|
|
717
|
+
_checkIfCanAddMeasurementsToDisplaySet(displaySet, activeDisplaySet, dataSource, servicesManager);
|
|
703
718
|
});
|
|
704
719
|
|
|
705
720
|
// Subscribe to new displaySets as the source may come in after.
|
|
@@ -710,11 +725,14 @@ function _load(displaySet, servicesManager, extensionManager) {
|
|
|
710
725
|
// If there are still some measurements that have not yet been loaded into cornerstone,
|
|
711
726
|
// See if we can load them onto any of the new displaySets.
|
|
712
727
|
displaySetsAdded.forEach(newDisplaySet => {
|
|
713
|
-
_checkIfCanAddMeasurementsToDisplaySet(displaySet, newDisplaySet, dataSource);
|
|
728
|
+
_checkIfCanAddMeasurementsToDisplaySet(displaySet, newDisplaySet, dataSource, servicesManager);
|
|
714
729
|
});
|
|
715
730
|
});
|
|
716
731
|
}
|
|
717
|
-
function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dataSource) {
|
|
732
|
+
function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dataSource, servicesManager) {
|
|
733
|
+
const {
|
|
734
|
+
customizationService
|
|
735
|
+
} = servicesManager.services;
|
|
718
736
|
let unloadedMeasurements = srDisplaySet.measurements.filter(measurement => measurement.loaded === false);
|
|
719
737
|
if (unloadedMeasurements.length === 0) {
|
|
720
738
|
// All already loaded!
|
|
@@ -724,9 +742,11 @@ function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dat
|
|
|
724
742
|
// This also filters out _this_ displaySet, as it is not an ImageSet.
|
|
725
743
|
return;
|
|
726
744
|
}
|
|
745
|
+
if (newDisplaySet.unsupported) {
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
727
748
|
const {
|
|
728
|
-
sopClassUids
|
|
729
|
-
images
|
|
749
|
+
sopClassUids
|
|
730
750
|
} = newDisplaySet;
|
|
731
751
|
|
|
732
752
|
// Check if any have the newDisplaySet is the correct SOPClass.
|
|
@@ -759,9 +779,28 @@ function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dat
|
|
|
759
779
|
} = metadataProvider.getUIDsFromImageID(imageId);
|
|
760
780
|
if (SOPInstanceUIDs.includes(SOPInstanceUID)) {
|
|
761
781
|
for (let j = unloadedMeasurements.length - 1; j >= 0; j--) {
|
|
762
|
-
|
|
782
|
+
let measurement = unloadedMeasurements[j];
|
|
783
|
+
const onBeforeSRAddMeasurement = customizationService.getModeCustomization('onBeforeSRAddMeasurement')?.value;
|
|
784
|
+
if (typeof onBeforeSRAddMeasurement === 'function') {
|
|
785
|
+
measurement = onBeforeSRAddMeasurement({
|
|
786
|
+
measurement,
|
|
787
|
+
StudyInstanceUID: srDisplaySet.StudyInstanceUID,
|
|
788
|
+
SeriesInstanceUID: srDisplaySet.SeriesInstanceUID
|
|
789
|
+
});
|
|
790
|
+
}
|
|
763
791
|
if (_measurementReferencesSOPInstanceUID(measurement, SOPInstanceUID, frameNumber)) {
|
|
764
|
-
|
|
792
|
+
const frame = measurement.coords[0].ReferencedSOPSequence && measurement.coords[0].ReferencedSOPSequence?.ReferencedFrameNumber || 1;
|
|
793
|
+
|
|
794
|
+
/** Add DICOMSRDisplay annotation for the SR viewport (only) */
|
|
795
|
+
addDICOMSRDisplayAnnotation(measurement, imageId, frame);
|
|
796
|
+
|
|
797
|
+
/** Update measurement properties */
|
|
798
|
+
measurement.loaded = true;
|
|
799
|
+
measurement.imageId = imageId;
|
|
800
|
+
measurement.displaySetInstanceUID = newDisplaySet.displaySetInstanceUID;
|
|
801
|
+
measurement.ReferencedSOPInstanceUID = measurement.coords[0].ReferencedSOPSequence.ReferencedSOPInstanceUID;
|
|
802
|
+
measurement.frameNumber = frame;
|
|
803
|
+
delete measurement.coords;
|
|
765
804
|
unloadedMeasurements.splice(j, 1);
|
|
766
805
|
}
|
|
767
806
|
}
|
|
@@ -775,7 +814,7 @@ function _measurementReferencesSOPInstanceUID(measurement, SOPInstanceUID, frame
|
|
|
775
814
|
|
|
776
815
|
// NOTE: The ReferencedFrameNumber can be multiple values according to the DICOM
|
|
777
816
|
// Standard. But for now, we will support only one ReferenceFrameNumber.
|
|
778
|
-
const ReferencedFrameNumber = measurement.coords[0].ReferencedSOPSequence && measurement.coords[0].ReferencedSOPSequence
|
|
817
|
+
const ReferencedFrameNumber = measurement.coords[0].ReferencedSOPSequence && measurement.coords[0].ReferencedSOPSequence?.ReferencedFrameNumber || 1;
|
|
779
818
|
if (frameNumber && Number(frameNumber) !== Number(ReferencedFrameNumber)) {
|
|
780
819
|
return false;
|
|
781
820
|
}
|
|
@@ -789,11 +828,10 @@ function _measurementReferencesSOPInstanceUID(measurement, SOPInstanceUID, frame
|
|
|
789
828
|
}
|
|
790
829
|
}
|
|
791
830
|
}
|
|
792
|
-
function getSopClassHandlerModule(
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
} = _ref;
|
|
831
|
+
function getSopClassHandlerModule({
|
|
832
|
+
servicesManager,
|
|
833
|
+
extensionManager
|
|
834
|
+
}) {
|
|
797
835
|
const getDisplaySetsFromSeries = instances => {
|
|
798
836
|
return _getDisplaySetsFromSeries(instances, servicesManager, extensionManager);
|
|
799
837
|
};
|
|
@@ -978,7 +1016,6 @@ function _getLabelFromMeasuredValueSequence(ConceptNameCodeSequence, MeasuredVal
|
|
|
978
1016
|
value: `${formatedNumericValue} ${CodeValue}`
|
|
979
1017
|
}; // E.g. Long Axis: 31.0 mm
|
|
980
1018
|
}
|
|
981
|
-
|
|
982
1019
|
function _getReferencedImagesList(ImagingMeasurementReportContentSequence) {
|
|
983
1020
|
const ImageLibrary = ImagingMeasurementReportContentSequence.find(item => item.ConceptNameCodeSequence.CodeValue === CodeNameCodeSequenceValues.ImageLibrary);
|
|
984
1021
|
const ImageLibraryGroup = _getSequenceAsArray(ImageLibrary.ContentSequence).find(item => item.ConceptNameCodeSequence.CodeValue === CodeNameCodeSequenceValues.ImageLibraryGroup);
|
|
@@ -1078,10 +1115,9 @@ function getHangingProtocolModule() {
|
|
|
1078
1115
|
|
|
1079
1116
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/onModeEnter.js
|
|
1080
1117
|
|
|
1081
|
-
function onModeEnter(
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
} = _ref;
|
|
1118
|
+
function onModeEnter({
|
|
1119
|
+
servicesManager
|
|
1120
|
+
}) {
|
|
1085
1121
|
const {
|
|
1086
1122
|
displaySetService
|
|
1087
1123
|
} = servicesManager.services;
|
|
@@ -1093,13 +1129,13 @@ function onModeEnter(_ref) {
|
|
|
1093
1129
|
});
|
|
1094
1130
|
}
|
|
1095
1131
|
// EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
|
|
1096
|
-
var dcmjs_es = __webpack_require__(
|
|
1132
|
+
var dcmjs_es = __webpack_require__(31426);
|
|
1097
1133
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/getFilteredCornerstoneToolState.ts
|
|
1098
1134
|
|
|
1099
1135
|
|
|
1100
1136
|
const {
|
|
1101
1137
|
log
|
|
1102
|
-
} = src
|
|
1138
|
+
} = src/* default */.Ay;
|
|
1103
1139
|
function getFilteredCornerstoneToolState(measurementData, additionalFindingTypes) {
|
|
1104
1140
|
const filteredToolState = {};
|
|
1105
1141
|
function addToFilteredToolState(annotation, toolType) {
|
|
@@ -1187,10 +1223,10 @@ function getFilteredCornerstoneToolState(measurementData, additionalFindingTypes
|
|
|
1187
1223
|
|
|
1188
1224
|
const {
|
|
1189
1225
|
MeasurementReport
|
|
1190
|
-
} = adapters_es
|
|
1226
|
+
} = adapters_es/* adaptersSR */.QX.Cornerstone3D;
|
|
1191
1227
|
const {
|
|
1192
1228
|
log: commandsModule_log
|
|
1193
|
-
} = src
|
|
1229
|
+
} = src/* default */.Ay;
|
|
1194
1230
|
|
|
1195
1231
|
/**
|
|
1196
1232
|
*
|
|
@@ -1200,8 +1236,7 @@ const {
|
|
|
1200
1236
|
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1201
1237
|
*
|
|
1202
1238
|
*/
|
|
1203
|
-
const _generateReport =
|
|
1204
|
-
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
1239
|
+
const _generateReport = (measurementData, additionalFindingTypes, options = {}) => {
|
|
1205
1240
|
const filteredToolState = utils_getFilteredCornerstoneToolState(measurementData, additionalFindingTypes);
|
|
1206
1241
|
const report = MeasurementReport.generateReport(filteredToolState, core_dist_esm.metaData, core_dist_esm.utilities.worldToImageCoords, options);
|
|
1207
1242
|
const {
|
|
@@ -1215,8 +1250,13 @@ const _generateReport = function (measurementData, additionalFindingTypes) {
|
|
|
1215
1250
|
}
|
|
1216
1251
|
return dataset;
|
|
1217
1252
|
};
|
|
1218
|
-
const commandsModule =
|
|
1219
|
-
|
|
1253
|
+
const commandsModule = props => {
|
|
1254
|
+
const {
|
|
1255
|
+
servicesManager
|
|
1256
|
+
} = props;
|
|
1257
|
+
const {
|
|
1258
|
+
customizationService
|
|
1259
|
+
} = servicesManager.services;
|
|
1220
1260
|
const actions = {
|
|
1221
1261
|
/**
|
|
1222
1262
|
*
|
|
@@ -1226,14 +1266,13 @@ const commandsModule = _ref => {
|
|
|
1226
1266
|
* as opposed to Finding Sites.
|
|
1227
1267
|
* that you wish to serialize.
|
|
1228
1268
|
*/
|
|
1229
|
-
downloadReport:
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
} = _ref2;
|
|
1269
|
+
downloadReport: ({
|
|
1270
|
+
measurementData,
|
|
1271
|
+
additionalFindingTypes,
|
|
1272
|
+
options = {}
|
|
1273
|
+
}) => {
|
|
1235
1274
|
const srDataset = actions.generateReport(measurementData, additionalFindingTypes, options);
|
|
1236
|
-
const reportBlob = dcmjs_es
|
|
1275
|
+
const reportBlob = dcmjs_es/* default.data */.Ay.data.datasetToBlob(srDataset);
|
|
1237
1276
|
|
|
1238
1277
|
//Create a URL for the binary.
|
|
1239
1278
|
var objectUrl = URL.createObjectURL(reportBlob);
|
|
@@ -1248,13 +1287,12 @@ const commandsModule = _ref => {
|
|
|
1248
1287
|
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1249
1288
|
* @return The naturalized report
|
|
1250
1289
|
*/
|
|
1251
|
-
storeMeasurements: async
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
} = _ref3;
|
|
1290
|
+
storeMeasurements: async ({
|
|
1291
|
+
measurementData,
|
|
1292
|
+
dataSource,
|
|
1293
|
+
additionalFindingTypes,
|
|
1294
|
+
options = {}
|
|
1295
|
+
}) => {
|
|
1258
1296
|
// Use the @cornerstonejs adapter for converting to/from DICOM
|
|
1259
1297
|
// But it is good enough for now whilst we only have cornerstone as a datasource.
|
|
1260
1298
|
commandsModule_log.info('[DICOMSR] storeMeasurements');
|
|
@@ -1275,7 +1313,15 @@ const commandsModule = _ref => {
|
|
|
1275
1313
|
console.log('naturalizedReport missing imaging content', naturalizedReport);
|
|
1276
1314
|
throw new Error('Invalid report, no content');
|
|
1277
1315
|
}
|
|
1278
|
-
|
|
1316
|
+
const onBeforeDicomStore = customizationService.getModeCustomization('onBeforeDicomStore')?.value;
|
|
1317
|
+
let dicomDict;
|
|
1318
|
+
if (typeof onBeforeDicomStore === 'function') {
|
|
1319
|
+
dicomDict = onBeforeDicomStore({
|
|
1320
|
+
measurementData,
|
|
1321
|
+
naturalizedReport
|
|
1322
|
+
});
|
|
1323
|
+
}
|
|
1324
|
+
await dataSource.store.dicom(naturalizedReport, null, dicomDict);
|
|
1279
1325
|
if (StudyInstanceUID) {
|
|
1280
1326
|
dataSource.deleteStudyMetadataPromise(StudyInstanceUID);
|
|
1281
1327
|
}
|
|
@@ -1294,14 +1340,10 @@ const commandsModule = _ref => {
|
|
|
1294
1340
|
};
|
|
1295
1341
|
const definitions = {
|
|
1296
1342
|
downloadReport: {
|
|
1297
|
-
commandFn: actions.downloadReport
|
|
1298
|
-
storeContexts: [],
|
|
1299
|
-
options: {}
|
|
1343
|
+
commandFn: actions.downloadReport
|
|
1300
1344
|
},
|
|
1301
1345
|
storeMeasurements: {
|
|
1302
|
-
commandFn: actions.storeMeasurements
|
|
1303
|
-
storeContexts: [],
|
|
1304
|
-
options: {}
|
|
1346
|
+
commandFn: actions.storeMeasurements
|
|
1305
1347
|
}
|
|
1306
1348
|
};
|
|
1307
1349
|
return {
|
|
@@ -1327,28 +1369,28 @@ function addToolInstance(name, toolClass, configuration) {
|
|
|
1327
1369
|
/**
|
|
1328
1370
|
* @param {object} configuration
|
|
1329
1371
|
*/
|
|
1330
|
-
function init(
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
(
|
|
1335
|
-
addToolInstance(tools_toolNames.SRLength, dist_esm.LengthTool, {});
|
|
1372
|
+
function init({
|
|
1373
|
+
configuration = {}
|
|
1374
|
+
}) {
|
|
1375
|
+
addToolInstance(tools_toolNames.DICOMSRDisplay, DICOMSRDisplayTool);
|
|
1376
|
+
addToolInstance(tools_toolNames.SRLength, dist_esm.LengthTool);
|
|
1336
1377
|
addToolInstance(tools_toolNames.SRBidirectional, dist_esm.BidirectionalTool);
|
|
1337
1378
|
addToolInstance(tools_toolNames.SREllipticalROI, dist_esm.EllipticalROITool);
|
|
1338
1379
|
addToolInstance(tools_toolNames.SRCircleROI, dist_esm.CircleROITool);
|
|
1339
1380
|
addToolInstance(tools_toolNames.SRArrowAnnotate, dist_esm.ArrowAnnotateTool);
|
|
1340
1381
|
addToolInstance(tools_toolNames.SRAngle, dist_esm.AngleTool);
|
|
1382
|
+
addToolInstance(tools_toolNames.SRPlanarFreehandROI, dist_esm.PlanarFreehandROITool);
|
|
1383
|
+
addToolInstance(tools_toolNames.SRRectangleROI, dist_esm.RectangleROITool);
|
|
1384
|
+
|
|
1341
1385
|
// TODO - fix the SR display of Cobb Angle, as it joins the two lines
|
|
1342
1386
|
addToolInstance(tools_toolNames.SRCobbAngle, dist_esm.CobbAngleTool);
|
|
1343
|
-
// TODO - fix the rehydration of Freehand, as it throws an exception
|
|
1344
|
-
// on a missing polyline. The fix is probably in CS3D
|
|
1345
|
-
addToolInstance(tools_toolNames.SRPlanarFreehandROI, dist_esm.PlanarFreehandROITool);
|
|
1346
1387
|
|
|
1347
1388
|
// Modify annotation tools to use dashed lines on SR
|
|
1348
1389
|
const dashedLine = {
|
|
1349
1390
|
lineDash: '4,4'
|
|
1350
1391
|
};
|
|
1351
1392
|
dist_esm.annotation.config.style.setToolGroupToolStyles('SRToolGroup', {
|
|
1393
|
+
[tools_toolNames.DICOMSRDisplay]: dashedLine,
|
|
1352
1394
|
SRLength: dashedLine,
|
|
1353
1395
|
SRBidirectional: dashedLine,
|
|
1354
1396
|
SREllipticalROI: dashedLine,
|
|
@@ -1357,11 +1399,12 @@ function init(_ref) {
|
|
|
1357
1399
|
SRCobbAngle: dashedLine,
|
|
1358
1400
|
SRAngle: dashedLine,
|
|
1359
1401
|
SRPlanarFreehandROI: dashedLine,
|
|
1402
|
+
SRRectangleROI: dashedLine,
|
|
1360
1403
|
global: {}
|
|
1361
1404
|
});
|
|
1362
1405
|
}
|
|
1363
1406
|
// EXTERNAL MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js + 1 modules
|
|
1364
|
-
var hydrateStructuredReport = __webpack_require__(
|
|
1407
|
+
var hydrateStructuredReport = __webpack_require__(77089);
|
|
1365
1408
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/createReferencedImageDisplaySet.ts
|
|
1366
1409
|
|
|
1367
1410
|
const createReferencedImageDisplaySet_ImageSet = src.classes.ImageSet;
|
|
@@ -1460,7 +1503,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
1460
1503
|
|
|
1461
1504
|
|
|
1462
1505
|
const Component = /*#__PURE__*/react.lazy(() => {
|
|
1463
|
-
return __webpack_require__.e(/* import() */
|
|
1506
|
+
return __webpack_require__.e(/* import() */ 530).then(__webpack_require__.bind(__webpack_require__, 58530));
|
|
1464
1507
|
});
|
|
1465
1508
|
const OHIFCornerstoneSRViewport = props => {
|
|
1466
1509
|
return /*#__PURE__*/react.createElement(react.Suspense, {
|
|
@@ -1484,11 +1527,10 @@ const dicomSRExtension = {
|
|
|
1484
1527
|
* @param {object} [configuration={}]
|
|
1485
1528
|
* @param {object|array} [configuration.csToolsConfig] - Passed directly to `initCornerstoneTools`
|
|
1486
1529
|
*/
|
|
1487
|
-
getViewportModule(
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
} = _ref;
|
|
1530
|
+
getViewportModule({
|
|
1531
|
+
servicesManager,
|
|
1532
|
+
extensionManager
|
|
1533
|
+
}) {
|
|
1492
1534
|
const ExtendedOHIFCornerstoneSRViewport = props => {
|
|
1493
1535
|
return /*#__PURE__*/react.createElement(OHIFCornerstoneSRViewport, _extends({
|
|
1494
1536
|
servicesManager: servicesManager,
|
|
@@ -1503,10 +1545,9 @@ const dicomSRExtension = {
|
|
|
1503
1545
|
getCommandsModule: src_commandsModule,
|
|
1504
1546
|
getSopClassHandlerModule: src_getSopClassHandlerModule,
|
|
1505
1547
|
// Include dynamically computed values such as toolNames not known till instantiation
|
|
1506
|
-
getUtilityModule(
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
} = _ref2;
|
|
1548
|
+
getUtilityModule({
|
|
1549
|
+
servicesManager
|
|
1550
|
+
}) {
|
|
1510
1551
|
return [{
|
|
1511
1552
|
name: 'tools',
|
|
1512
1553
|
exports: {
|
|
@@ -1522,16 +1563,15 @@ const dicomSRExtension = {
|
|
|
1522
1563
|
|
|
1523
1564
|
/***/ }),
|
|
1524
1565
|
|
|
1525
|
-
/***/
|
|
1566
|
+
/***/ 74334:
|
|
1526
1567
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1527
1568
|
|
|
1528
|
-
"use strict";
|
|
1529
1569
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1530
|
-
/* harmony export */
|
|
1531
|
-
/* harmony export */
|
|
1570
|
+
/* harmony export */ eF: () => (/* binding */ getTrackingUniqueIdentifiersForElement),
|
|
1571
|
+
/* harmony export */ m1: () => (/* binding */ setTrackingUniqueIdentifiersForElement)
|
|
1532
1572
|
/* harmony export */ });
|
|
1533
1573
|
/* unused harmony export setActiveTrackingUniqueIdentifierForElement */
|
|
1534
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1574
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44656);
|
|
1535
1575
|
|
|
1536
1576
|
const state = {
|
|
1537
1577
|
TrackingUniqueIdentifier: null,
|
|
@@ -1546,8 +1586,7 @@ const state = {
|
|
|
1546
1586
|
* of the SR tools in state here, so that we can filter them later.
|
|
1547
1587
|
*/
|
|
1548
1588
|
|
|
1549
|
-
function setTrackingUniqueIdentifiersForElement(element, trackingUniqueIdentifiers) {
|
|
1550
|
-
let activeIndex = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
|
|
1589
|
+
function setTrackingUniqueIdentifiersForElement(element, trackingUniqueIdentifiers, activeIndex = 0) {
|
|
1551
1590
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
1552
1591
|
const {
|
|
1553
1592
|
viewport
|
|
@@ -1584,20 +1623,19 @@ function getTrackingUniqueIdentifiersForElement(element) {
|
|
|
1584
1623
|
|
|
1585
1624
|
/***/ }),
|
|
1586
1625
|
|
|
1587
|
-
/***/
|
|
1626
|
+
/***/ 77089:
|
|
1588
1627
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1589
1628
|
|
|
1590
|
-
"use strict";
|
|
1591
1629
|
|
|
1592
1630
|
// EXPORTS
|
|
1593
1631
|
__webpack_require__.d(__webpack_exports__, {
|
|
1594
|
-
|
|
1632
|
+
A: () => (/* binding */ hydrateStructuredReport)
|
|
1595
1633
|
});
|
|
1596
1634
|
|
|
1597
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
1598
|
-
var esm = __webpack_require__(
|
|
1599
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
1600
|
-
var src = __webpack_require__(
|
|
1635
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 327 modules
|
|
1636
|
+
var esm = __webpack_require__(44656);
|
|
1637
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 70 modules
|
|
1638
|
+
var src = __webpack_require__(55411);
|
|
1601
1639
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/getLabelFromDCMJSImportedToolData.js
|
|
1602
1640
|
/**
|
|
1603
1641
|
* Extracts the label from the toolData imported from dcmjs. We need to do this
|
|
@@ -1621,9 +1659,9 @@ function getLabelFromDCMJSImportedToolData(toolData) {
|
|
|
1621
1659
|
}
|
|
1622
1660
|
}
|
|
1623
1661
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/adapters.es.js
|
|
1624
|
-
var adapters_es = __webpack_require__(
|
|
1625
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js +
|
|
1626
|
-
var dist_esm = __webpack_require__(
|
|
1662
|
+
var adapters_es = __webpack_require__(83342);
|
|
1663
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js + 18 modules
|
|
1664
|
+
var dist_esm = __webpack_require__(24542);
|
|
1627
1665
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js
|
|
1628
1666
|
|
|
1629
1667
|
|
|
@@ -1635,11 +1673,11 @@ const {
|
|
|
1635
1673
|
} = dist_esm.annotation;
|
|
1636
1674
|
const {
|
|
1637
1675
|
guid
|
|
1638
|
-
} = src
|
|
1676
|
+
} = src/* default.utils */.Ay.utils;
|
|
1639
1677
|
const {
|
|
1640
1678
|
MeasurementReport,
|
|
1641
1679
|
CORNERSTONE_3D_TAG
|
|
1642
|
-
} = adapters_es
|
|
1680
|
+
} = adapters_es/* adaptersSR */.QX.Cornerstone3D;
|
|
1643
1681
|
const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
|
|
1644
1682
|
const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
|
|
1645
1683
|
const supportedLegacyCornerstoneTags = ['cornerstoneTools@^4.0.0'];
|
|
@@ -1676,12 +1714,11 @@ const convertSites = (codingValues, sites) => {
|
|
|
1676
1714
|
* Hydrates a structured report, for default viewports.
|
|
1677
1715
|
*
|
|
1678
1716
|
*/
|
|
1679
|
-
function hydrateStructuredReport(
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
} = _ref;
|
|
1717
|
+
function hydrateStructuredReport({
|
|
1718
|
+
servicesManager,
|
|
1719
|
+
extensionManager,
|
|
1720
|
+
appConfig
|
|
1721
|
+
}, displaySetInstanceUID) {
|
|
1685
1722
|
const annotationManager = dist_esm.annotation.state.getAnnotationManager();
|
|
1686
1723
|
const disableEditing = appConfig?.disableEditing;
|
|
1687
1724
|
const dataSource = extensionManager.getActiveDataSource()[0];
|
|
@@ -1718,12 +1755,19 @@ function hydrateStructuredReport(_ref, displaySetInstanceUID) {
|
|
|
1718
1755
|
const datasetToUse = _mapLegacyDataSet(instance);
|
|
1719
1756
|
|
|
1720
1757
|
// Use dcmjs to generate toolState.
|
|
1721
|
-
|
|
1758
|
+
let storedMeasurementByAnnotationType = MeasurementReport.generateToolState(datasetToUse,
|
|
1722
1759
|
// NOTE: we need to pass in the imageIds to dcmjs since the we use them
|
|
1723
1760
|
// for the imageToWorld transformation. The following assumes that the order
|
|
1724
1761
|
// that measurements were added to the display set are the same order as
|
|
1725
1762
|
// the measurementGroups in the instance.
|
|
1726
1763
|
sopInstanceUIDToImageId, esm.utilities.imageToWorldCoords, esm.metaData);
|
|
1764
|
+
const onBeforeSRHydration = customizationService.getModeCustomization('onBeforeSRHydration')?.value;
|
|
1765
|
+
if (typeof onBeforeSRHydration === 'function') {
|
|
1766
|
+
storedMeasurementByAnnotationType = onBeforeSRHydration({
|
|
1767
|
+
storedMeasurementByAnnotationType,
|
|
1768
|
+
displaySet
|
|
1769
|
+
});
|
|
1770
|
+
}
|
|
1727
1771
|
|
|
1728
1772
|
// Filter what is found by DICOM SR to measurements we support.
|
|
1729
1773
|
const mappingDefinitions = mappings.map(m => m.annotationType);
|
|
@@ -1860,13 +1904,6 @@ const codeMeaningEquals = codeMeaningName => {
|
|
|
1860
1904
|
};
|
|
1861
1905
|
};
|
|
1862
1906
|
|
|
1863
|
-
/***/ }),
|
|
1864
|
-
|
|
1865
|
-
/***/ 78753:
|
|
1866
|
-
/***/ (() => {
|
|
1867
|
-
|
|
1868
|
-
/* (ignored) */
|
|
1869
|
-
|
|
1870
1907
|
/***/ })
|
|
1871
1908
|
|
|
1872
1909
|
}]);
|