@ohif/app 3.13.0-beta.6 → 3.13.0-beta.60
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.075e535250e3d4779923.js → 1459.bundle.ed7323f44e4ff4ecd69a.js} +5 -6
- package/dist/{147.bundle.37d627289453cb6c3937.js → 147.bundle.173b4a11960d03a3b5b0.js} +21 -45
- package/dist/{1608.bundle.0687c661f1c9edfb3b8a.js → 1608.bundle.e4aadbf17d38143dacdf.js} +12 -12
- package/dist/{1927.bundle.3050588e95f43cf57cdd.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
- package/dist/{1933.bundle.317997210b6a51079753.js → 1933.bundle.0055c536e1392867e57c.js} +32 -27
- package/dist/{2018.bundle.31d14d6f9fb764b51bda.js → 2018.bundle.ab8f9ceeae0e18eb303b.js} +18 -19
- package/dist/{6409.bundle.b36048896cb11c8571fb.js → 2075.bundle.23265b8e7597c398db4f.js} +327 -256
- package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
- package/dist/{213.bundle.363f9a3eb6c0d33e3921.js → 213.bundle.18a8b5a1e2f00de7feaf.js} +3 -5
- package/dist/{2424.bundle.aa7f4df6cba71b817c87.js → 2424.bundle.5e858661a06aa36dd859.js} +3 -5
- package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
- package/dist/{2701.bundle.12bd01a80a9f8ea4cd94.js → 2701.bundle.b591cf6385ed53ed6093.js} +10 -10
- package/dist/{9195.bundle.adf6a548b6f7ae279c09.js → 2851.bundle.c5202066974b96955c28.js} +384 -169
- package/dist/{1730.bundle.1d137db2556d538263fb.js → 3138.bundle.5ed994e6e0ff7c720a75.js} +16 -310
- package/dist/{3461.bundle.7024d5e66d12b4069031.js → 3461.bundle.54f8d64ed1965c14ec4c.js} +131 -107
- package/dist/{4202.bundle.5a0f8e4004c5d8a68548.js → 4202.bundle.850a7c7c011800b3daea.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.40baf30d503370ce52c9.js → 4507.bundle.18379f328211aee3aba5.js} +10 -305
- package/dist/{6347.bundle.784c48912700f281de1d.js → 4579.bundle.0a6b2f49a7e136a79e37.js} +561 -649
- package/dist/{3081.bundle.f0df1c7d93ef4be29102.js → 4688.bundle.e23f20a556dca69540fd.js} +742 -408
- package/dist/{4819.bundle.0c37918802ef7805586f.js → 4819.bundle.fb82fcc8360f4883691e.js} +39 -39
- package/dist/{4775.bundle.5d6203a2991902544266.js → 5015.bundle.dda760490cf19777b6b3.js} +29 -333
- package/dist/{5028.bundle.2cd4d2253b47845e6634.js → 5028.bundle.494b6ca9e0f5567c26e2.js} +11 -13
- package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
- package/dist/{5457.bundle.15d4adb3ca43c45b044d.js → 5457.bundle.328f29b05df8d287491b.js} +16 -23
- package/dist/{5485.bundle.b9764a7846d57ee5710d.js → 5485.bundle.53614f38e6ee0e052bdc.js} +20 -32
- package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
- package/dist/{5802.bundle.3bf5e6b3ab330a594a47.js → 5802.bundle.41cf74cda9aad21601e8.js} +79 -20
- 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.55f4bf16015381255f33.js → 6027.bundle.1bfe806a0cb494dfc265.js} +3 -5
- package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.929febcf6d326e582e00.js} +151 -140
- package/dist/{6376.bundle.9cb74d7bc08476e2f1a7.js → 6376.bundle.738c873196491232acb6.js} +6 -6
- package/dist/{2842.bundle.860b9f10fcdd9656947a.js → 6386.bundle.5d82d1f41d1c37a0358d.js} +904 -2298
- 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.3738008038e70525764f.js} +1129 -821
- 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.1726a7f7a4c378296085.js} +5216 -2238
- package/dist/{7639.bundle.9057c381d5f455997d60.js → 7639.bundle.2ec2272d8eb08df56b66.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.2a215d860aa3bb1984f6.js → 8305.bundle.21d4c7deff19f6ce9a6a.js} +71 -66
- package/dist/{6163.bundle.18484c031c76e3835a71.js → 8499.bundle.dbeca38ee1d1471ce4d8.js} +7 -302
- package/dist/8499.css +2 -0
- package/dist/{85.bundle.173a5ab4b47890e2f013.js → 85.bundle.e426258a9ad5bcf9bb3e.js} +3 -5
- package/dist/{8558.bundle.52d7001a86845c8a91b8.js → 8558.bundle.5c64a061bf4d5d5f6d7a.js} +15 -309
- package/dist/{8583.bundle.e899badfa6f91f22b2f3.js → 8583.bundle.a0ccedd0799600ad5fad.js} +24 -27
- package/dist/{997.bundle.822b33e561263084e18c.js → 9039.bundle.7afa93b103c3b26d4855.js} +3965 -2984
- package/dist/{7412.bundle.fab1742191b7fe937330.js → 9205.bundle.315c3b56464a7590235a.js} +6071 -3305
- package/dist/{3584.bundle.8cc0750425513433e9cc.js → 9567.bundle.be350438bed4e656f278.js} +3422 -2880
- package/dist/{9845.bundle.255e7c7f7a88193b4e47.js → 9845.bundle.267831496ba080d9f8da.js} +10 -10
- package/dist/{9862.bundle.3a8958a82c572015d25d.js → 9862.bundle.09783830f0cb75a84d2a.js} +8 -6
- package/dist/{9927.bundle.0e4c7a7682b7acad3060.js → 9927.bundle.3bdd61e78a710e09cc0b.js} +4 -6
- package/dist/app-config.js +12 -0
- package/dist/{app.bundle.62d84a3df6ec149a44a6.js → app.bundle.348a74b1a7aeb7c8d0a8.js} +100482 -97633
- package/dist/app.bundle.css +3 -3
- package/dist/{polySeg.bundle.a5aa9130b4191253c410.js → compute.bundle.a41ec0ba4f935200ab93.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.2559b710030605fc2bc6.js} +14 -26
- package/dist/{compute.bundle.64280c7af19ff567465f.js → polySeg.bundle.be57af5b834dd833a418.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__(64579);
|
|
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 + 72 modules
|
|
78
|
+
var esm = __webpack_require__(64579);
|
|
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;
|
|
@@ -639,8 +634,13 @@ async function _load(srDisplaySet, servicesManager, extensionManager) {
|
|
|
639
634
|
srDisplaySet.isRehydratable = isRehydratable(srDisplaySet, mappings);
|
|
640
635
|
srDisplaySet.isLoaded = true;
|
|
641
636
|
|
|
642
|
-
/** Check currently added displaySets and add measurements if the sources exist
|
|
643
|
-
|
|
637
|
+
/** Check currently added displaySets and add measurements if the sources exist.
|
|
638
|
+
* Walk the SR's study first in default series order (not load order) so SCOORD3D
|
|
639
|
+
* FrameOfReference matching picks a stable series when several share FOR. */
|
|
640
|
+
const displaySetsForSRPass = src/* utils */.Wp.sortDisplaySetsCopy(displaySetService.activeDisplaySets, {
|
|
641
|
+
studyInstanceUIDFirst: srDisplaySet.StudyInstanceUID
|
|
642
|
+
});
|
|
643
|
+
displaySetsForSRPass.forEach(activeDisplaySet => {
|
|
644
644
|
_checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, activeDisplaySet, dataSource, servicesManager);
|
|
645
645
|
});
|
|
646
646
|
|
|
@@ -985,16 +985,25 @@ function _processNonGeometricallyDefinedMeasurement(mergedContentSequence) {
|
|
|
985
985
|
MeasuredValueSequence
|
|
986
986
|
} = item;
|
|
987
987
|
|
|
988
|
-
// Handle spatial reference ONLY if ContentSequence exists
|
|
988
|
+
// Handle spatial reference ONLY if ContentSequence exists.
|
|
989
|
+
// ContentSequence may be a scalar SCOORD or an array when additional named
|
|
990
|
+
// SCOORDs (e.g. control points) are nested alongside the primary geometry.
|
|
991
|
+
// Pick the primary geometry entry: prefer the SCOORD without a
|
|
992
|
+
// ConceptNameCodeSequence (plain polyline), falling back to the first SCOORD.
|
|
989
993
|
if (ContentSequence) {
|
|
994
|
+
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;
|
|
995
|
+
if (!scoordItem) {
|
|
996
|
+
console.warn('ContentSequence array contains no SCOORD or SCOORD3D entry, skipping annotation.');
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
990
999
|
const {
|
|
991
1000
|
ValueType
|
|
992
|
-
} =
|
|
1001
|
+
} = scoordItem;
|
|
993
1002
|
if (ValueType !== 'SCOORD' && ValueType !== 'SCOORD3D') {
|
|
994
1003
|
console.warn(`Graphic ${ValueType} not currently supported, skipping annotation.`);
|
|
995
1004
|
return;
|
|
996
1005
|
}
|
|
997
|
-
const coords = _getCoordsFromSCOORDOrSCOORD3D(
|
|
1006
|
+
const coords = _getCoordsFromSCOORDOrSCOORD3D(scoordItem);
|
|
998
1007
|
if (coords) {
|
|
999
1008
|
measurement.coords.push(coords);
|
|
1000
1009
|
}
|
|
@@ -1195,8 +1204,6 @@ function onModeEnter({
|
|
|
1195
1204
|
ds.isHydrated = false;
|
|
1196
1205
|
});
|
|
1197
1206
|
}
|
|
1198
|
-
// EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
|
|
1199
|
-
var dcmjs_es = __webpack_require__(5842);
|
|
1200
1207
|
;// ../../../extensions/cornerstone-dicom-sr/src/utils/getFilteredCornerstoneToolState.ts
|
|
1201
1208
|
|
|
1202
1209
|
|
|
@@ -1326,7 +1333,7 @@ const {
|
|
|
1326
1333
|
const {
|
|
1327
1334
|
CORNERSTONE_3D_TOOLS_SOURCE_NAME: hydrateStructuredReport_CORNERSTONE_3D_TOOLS_SOURCE_NAME,
|
|
1328
1335
|
CORNERSTONE_3D_TOOLS_SOURCE_VERSION: hydrateStructuredReport_CORNERSTONE_3D_TOOLS_SOURCE_VERSION
|
|
1329
|
-
} = cornerstone_src
|
|
1336
|
+
} = cornerstone_src/* Enums */.fX;
|
|
1330
1337
|
const convertCode = (codingValues, code) => {
|
|
1331
1338
|
if (!code || code.CodingSchemeDesignator === 'CORNERSTONEJS') {
|
|
1332
1339
|
return;
|
|
@@ -1398,7 +1405,7 @@ function hydrateStructuredReport({
|
|
|
1398
1405
|
frameNumber = 1
|
|
1399
1406
|
} = measurement;
|
|
1400
1407
|
const key = `${ReferencedSOPInstanceUID}:${frameNumber}`;
|
|
1401
|
-
if (!sopInstanceUIDToImageId[key]) {
|
|
1408
|
+
if (imageId && !sopInstanceUIDToImageId[key]) {
|
|
1402
1409
|
sopInstanceUIDToImageId[key] = imageId;
|
|
1403
1410
|
}
|
|
1404
1411
|
});
|
|
@@ -1429,32 +1436,12 @@ function hydrateStructuredReport({
|
|
|
1429
1436
|
hydratableMeasurementsInSR[key] = storedMeasurementByAnnotationType[key];
|
|
1430
1437
|
}
|
|
1431
1438
|
});
|
|
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
1439
|
let targetStudyInstanceUID;
|
|
1452
1440
|
const SeriesInstanceUIDs = [];
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
}
|
|
1441
|
+
|
|
1442
|
+
// Set the series touched as tracked.
|
|
1443
|
+
const imageIds = getImageIds(hydratableMeasurementsInSR, sopInstanceUIDToImageId);
|
|
1444
|
+
for (const imageId of imageIds) {
|
|
1458
1445
|
const {
|
|
1459
1446
|
SeriesInstanceUID,
|
|
1460
1447
|
StudyInstanceUID
|
|
@@ -1469,6 +1456,25 @@ function hydrateStructuredReport({
|
|
|
1469
1456
|
}
|
|
1470
1457
|
}
|
|
1471
1458
|
|
|
1459
|
+
// For 3d annotations there are no image IDs,
|
|
1460
|
+
// so we need to find the display sets by frame of reference to get the SeriesInstanceUIDs
|
|
1461
|
+
const frameOfReferenceUIDs = getFrameOfReferenceUIDs(hydratableMeasurementsInSR, sopInstanceUIDToImageId);
|
|
1462
|
+
for (const FrameOfReferenceUID of frameOfReferenceUIDs) {
|
|
1463
|
+
const displaySetsFOR = displaySetService.getDisplaySetsBy(ds => ds.FrameOfReferenceUID === FrameOfReferenceUID && !ds.isDerivedDisplaySet);
|
|
1464
|
+
const ds = chooseDisplaySet(displaySetsFOR, FrameOfReferenceUID);
|
|
1465
|
+
if (!ds) {
|
|
1466
|
+
continue;
|
|
1467
|
+
}
|
|
1468
|
+
if (!SeriesInstanceUIDs.includes(ds.SeriesInstanceUID)) {
|
|
1469
|
+
SeriesInstanceUIDs.push(ds.SeriesInstanceUID);
|
|
1470
|
+
}
|
|
1471
|
+
if (!targetStudyInstanceUID) {
|
|
1472
|
+
targetStudyInstanceUID = ds.StudyInstanceUID;
|
|
1473
|
+
} else if (targetStudyInstanceUID !== ds.StudyInstanceUID) {
|
|
1474
|
+
console.warn('NO SUPPORT FOR SRs THAT HAVE MEASUREMENTS FROM MULTIPLE STUDIES.');
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1472
1478
|
/**
|
|
1473
1479
|
* Gets reference data for what frame of reference and the referenced
|
|
1474
1480
|
* image id, or for 3d measurements, the volumeId to apply this annotation to.
|
|
@@ -1501,7 +1507,7 @@ function hydrateStructuredReport({
|
|
|
1501
1507
|
toolData.uid = guid();
|
|
1502
1508
|
const referenceData = getReferenceData(toolData);
|
|
1503
1509
|
const {
|
|
1504
|
-
|
|
1510
|
+
referencedImageId
|
|
1505
1511
|
} = referenceData;
|
|
1506
1512
|
const annotation = {
|
|
1507
1513
|
annotationUID: toolData.annotation.annotationUID,
|
|
@@ -1533,8 +1539,8 @@ function hydrateStructuredReport({
|
|
|
1533
1539
|
if (disableEditing) {
|
|
1534
1540
|
locking.setAnnotationLocked(newAnnotationUID, true);
|
|
1535
1541
|
}
|
|
1536
|
-
if (
|
|
1537
|
-
imageIds.push(
|
|
1542
|
+
if (referencedImageId && !imageIds.includes(referencedImageId)) {
|
|
1543
|
+
imageIds.push(referencedImageId);
|
|
1538
1544
|
}
|
|
1539
1545
|
});
|
|
1540
1546
|
});
|
|
@@ -1545,15 +1551,62 @@ function hydrateStructuredReport({
|
|
|
1545
1551
|
};
|
|
1546
1552
|
}
|
|
1547
1553
|
|
|
1554
|
+
/**
|
|
1555
|
+
* Gets the unique imageIds from hydratable measurements that have an imageId reference
|
|
1556
|
+
* (i.e., 2D/SCOORD annotations).
|
|
1557
|
+
*/
|
|
1558
|
+
function getImageIds(hydratableMeasurementsInSR, sopInstanceUIDToImageId) {
|
|
1559
|
+
const imageIds = [];
|
|
1560
|
+
Object.keys(hydratableMeasurementsInSR).forEach(annotationType => {
|
|
1561
|
+
const toolDataForAnnotationType = hydratableMeasurementsInSR[annotationType];
|
|
1562
|
+
toolDataForAnnotationType.forEach(toolData => {
|
|
1563
|
+
// Add the measurement to toolState
|
|
1564
|
+
// dcmjs and Cornerstone3D has structural defect in supporting multi-frame
|
|
1565
|
+
// files, and looking up the imageId from sopInstanceUIDToImageId results
|
|
1566
|
+
// in the wrong value.
|
|
1567
|
+
const frameNumber = toolData.annotation.data?.frameNumber || 1;
|
|
1568
|
+
const imageId = sopInstanceUIDToImageId[`${toolData.sopInstanceUid}:${frameNumber}`];
|
|
1569
|
+
if (imageId && !imageIds.includes(imageId)) {
|
|
1570
|
+
imageIds.push(imageId);
|
|
1571
|
+
}
|
|
1572
|
+
});
|
|
1573
|
+
});
|
|
1574
|
+
return imageIds;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
/**
|
|
1578
|
+
* Gets the unique FrameOfReferenceUIDs from hydratable measurements that have no imageId reference
|
|
1579
|
+
* (i.e., 3D/SCOORD3D annotations). This excludes annotations handled by the getImageIds function.
|
|
1580
|
+
*/
|
|
1581
|
+
function getFrameOfReferenceUIDs(hydratableMeasurementsInSR, sopInstanceUIDToImageId) {
|
|
1582
|
+
const frameOfReferenceUIDs = [];
|
|
1583
|
+
Object.keys(hydratableMeasurementsInSR).forEach(annotationType => {
|
|
1584
|
+
const toolDataForAnnotationType = hydratableMeasurementsInSR[annotationType];
|
|
1585
|
+
toolDataForAnnotationType.forEach(toolData => {
|
|
1586
|
+
const frameNumber = toolData.annotation.data?.frameNumber || 1;
|
|
1587
|
+
const imageId = sopInstanceUIDToImageId[`${toolData.sopInstanceUid}:${frameNumber}`];
|
|
1588
|
+
if (!imageId) {
|
|
1589
|
+
const {
|
|
1590
|
+
FrameOfReferenceUID
|
|
1591
|
+
} = toolData.annotation.metadata;
|
|
1592
|
+
if (FrameOfReferenceUID && !frameOfReferenceUIDs.includes(FrameOfReferenceUID)) {
|
|
1593
|
+
frameOfReferenceUIDs.push(FrameOfReferenceUID);
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
});
|
|
1597
|
+
});
|
|
1598
|
+
return frameOfReferenceUIDs;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1548
1601
|
/**
|
|
1549
1602
|
* For 3d annotations, there are often several display sets which could
|
|
1550
1603
|
* be used to display the annotation. Choose the first annotation with the
|
|
1551
1604
|
* same frame of reference that is reconstructable, or the first display set
|
|
1552
1605
|
* otherwise.
|
|
1553
1606
|
*/
|
|
1554
|
-
function chooseDisplaySet(displaySets,
|
|
1607
|
+
function chooseDisplaySet(displaySets, reference) {
|
|
1555
1608
|
if (!displaySets?.length) {
|
|
1556
|
-
console.warn('No display set found for',
|
|
1609
|
+
console.warn('No display set found for', reference);
|
|
1557
1610
|
return;
|
|
1558
1611
|
}
|
|
1559
1612
|
if (displaySets.length === 1) {
|
|
@@ -1639,10 +1692,6 @@ function choosePoints(points) {
|
|
|
1639
1692
|
|
|
1640
1693
|
|
|
1641
1694
|
|
|
1642
|
-
|
|
1643
|
-
const {
|
|
1644
|
-
downloadBlob
|
|
1645
|
-
} = src/* utils */.Wp;
|
|
1646
1695
|
const {
|
|
1647
1696
|
MeasurementReport: commandsModule_MeasurementReport
|
|
1648
1697
|
} = esm/* adaptersSR */.QX.Cornerstone3D;
|
|
@@ -1701,32 +1750,11 @@ const commandsModule = props => {
|
|
|
1701
1750
|
// segmentationService.setSegmentColor(viewportId, segmentationId, segmentIndex, color);
|
|
1702
1751
|
// });
|
|
1703
1752
|
},
|
|
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
1753
|
/**
|
|
1726
1754
|
*
|
|
1727
1755
|
* @param measurementData An array of measurements from the measurements service
|
|
1728
1756
|
* that you wish to serialize.
|
|
1729
|
-
* @param dataSource The
|
|
1757
|
+
* @param dataSource The data source name ('download', 'copyToClipboard', or a named data source).
|
|
1730
1758
|
* @param additionalFindingTypes toolTypes that should be stored with labels as Findings
|
|
1731
1759
|
* @param options Naturalized DICOM JSON headers to merge into the displaySet.
|
|
1732
1760
|
* @return The naturalized report
|
|
@@ -1737,23 +1765,24 @@ const commandsModule = props => {
|
|
|
1737
1765
|
additionalFindingTypes,
|
|
1738
1766
|
options = {}
|
|
1739
1767
|
}) => {
|
|
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
1768
|
log.info('[DICOMSR] storeMeasurements');
|
|
1743
|
-
|
|
1744
|
-
|
|
1769
|
+
const storeFn = commandsManager.runCommand('createStoreFunction', {
|
|
1770
|
+
dataSource,
|
|
1771
|
+
defaultFileName: 'dicom-sr.dcm'
|
|
1772
|
+
});
|
|
1773
|
+
if (!storeFn) {
|
|
1774
|
+
log.error('[DICOMSR] No valid store for dataSource:', dataSource);
|
|
1745
1775
|
return Promise.reject({});
|
|
1746
1776
|
}
|
|
1747
1777
|
try {
|
|
1748
1778
|
const naturalizedReport = _generateReport(measurementData, additionalFindingTypes, options);
|
|
1749
1779
|
const {
|
|
1750
|
-
StudyInstanceUID,
|
|
1751
1780
|
ContentSequence
|
|
1752
1781
|
} = naturalizedReport;
|
|
1753
1782
|
// The content sequence has 5 or more elements, of which
|
|
1754
1783
|
// the `[4]` element contains the annotation data, so this is
|
|
1755
1784
|
// checking that there is some annotation data present.
|
|
1756
|
-
if (!ContentSequence?.[4]
|
|
1785
|
+
if (!ContentSequence?.[4]?.ContentSequence?.length) {
|
|
1757
1786
|
console.log('naturalizedReport missing imaging content', naturalizedReport);
|
|
1758
1787
|
throw new Error('Invalid report, no content');
|
|
1759
1788
|
}
|
|
@@ -1769,15 +1798,10 @@ const commandsModule = props => {
|
|
|
1769
1798
|
naturalizedReport
|
|
1770
1799
|
});
|
|
1771
1800
|
}
|
|
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);
|
|
1801
|
+
await storeFn(naturalizedReport, {
|
|
1802
|
+
measurementData,
|
|
1803
|
+
dicomDict
|
|
1804
|
+
});
|
|
1781
1805
|
return naturalizedReport;
|
|
1782
1806
|
} catch (error) {
|
|
1783
1807
|
console.warn(error);
|
|
@@ -1800,7 +1824,6 @@ const commandsModule = props => {
|
|
|
1800
1824
|
}
|
|
1801
1825
|
};
|
|
1802
1826
|
const definitions = {
|
|
1803
|
-
downloadReport: actions.downloadReport,
|
|
1804
1827
|
storeMeasurements: actions.storeMeasurements,
|
|
1805
1828
|
hydrateStructuredReport: actions.hydrateStructuredReport
|
|
1806
1829
|
};
|
|
@@ -2210,16 +2233,17 @@ const dicomSRExtension = {
|
|
|
2210
2233
|
// Put static exports here so they can be type checked
|
|
2211
2234
|
|
|
2212
2235
|
|
|
2213
|
-
/***/ }
|
|
2236
|
+
/***/ },
|
|
2214
2237
|
|
|
2215
|
-
/***/ 76654
|
|
2216
|
-
|
|
2238
|
+
/***/ 76654
|
|
2239
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2217
2240
|
|
|
2218
2241
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2219
2242
|
/* harmony export */ eF: () => (/* binding */ getTrackingUniqueIdentifiersForElement),
|
|
2220
2243
|
/* harmony export */ m1: () => (/* binding */ setTrackingUniqueIdentifiersForElement)
|
|
2221
2244
|
/* harmony export */ });
|
|
2222
2245
|
/* unused harmony export setActiveTrackingUniqueIdentifierForElement */
|
|
2246
|
+
/* unused harmony import specifier */ var getEnabledElement;
|
|
2223
2247
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
2224
2248
|
|
|
2225
2249
|
const state = {
|
|
@@ -2270,10 +2294,10 @@ function getTrackingUniqueIdentifiersForElement(element) {
|
|
|
2270
2294
|
}
|
|
2271
2295
|
|
|
2272
2296
|
|
|
2273
|
-
/***/ }
|
|
2297
|
+
/***/ },
|
|
2274
2298
|
|
|
2275
|
-
/***/ 92643
|
|
2276
|
-
|
|
2299
|
+
/***/ 92643
|
|
2300
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2277
2301
|
|
|
2278
2302
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2279
2303
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -2367,6 +2391,6 @@ const createReferencedImageDisplaySet = (displaySetService, displaySet) => {
|
|
|
2367
2391
|
};
|
|
2368
2392
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createReferencedImageDisplaySet);
|
|
2369
2393
|
|
|
2370
|
-
/***/ }
|
|
2394
|
+
/***/ }
|
|
2371
2395
|
|
|
2372
2396
|
}]);
|
|
@@ -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__(15953);
|
|
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
|
}]);
|