@ohif/app 3.13.0-beta.5 → 3.13.0-beta.51
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/{1459.bundle.61caf834dbb820188bc4.js → 1459.bundle.03f6812bbebed223ac0a.js} +5 -6
- package/dist/{147.bundle.37d627289453cb6c3937.js → 147.bundle.3c8fa1f478644636898a.js} +21 -45
- package/dist/{1608.bundle.0687c661f1c9edfb3b8a.js → 1608.bundle.c10d9aef452fe5a86d77.js} +12 -12
- package/dist/{1927.bundle.3050588e95f43cf57cdd.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
- package/dist/{1933.bundle.afeaf853f1b9bb471d09.js → 1933.bundle.d1c853d4459eabcac0fc.js} +32 -27
- package/dist/{2018.bundle.f94c5a365f20da582cce.js → 2018.bundle.df77dcb95a7eb7194752.js} +18 -19
- package/dist/{6409.bundle.b36048896cb11c8571fb.js → 2075.bundle.0e69a126a39539ff8e9a.js} +308 -237
- package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
- package/dist/{213.bundle.b03e90c6260533129e4a.js → 213.bundle.4f2dc5a26c4bdfea9038.js} +3 -5
- package/dist/{2424.bundle.36b384fa160f62791af2.js → 2424.bundle.225f1b88d037ff1e8d2b.js} +3 -5
- package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
- package/dist/{2701.bundle.12bd01a80a9f8ea4cd94.js → 2701.bundle.28b3ca0e6ae5a13f78b3.js} +10 -10
- package/dist/{1730.bundle.9ccc50f800b3dce59bed.js → 3138.bundle.5594231be4399fa822f2.js} +14 -308
- package/dist/{3461.bundle.f63b5cb53237ed77e684.js → 3461.bundle.c453ad511e18741f5b36.js} +126 -107
- package/dist/{4202.bundle.5a0f8e4004c5d8a68548.js → 4202.bundle.f11f02596e30a22d1105.js} +6 -6
- package/dist/{4019.bundle.83a604779f7da0101ced.js → 4287.bundle.b7840e7b94cbbc102236.js} +348 -237
- package/dist/{5462.bundle.21beddaca145b7465c72.js → 4406.bundle.573d234b4641d23cf8db.js} +1083 -1308
- package/dist/{1403.bundle.8b63385cd43188c65459.js → 4507.bundle.152cf927b86b6e295b7f.js} +10 -305
- package/dist/{3081.bundle.81ed137529d1fb98d456.js → 4688.bundle.05c4c23606587b3e82bd.js} +657 -382
- package/dist/{4819.bundle.2085e6422ae2249830c4.js → 4819.bundle.b29eaf88762b95912d1d.js} +37 -37
- package/dist/{4775.bundle.308d5e29044a36b3039f.js → 5015.bundle.322992b6dcb647ecf70e.js} +29 -333
- package/dist/{5028.bundle.af59f031d8564db81587.js → 5028.bundle.d5e5ec2e2fae9a8c0dfa.js} +11 -13
- package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
- package/dist/{5457.bundle.59d61b8ad0daad3b8094.js → 5457.bundle.bd64924038b08fa7154b.js} +16 -23
- package/dist/{5485.bundle.238541403cdc7dd4ad60.js → 5485.bundle.538097cf423423cc9cae.js} +20 -32
- package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
- package/dist/{5802.bundle.3bf5e6b3ab330a594a47.js → 5802.bundle.8b2c04396d68ba668af5.js} +77 -18
- package/dist/5802.css +1 -1
- package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
- package/dist/{5858.bundle.ff6b340cf7457db76a1a.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
- package/dist/{6027.bundle.6cab80c16ed182c98ef7.js → 6027.bundle.f36aa36a2281dff6e29b.js} +3 -5
- package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.929febcf6d326e582e00.js} +151 -140
- package/dist/{6376.bundle.9cb74d7bc08476e2f1a7.js → 6376.bundle.839c708f2fc41e76ee58.js} +6 -6
- package/dist/{2842.bundle.860b9f10fcdd9656947a.js → 6386.bundle.e75a2f70039dfe42f935.js} +886 -2297
- package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
- package/dist/{7159.bundle.a5991a5d4f0dd8f1c95f.js → 7159.bundle.fb9df255868960f69765.js} +7 -5
- package/dist/{7190.bundle.e8f0193e0e06472f795c.js → 7190.bundle.6314b558746e394aeb0e.js} +40 -40
- package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
- package/dist/{7431.bundle.b01791d10e6cf9f503b0.js → 7431.bundle.5e14641f2c71e852abe7.js} +28 -28
- package/dist/{4410.bundle.c5224cd7d6238a7d4660.js → 7537.bundle.1c612642a1e8a96179ed.js} +5180 -2219
- package/dist/{7639.bundle.b32630bff861ac1b8e89.js → 7639.bundle.f89778f572ee3caeb6fb.js} +3 -5
- package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
- package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
- package/dist/{8305.bundle.0cbccd2240389ee9a4a4.js → 8305.bundle.accd9d9b56fd08402c9e.js} +69 -64
- package/dist/{6163.bundle.53852173360d1a4a1480.js → 8499.bundle.26a487dbfa7be0837750.js} +7 -302
- package/dist/8499.css +2 -0
- package/dist/{85.bundle.62bab793d6689f8a1ec2.js → 85.bundle.85120dcfbb03af4fa5a7.js} +3 -5
- package/dist/{8558.bundle.80aa787d04cd852a2c00.js → 8558.bundle.c778f722abdb0a66bc34.js} +15 -309
- package/dist/{8583.bundle.ab0e069832ce2a6c9844.js → 8583.bundle.243229c3ff277630ddb8.js} +22 -25
- package/dist/{6347.bundle.784c48912700f281de1d.js → 8963.bundle.0f106869f9d0eb0bba03.js} +534 -570
- package/dist/{997.bundle.822b33e561263084e18c.js → 9039.bundle.6c84d903d5baaecf2f3a.js} +3817 -2912
- package/dist/{9195.bundle.8016f417b67b2eb1c1f4.js → 9195.bundle.95ca6983f6a87e433d79.js} +239 -152
- package/dist/{7412.bundle.fab1742191b7fe937330.js → 9205.bundle.9a5f5dd04fd0831d9a4a.js} +5942 -3253
- package/dist/{3584.bundle.8cc0750425513433e9cc.js → 9567.bundle.be350438bed4e656f278.js} +3422 -2880
- package/dist/{9845.bundle.255e7c7f7a88193b4e47.js → 9845.bundle.36b3563ae1dba65b6b9a.js} +10 -10
- package/dist/{9862.bundle.3a8958a82c572015d25d.js → 9862.bundle.51a1e7030f6b635d9528.js} +8 -6
- package/dist/{9927.bundle.8dc1813e602296f01090.js → 9927.bundle.fa13d8f3b034e48c00d3.js} +4 -6
- package/dist/app.bundle.css +3 -3
- package/dist/{app.bundle.a4ba14820ccf58a3956c.js → app.bundle.f5b1d8747965f98a72a8.js} +94613 -92508
- package/dist/{polySeg.bundle.a5aa9130b4191253c410.js → compute.bundle.ba3878791df68055b11d.js} +8 -20
- package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.a2a50c4674d99c619ca7.js} +11 -23
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.c70cb95d164dc494e6dc.js → interpolation.bundle.53073c15cca1c5a41ae4.js} +14 -26
- package/dist/{compute.bundle.64280c7af19ff567465f.js → polySeg.bundle.70369a8c69b843375431.js} +10 -22
- package/dist/sw.js +1 -1
- package/package.json +23 -22
- package/dist/3343.bundle.d7578ce8f75d158c0bab.js +0 -297
- /package/dist/{1730.css → 3138.css} +0 -0
- /package/dist/{3343.css → 4972.css} +0 -0
- /package/dist/{6163.css → 7829.css} +0 -0
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[3461],{
|
|
3
3
|
|
|
4
|
-
/***/ 74137
|
|
5
|
-
|
|
4
|
+
/***/ 74137
|
|
5
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
6
|
|
|
7
7
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8
|
-
/* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
9
8
|
/* harmony export */ bY: () => (/* binding */ CodingSchemeDesignators),
|
|
10
9
|
/* harmony export */ n7: () => (/* binding */ CodeNameCodeSequenceValues),
|
|
11
10
|
/* harmony export */ sh: () => (/* binding */ SCOORDTypes)
|
|
12
11
|
/* harmony export */ });
|
|
13
12
|
/* unused harmony export RelationshipType */
|
|
14
|
-
/* harmony import */ var _cornerstonejs_adapters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
13
|
+
/* harmony import */ var _cornerstonejs_adapters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(28963);
|
|
15
14
|
|
|
16
15
|
const {
|
|
17
16
|
CodeScheme: Cornerstone3DCodeScheme
|
|
@@ -51,36 +50,32 @@ const enums = {
|
|
|
51
50
|
RelationshipType,
|
|
52
51
|
SCOORDTypes
|
|
53
52
|
};
|
|
54
|
-
/* harmony default export */
|
|
53
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (enums)));
|
|
55
54
|
|
|
56
|
-
/***/ }
|
|
55
|
+
/***/ },
|
|
57
56
|
|
|
58
|
-
/***/ 93461
|
|
59
|
-
|
|
57
|
+
/***/ 93461
|
|
58
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
60
59
|
|
|
61
|
-
// ESM COMPAT FLAG
|
|
62
|
-
__webpack_require__.r(__webpack_exports__);
|
|
63
60
|
|
|
64
61
|
// EXPORTS
|
|
65
62
|
__webpack_require__.d(__webpack_exports__, {
|
|
66
|
-
Enums: () => (/* reexport */ enums/* default */.Ay),
|
|
67
|
-
createReferencedImageDisplaySet: () => (/* reexport */ createReferencedImageDisplaySet/* default */.A),
|
|
68
63
|
"default": () => (/* binding */ cornerstone_dicom_sr_src),
|
|
69
|
-
|
|
70
|
-
srProtocol: () => (/* reexport */ srProtocol),
|
|
71
|
-
toolNames: () => (/* reexport */ tools_toolNames)
|
|
64
|
+
$F: () => (/* reexport */ hydrateStructuredReport)
|
|
72
65
|
});
|
|
73
66
|
|
|
67
|
+
// UNUSED EXPORTS: Enums, createReferencedImageDisplaySet, srProtocol, toolNames
|
|
68
|
+
|
|
74
69
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
75
70
|
var react = __webpack_require__(86326);
|
|
76
71
|
// EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
|
|
77
72
|
var src = __webpack_require__(42356);
|
|
78
73
|
// EXTERNAL MODULE: ../../i18n/src/index.js + 286 modules
|
|
79
74
|
var i18n_src = __webpack_require__(89010);
|
|
80
|
-
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/index.tsx +
|
|
81
|
-
var cornerstone_src = __webpack_require__(
|
|
82
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/esm/index.js +
|
|
83
|
-
var esm = __webpack_require__(
|
|
75
|
+
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/index.tsx + 194 modules
|
|
76
|
+
var cornerstone_src = __webpack_require__(24688);
|
|
77
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/adapters/dist/esm/index.js + 76 modules
|
|
78
|
+
var esm = __webpack_require__(28963);
|
|
84
79
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
|
|
85
80
|
var dist_esm = __webpack_require__(4667);
|
|
86
81
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
@@ -477,7 +472,7 @@ const {
|
|
|
477
472
|
const {
|
|
478
473
|
CORNERSTONE_3D_TOOLS_SOURCE_NAME,
|
|
479
474
|
CORNERSTONE_3D_TOOLS_SOURCE_VERSION
|
|
480
|
-
} = cornerstone_src
|
|
475
|
+
} = cornerstone_src/* Enums */.fX;
|
|
481
476
|
const {
|
|
482
477
|
MetadataProvider: metadataProvider
|
|
483
478
|
} = src/* classes */.Ly;
|
|
@@ -662,7 +657,7 @@ function _measurementBelongsToDisplaySet({
|
|
|
662
657
|
measurement,
|
|
663
658
|
displaySet
|
|
664
659
|
}) {
|
|
665
|
-
return measurement.coords[0].ReferencedFrameOfReferenceSequence === displaySet.
|
|
660
|
+
return measurement.coords[0].ReferencedFrameOfReferenceSequence === displaySet.frameOfReferenceUID;
|
|
666
661
|
}
|
|
667
662
|
function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dataSource, servicesManager) {
|
|
668
663
|
const {
|
|
@@ -985,16 +980,25 @@ function _processNonGeometricallyDefinedMeasurement(mergedContentSequence) {
|
|
|
985
980
|
MeasuredValueSequence
|
|
986
981
|
} = item;
|
|
987
982
|
|
|
988
|
-
// Handle spatial reference ONLY if ContentSequence exists
|
|
983
|
+
// Handle spatial reference ONLY if ContentSequence exists.
|
|
984
|
+
// ContentSequence may be a scalar SCOORD or an array when additional named
|
|
985
|
+
// SCOORDs (e.g. control points) are nested alongside the primary geometry.
|
|
986
|
+
// Pick the primary geometry entry: prefer the SCOORD without a
|
|
987
|
+
// ConceptNameCodeSequence (plain polyline), falling back to the first SCOORD.
|
|
989
988
|
if (ContentSequence) {
|
|
989
|
+
const scoordItem = Array.isArray(ContentSequence) ? ContentSequence.find(cs => (cs.ValueType === 'SCOORD' || cs.ValueType === 'SCOORD3D') && !cs.ConceptNameCodeSequence) ?? ContentSequence.find(cs => cs.ValueType === 'SCOORD' || cs.ValueType === 'SCOORD3D') : ContentSequence;
|
|
990
|
+
if (!scoordItem) {
|
|
991
|
+
console.warn('ContentSequence array contains no SCOORD or SCOORD3D entry, skipping annotation.');
|
|
992
|
+
return;
|
|
993
|
+
}
|
|
990
994
|
const {
|
|
991
995
|
ValueType
|
|
992
|
-
} =
|
|
996
|
+
} = scoordItem;
|
|
993
997
|
if (ValueType !== 'SCOORD' && ValueType !== 'SCOORD3D') {
|
|
994
998
|
console.warn(`Graphic ${ValueType} not currently supported, skipping annotation.`);
|
|
995
999
|
return;
|
|
996
1000
|
}
|
|
997
|
-
const coords = _getCoordsFromSCOORDOrSCOORD3D(
|
|
1001
|
+
const coords = _getCoordsFromSCOORDOrSCOORD3D(scoordItem);
|
|
998
1002
|
if (coords) {
|
|
999
1003
|
measurement.coords.push(coords);
|
|
1000
1004
|
}
|
|
@@ -1195,8 +1199,6 @@ function onModeEnter({
|
|
|
1195
1199
|
ds.isHydrated = false;
|
|
1196
1200
|
});
|
|
1197
1201
|
}
|
|
1198
|
-
// EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
|
|
1199
|
-
var dcmjs_es = __webpack_require__(5842);
|
|
1200
1202
|
;// ../../../extensions/cornerstone-dicom-sr/src/utils/getFilteredCornerstoneToolState.ts
|
|
1201
1203
|
|
|
1202
1204
|
|
|
@@ -1326,7 +1328,7 @@ const {
|
|
|
1326
1328
|
const {
|
|
1327
1329
|
CORNERSTONE_3D_TOOLS_SOURCE_NAME: hydrateStructuredReport_CORNERSTONE_3D_TOOLS_SOURCE_NAME,
|
|
1328
1330
|
CORNERSTONE_3D_TOOLS_SOURCE_VERSION: hydrateStructuredReport_CORNERSTONE_3D_TOOLS_SOURCE_VERSION
|
|
1329
|
-
} = cornerstone_src
|
|
1331
|
+
} = cornerstone_src/* Enums */.fX;
|
|
1330
1332
|
const convertCode = (codingValues, code) => {
|
|
1331
1333
|
if (!code || code.CodingSchemeDesignator === 'CORNERSTONEJS') {
|
|
1332
1334
|
return;
|
|
@@ -1398,7 +1400,7 @@ function hydrateStructuredReport({
|
|
|
1398
1400
|
frameNumber = 1
|
|
1399
1401
|
} = measurement;
|
|
1400
1402
|
const key = `${ReferencedSOPInstanceUID}:${frameNumber}`;
|
|
1401
|
-
if (!sopInstanceUIDToImageId[key]) {
|
|
1403
|
+
if (imageId && !sopInstanceUIDToImageId[key]) {
|
|
1402
1404
|
sopInstanceUIDToImageId[key] = imageId;
|
|
1403
1405
|
}
|
|
1404
1406
|
});
|
|
@@ -1429,32 +1431,12 @@ function hydrateStructuredReport({
|
|
|
1429
1431
|
hydratableMeasurementsInSR[key] = storedMeasurementByAnnotationType[key];
|
|
1430
1432
|
}
|
|
1431
1433
|
});
|
|
1432
|
-
|
|
1433
|
-
// Set the series touched as tracked.
|
|
1434
|
-
const imageIds = [];
|
|
1435
|
-
|
|
1436
|
-
// TODO: notification if no hydratable?
|
|
1437
|
-
Object.keys(hydratableMeasurementsInSR).forEach(annotationType => {
|
|
1438
|
-
const toolDataForAnnotationType = hydratableMeasurementsInSR[annotationType];
|
|
1439
|
-
toolDataForAnnotationType.forEach(toolData => {
|
|
1440
|
-
// Add the measurement to toolState
|
|
1441
|
-
// dcmjs and Cornerstone3D has structural defect in supporting multi-frame
|
|
1442
|
-
// files, and looking up the imageId from sopInstanceUIDToImageId results
|
|
1443
|
-
// in the wrong value.
|
|
1444
|
-
const frameNumber = toolData.annotation.data?.frameNumber || 1;
|
|
1445
|
-
const imageId = sopInstanceUIDToImageId[`${toolData.sopInstanceUid}:${frameNumber}`];
|
|
1446
|
-
if (!imageIds.includes(imageId)) {
|
|
1447
|
-
imageIds.push(imageId);
|
|
1448
|
-
}
|
|
1449
|
-
});
|
|
1450
|
-
});
|
|
1451
1434
|
let targetStudyInstanceUID;
|
|
1452
1435
|
const SeriesInstanceUIDs = [];
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
}
|
|
1436
|
+
|
|
1437
|
+
// Set the series touched as tracked.
|
|
1438
|
+
const imageIds = getImageIds(hydratableMeasurementsInSR, sopInstanceUIDToImageId);
|
|
1439
|
+
for (const imageId of imageIds) {
|
|
1458
1440
|
const {
|
|
1459
1441
|
SeriesInstanceUID,
|
|
1460
1442
|
StudyInstanceUID
|
|
@@ -1469,6 +1451,25 @@ function hydrateStructuredReport({
|
|
|
1469
1451
|
}
|
|
1470
1452
|
}
|
|
1471
1453
|
|
|
1454
|
+
// For 3d annotations there are no image IDs,
|
|
1455
|
+
// so we need to find the display sets by frame of reference to get the SeriesInstanceUIDs
|
|
1456
|
+
const frameOfReferenceUIDs = getFrameOfReferenceUIDs(hydratableMeasurementsInSR, sopInstanceUIDToImageId);
|
|
1457
|
+
for (const FrameOfReferenceUID of frameOfReferenceUIDs) {
|
|
1458
|
+
const displaySetsFOR = displaySetService.getDisplaySetsBy(ds => ds.frameOfReferenceUID === FrameOfReferenceUID && !ds.isDerivedDisplaySet);
|
|
1459
|
+
const ds = chooseDisplaySet(displaySetsFOR, FrameOfReferenceUID);
|
|
1460
|
+
if (!ds) {
|
|
1461
|
+
continue;
|
|
1462
|
+
}
|
|
1463
|
+
if (!SeriesInstanceUIDs.includes(ds.SeriesInstanceUID)) {
|
|
1464
|
+
SeriesInstanceUIDs.push(ds.SeriesInstanceUID);
|
|
1465
|
+
}
|
|
1466
|
+
if (!targetStudyInstanceUID) {
|
|
1467
|
+
targetStudyInstanceUID = ds.StudyInstanceUID;
|
|
1468
|
+
} else if (targetStudyInstanceUID !== ds.StudyInstanceUID) {
|
|
1469
|
+
console.warn('NO SUPPORT FOR SRs THAT HAVE MEASUREMENTS FROM MULTIPLE STUDIES.');
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1472
1473
|
/**
|
|
1473
1474
|
* Gets reference data for what frame of reference and the referenced
|
|
1474
1475
|
* image id, or for 3d measurements, the volumeId to apply this annotation to.
|
|
@@ -1501,7 +1502,7 @@ function hydrateStructuredReport({
|
|
|
1501
1502
|
toolData.uid = guid();
|
|
1502
1503
|
const referenceData = getReferenceData(toolData);
|
|
1503
1504
|
const {
|
|
1504
|
-
|
|
1505
|
+
referencedImageId
|
|
1505
1506
|
} = referenceData;
|
|
1506
1507
|
const annotation = {
|
|
1507
1508
|
annotationUID: toolData.annotation.annotationUID,
|
|
@@ -1533,8 +1534,8 @@ function hydrateStructuredReport({
|
|
|
1533
1534
|
if (disableEditing) {
|
|
1534
1535
|
locking.setAnnotationLocked(newAnnotationUID, true);
|
|
1535
1536
|
}
|
|
1536
|
-
if (
|
|
1537
|
-
imageIds.push(
|
|
1537
|
+
if (referencedImageId && !imageIds.includes(referencedImageId)) {
|
|
1538
|
+
imageIds.push(referencedImageId);
|
|
1538
1539
|
}
|
|
1539
1540
|
});
|
|
1540
1541
|
});
|
|
@@ -1545,15 +1546,62 @@ function hydrateStructuredReport({
|
|
|
1545
1546
|
};
|
|
1546
1547
|
}
|
|
1547
1548
|
|
|
1549
|
+
/**
|
|
1550
|
+
* Gets the unique imageIds from hydratable measurements that have an imageId reference
|
|
1551
|
+
* (i.e., 2D/SCOORD annotations).
|
|
1552
|
+
*/
|
|
1553
|
+
function getImageIds(hydratableMeasurementsInSR, sopInstanceUIDToImageId) {
|
|
1554
|
+
const imageIds = [];
|
|
1555
|
+
Object.keys(hydratableMeasurementsInSR).forEach(annotationType => {
|
|
1556
|
+
const toolDataForAnnotationType = hydratableMeasurementsInSR[annotationType];
|
|
1557
|
+
toolDataForAnnotationType.forEach(toolData => {
|
|
1558
|
+
// Add the measurement to toolState
|
|
1559
|
+
// dcmjs and Cornerstone3D has structural defect in supporting multi-frame
|
|
1560
|
+
// files, and looking up the imageId from sopInstanceUIDToImageId results
|
|
1561
|
+
// in the wrong value.
|
|
1562
|
+
const frameNumber = toolData.annotation.data?.frameNumber || 1;
|
|
1563
|
+
const imageId = sopInstanceUIDToImageId[`${toolData.sopInstanceUid}:${frameNumber}`];
|
|
1564
|
+
if (imageId && !imageIds.includes(imageId)) {
|
|
1565
|
+
imageIds.push(imageId);
|
|
1566
|
+
}
|
|
1567
|
+
});
|
|
1568
|
+
});
|
|
1569
|
+
return imageIds;
|
|
1570
|
+
}
|
|
1571
|
+
|
|
1572
|
+
/**
|
|
1573
|
+
* Gets the unique FrameOfReferenceUIDs from hydratable measurements that have no imageId reference
|
|
1574
|
+
* (i.e., 3D/SCOORD3D annotations). This excludes annotations handled by the getImageIds function.
|
|
1575
|
+
*/
|
|
1576
|
+
function getFrameOfReferenceUIDs(hydratableMeasurementsInSR, sopInstanceUIDToImageId) {
|
|
1577
|
+
const frameOfReferenceUIDs = [];
|
|
1578
|
+
Object.keys(hydratableMeasurementsInSR).forEach(annotationType => {
|
|
1579
|
+
const toolDataForAnnotationType = hydratableMeasurementsInSR[annotationType];
|
|
1580
|
+
toolDataForAnnotationType.forEach(toolData => {
|
|
1581
|
+
const frameNumber = toolData.annotation.data?.frameNumber || 1;
|
|
1582
|
+
const imageId = sopInstanceUIDToImageId[`${toolData.sopInstanceUid}:${frameNumber}`];
|
|
1583
|
+
if (!imageId) {
|
|
1584
|
+
const {
|
|
1585
|
+
FrameOfReferenceUID
|
|
1586
|
+
} = toolData.annotation.metadata;
|
|
1587
|
+
if (FrameOfReferenceUID && !frameOfReferenceUIDs.includes(FrameOfReferenceUID)) {
|
|
1588
|
+
frameOfReferenceUIDs.push(FrameOfReferenceUID);
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
});
|
|
1592
|
+
});
|
|
1593
|
+
return frameOfReferenceUIDs;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1548
1596
|
/**
|
|
1549
1597
|
* For 3d annotations, there are often several display sets which could
|
|
1550
1598
|
* be used to display the annotation. Choose the first annotation with the
|
|
1551
1599
|
* same frame of reference that is reconstructable, or the first display set
|
|
1552
1600
|
* otherwise.
|
|
1553
1601
|
*/
|
|
1554
|
-
function chooseDisplaySet(displaySets,
|
|
1602
|
+
function chooseDisplaySet(displaySets, reference) {
|
|
1555
1603
|
if (!displaySets?.length) {
|
|
1556
|
-
console.warn('No display set found for',
|
|
1604
|
+
console.warn('No display set found for', reference);
|
|
1557
1605
|
return;
|
|
1558
1606
|
}
|
|
1559
1607
|
if (displaySets.length === 1) {
|
|
@@ -1580,7 +1628,7 @@ function getReferenceData3D(toolData, servicesManager) {
|
|
|
1580
1628
|
const {
|
|
1581
1629
|
displaySetService
|
|
1582
1630
|
} = servicesManager.services;
|
|
1583
|
-
const displaySetsFOR = displaySetService.getDisplaySetsBy(ds => ds.
|
|
1631
|
+
const displaySetsFOR = displaySetService.getDisplaySetsBy(ds => ds.frameOfReferenceUID === FrameOfReferenceUID);
|
|
1584
1632
|
if (!displaySetsFOR.length || !points?.length) {
|
|
1585
1633
|
return {
|
|
1586
1634
|
FrameOfReferenceUID
|
|
@@ -1639,10 +1687,6 @@ function choosePoints(points) {
|
|
|
1639
1687
|
|
|
1640
1688
|
|
|
1641
1689
|
|
|
1642
|
-
|
|
1643
|
-
const {
|
|
1644
|
-
downloadBlob
|
|
1645
|
-
} = src/* utils */.Wp;
|
|
1646
1690
|
const {
|
|
1647
1691
|
MeasurementReport: commandsModule_MeasurementReport
|
|
1648
1692
|
} = esm/* adaptersSR */.QX.Cornerstone3D;
|
|
@@ -1701,32 +1745,11 @@ const commandsModule = props => {
|
|
|
1701
1745
|
// segmentationService.setSegmentColor(viewportId, segmentationId, segmentIndex, color);
|
|
1702
1746
|
// });
|
|
1703
1747
|
},
|
|
1704
|
-
/**
|
|
1705
|
-
*
|
|
1706
|
-
* @param measurementData An array of measurements from the measurements service
|
|
1707
|
-
* @param additionalFindingTypes toolTypes that should be stored with labels as Findings
|
|
1708
|
-
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1709
|
-
* as opposed to Finding Sites.
|
|
1710
|
-
* that you wish to serialize.
|
|
1711
|
-
*/
|
|
1712
|
-
downloadReport: ({
|
|
1713
|
-
measurementData,
|
|
1714
|
-
additionalFindingTypes,
|
|
1715
|
-
options = {}
|
|
1716
|
-
}) => {
|
|
1717
|
-
const srDataset = _generateReport(measurementData, additionalFindingTypes, options);
|
|
1718
|
-
const reportBlob = dcmjs_es/* default.data */.Ay.data.datasetToBlob(srDataset);
|
|
1719
|
-
|
|
1720
|
-
//Create a URL for the binary.
|
|
1721
|
-
downloadBlob(reportBlob, {
|
|
1722
|
-
filename: 'dicom-sr.dcm'
|
|
1723
|
-
});
|
|
1724
|
-
},
|
|
1725
1748
|
/**
|
|
1726
1749
|
*
|
|
1727
1750
|
* @param measurementData An array of measurements from the measurements service
|
|
1728
1751
|
* that you wish to serialize.
|
|
1729
|
-
* @param dataSource The
|
|
1752
|
+
* @param dataSource The data source name ('download', 'copyToClipboard', or a named data source).
|
|
1730
1753
|
* @param additionalFindingTypes toolTypes that should be stored with labels as Findings
|
|
1731
1754
|
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1732
1755
|
* @return The naturalized report
|
|
@@ -1737,23 +1760,24 @@ const commandsModule = props => {
|
|
|
1737
1760
|
additionalFindingTypes,
|
|
1738
1761
|
options = {}
|
|
1739
1762
|
}) => {
|
|
1740
|
-
// Use the @cornerstonejs adapter for converting to/from DICOM
|
|
1741
|
-
// But it is good enough for now whilst we only have cornerstone as a datasource.
|
|
1742
1763
|
log.info('[DICOMSR] storeMeasurements');
|
|
1743
|
-
|
|
1744
|
-
|
|
1764
|
+
const storeFn = commandsManager.runCommand('createStoreFunction', {
|
|
1765
|
+
dataSource,
|
|
1766
|
+
defaultFileName: 'dicom-sr.dcm'
|
|
1767
|
+
});
|
|
1768
|
+
if (!storeFn) {
|
|
1769
|
+
log.error('[DICOMSR] No valid store for dataSource:', dataSource);
|
|
1745
1770
|
return Promise.reject({});
|
|
1746
1771
|
}
|
|
1747
1772
|
try {
|
|
1748
1773
|
const naturalizedReport = _generateReport(measurementData, additionalFindingTypes, options);
|
|
1749
1774
|
const {
|
|
1750
|
-
StudyInstanceUID,
|
|
1751
1775
|
ContentSequence
|
|
1752
1776
|
} = naturalizedReport;
|
|
1753
1777
|
// The content sequence has 5 or more elements, of which
|
|
1754
1778
|
// the `[4]` element contains the annotation data, so this is
|
|
1755
1779
|
// checking that there is some annotation data present.
|
|
1756
|
-
if (!ContentSequence?.[4]
|
|
1780
|
+
if (!ContentSequence?.[4]?.ContentSequence?.length) {
|
|
1757
1781
|
console.log('naturalizedReport missing imaging content', naturalizedReport);
|
|
1758
1782
|
throw new Error('Invalid report, no content');
|
|
1759
1783
|
}
|
|
@@ -1769,15 +1793,10 @@ const commandsModule = props => {
|
|
|
1769
1793
|
naturalizedReport
|
|
1770
1794
|
});
|
|
1771
1795
|
}
|
|
1772
|
-
await
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
// The "Mode" route listens for DicomMetadataStore changes
|
|
1778
|
-
// When a new instance is added, it listens and
|
|
1779
|
-
// automatically calls makeDisplaySets
|
|
1780
|
-
src/* DicomMetadataStore */.H8.addInstances([naturalizedReport], true);
|
|
1796
|
+
await storeFn(naturalizedReport, {
|
|
1797
|
+
measurementData,
|
|
1798
|
+
dicomDict
|
|
1799
|
+
});
|
|
1781
1800
|
return naturalizedReport;
|
|
1782
1801
|
} catch (error) {
|
|
1783
1802
|
console.warn(error);
|
|
@@ -1800,7 +1819,6 @@ const commandsModule = props => {
|
|
|
1800
1819
|
}
|
|
1801
1820
|
};
|
|
1802
1821
|
const definitions = {
|
|
1803
|
-
downloadReport: actions.downloadReport,
|
|
1804
1822
|
storeMeasurements: actions.storeMeasurements,
|
|
1805
1823
|
hydrateStructuredReport: actions.hydrateStructuredReport
|
|
1806
1824
|
};
|
|
@@ -2210,16 +2228,17 @@ const dicomSRExtension = {
|
|
|
2210
2228
|
// Put static exports here so they can be type checked
|
|
2211
2229
|
|
|
2212
2230
|
|
|
2213
|
-
/***/ }
|
|
2231
|
+
/***/ },
|
|
2214
2232
|
|
|
2215
|
-
/***/ 76654
|
|
2216
|
-
|
|
2233
|
+
/***/ 76654
|
|
2234
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2217
2235
|
|
|
2218
2236
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2219
2237
|
/* harmony export */ eF: () => (/* binding */ getTrackingUniqueIdentifiersForElement),
|
|
2220
2238
|
/* harmony export */ m1: () => (/* binding */ setTrackingUniqueIdentifiersForElement)
|
|
2221
2239
|
/* harmony export */ });
|
|
2222
2240
|
/* unused harmony export setActiveTrackingUniqueIdentifierForElement */
|
|
2241
|
+
/* unused harmony import specifier */ var getEnabledElement;
|
|
2223
2242
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
2224
2243
|
|
|
2225
2244
|
const state = {
|
|
@@ -2270,10 +2289,10 @@ function getTrackingUniqueIdentifiersForElement(element) {
|
|
|
2270
2289
|
}
|
|
2271
2290
|
|
|
2272
2291
|
|
|
2273
|
-
/***/ }
|
|
2292
|
+
/***/ },
|
|
2274
2293
|
|
|
2275
|
-
/***/ 92643
|
|
2276
|
-
|
|
2294
|
+
/***/ 92643
|
|
2295
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2277
2296
|
|
|
2278
2297
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2279
2298
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -2367,6 +2386,6 @@ const createReferencedImageDisplaySet = (displaySetService, displaySet) => {
|
|
|
2367
2386
|
};
|
|
2368
2387
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createReferencedImageDisplaySet);
|
|
2369
2388
|
|
|
2370
|
-
/***/ }
|
|
2389
|
+
/***/ }
|
|
2371
2390
|
|
|
2372
2391
|
}]);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[4202],{
|
|
3
3
|
|
|
4
|
-
/***/ 74202
|
|
5
|
-
|
|
4
|
+
/***/ 74202
|
|
5
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
6
|
|
|
7
7
|
__webpack_require__.r(__webpack_exports__);
|
|
8
8
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -11,8 +11,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
11
11
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(97598);
|
|
12
12
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_0__);
|
|
13
13
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86326);
|
|
14
|
-
/* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
15
|
-
/* harmony import */ var _ohif_extension_cornerstone__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
14
|
+
/* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2343);
|
|
15
|
+
/* harmony import */ var _ohif_extension_cornerstone__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(24688);
|
|
16
16
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
17
17
|
|
|
18
18
|
|
|
@@ -106,7 +106,7 @@ function OHIFCornerstonePMAPViewport(props) {
|
|
|
106
106
|
type: 'warning',
|
|
107
107
|
message: 'The values are multiplied by 100 in the viewport for better visibility'
|
|
108
108
|
});
|
|
109
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ohif_extension_cornerstone__WEBPACK_IMPORTED_MODULE_3__.OHIFCornerstoneViewport, _extends({}, props, {
|
|
109
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1__.createElement(_ohif_extension_cornerstone__WEBPACK_IMPORTED_MODULE_3__/* .OHIFCornerstoneViewport */ .R9, _extends({}, props, {
|
|
110
110
|
// Referenced + PMAP displaySets must be passed as parameter in this order
|
|
111
111
|
displaySets: [referencedDisplaySet, pmapDisplaySet],
|
|
112
112
|
viewportOptions: {
|
|
@@ -191,6 +191,6 @@ function _getReferencedDisplaySetMetadata(referencedDisplaySet, pmapDisplaySet)
|
|
|
191
191
|
}
|
|
192
192
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OHIFCornerstonePMAPViewport);
|
|
193
193
|
|
|
194
|
-
/***/ }
|
|
194
|
+
/***/ }
|
|
195
195
|
|
|
196
196
|
}]);
|