@ohif/app 3.7.0-beta.8 → 3.7.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/{917.bundle.d238efac58b7fe8fd1a3.js → 12.bundle.4a052141b46dec16862d.js} +6 -6
- package/dist/{295.bundle.957b1159fec14b9199a1.js → 125.bundle.253395f320b72180da63.js} +6 -6
- package/dist/{208.bundle.37c2a73b3387e657568c.js → 128.bundle.5198a2266456afecd420.js} +41 -59
- package/dist/{351.bundle.0742237651aef9694a65.js → 181.bundle.fa57199595cf28f44c7b.js} +226 -204
- package/dist/{351.css → 181.css} +1 -1
- package/dist/{744.bundle.23011553706b687f67e4.js → 19.bundle.75ec1ec14786e136b7b3.js} +240 -375
- package/dist/{606.bundle.5d876f5f3dd8287f0a28.js → 202.bundle.96bbb4547a346fe3921f.js} +1420 -750
- package/dist/{926.bundle.dbc9d0e591cb9217fda2.js → 220.bundle.f7e1c96c94245e70f2be.js} +990 -400
- package/dist/221.bundle.8a81cea315fa7697c0e0.js +1722 -0
- package/dist/221.css +2 -0
- package/dist/{664.bundle.09abae984223969d1bde.js → 23.bundle.e008ad788170f2ed5569.js} +5 -6
- package/dist/{976.bundle.dcbddf56a7d8f388bb8a.js → 236.bundle.d2da6d1991e1229bf913.js} +87 -103
- package/dist/{55.bundle.550a823e75eb608e8d5e.js → 250.bundle.36909d7bc681d66087d1.js} +52 -36
- package/dist/{973.bundle.03b016e6095622adf12f.js → 281.bundle.21a9e3178ddebe01b958.js} +18 -14
- package/dist/{82.bundle.10c2133333748ec6fba0.js → 342.bundle.70da5239bd664aa5d41a.js} +1768 -475
- package/dist/{192.bundle.2dc14a6e3c4c6be913b0.js → 348.bundle.8c5b950d30e5aa992290.js} +86 -73
- package/dist/{404.bundle.5d57295bc05206092d42.js → 359.bundle.d2a3abe1a5cd3ca3cd8e.js} +46 -131
- package/dist/{790.bundle.cedf27deeed29266a92b.js → 410.bundle.be538faa9c7fad92189b.js} +11 -9
- package/dist/{151.bundle.31ea35044218837bf73f.js → 417.bundle.af0a207c29b109f84159.js} +49 -17
- package/dist/{569.bundle.c8e771a8d28e237b32be.js → 451.bundle.dc0d14c3724464cca2bf.js} +86 -106
- package/dist/{581.bundle.dc6197189f7c88c27d4c.js → 471.bundle.2206d4c0ac2ad0df2362.js} +78 -99
- package/dist/{199.bundle.e4ac6606dd62e42e9da4.js → 506.bundle.97e53732423192fee818.js} +11 -9
- package/dist/{531.bundle.2a82fb1d69e5b57cc72b.js → 530.bundle.a03b6f942ace3e1baa1e.js} +726 -447
- package/dist/579.css +1 -0
- package/dist/{935.bundle.deeffff0e4f7b528e3c3.js → 604.bundle.a51f83e64004bca5f497.js} +2 -3
- package/dist/613.bundle.549d71231abfed24a2dc.js +532 -0
- package/dist/{984.bundle.e7dcbd3b8992748823fb.js → 663.bundle.b0f98b6e7221b1b9cf6a.js} +68 -38
- package/dist/{205.bundle.b5a473c200dcf2bbcdb4.js → 686.bundle.dccef1f36e4bc79bcc48.js} +6 -6
- package/dist/{50.bundle.424f8d05f1bebaafcf2c.js → 687.bundle.ab0ffdccae4610b00224.js} +218 -9
- package/dist/{331.bundle.bd0c13931a21d53086c9.js → 754.bundle.e3ce6855d8d4d187f224.js} +12423 -7549
- package/dist/{728.bundle.d13856835357400fef82.js → 774.bundle.d365320749c4f67cda70.js} +93 -64
- package/dist/{381.bundle.0905e683605fcbc0895f.js → 775.bundle.2285e7e0e67878948c0d.js} +16 -16
- package/dist/{270.bundle.4564621556b0f963a004.js → 777.bundle.ae3fdb8a470caecc0c6a.js} +1330 -929
- package/dist/{283.bundle.085cddb2f16e430677b0.js → 782.bundle.ee8dba2e8582b55cb38d.js} +117 -67
- package/dist/{642.bundle.25e56df5f0bcd2c729b4.js → 814.bundle.eec4458e893e6055f0fc.js} +6 -6
- package/dist/{799.bundle.758558e64147e5aad612.js → 822.bundle.5fca45a4f40f5259aec5.js} +81 -34
- package/dist/831.bundle.83658f62fcc769043605.js +16700 -0
- package/dist/{953.bundle.3b0189ebc11cf0946f18.js → 886.bundle.a9de117c3a42b7907cf6.js} +34 -29
- package/dist/945.min.worker.js +1 -1
- package/dist/945.min.worker.js.map +1 -1
- package/dist/{707.bundle.17a9d7352409b6269596.js → 967.bundle.cce1d004b2ff178b1a8e.js} +895 -572
- package/dist/_redirects +1 -1
- package/dist/app-config.js +35 -17
- package/dist/{app.bundle.837996a8f7dd2aaac338.js → app.bundle.681f66ab37cef811e68b.js} +73339 -68140
- package/dist/app.bundle.css +13 -12
- package/dist/assets/yandex-browser-manifest.json +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/{dicom-microscopy-viewer.bundle.aa60bdf008c32c39cfd7.js → dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js} +5 -4
- package/dist/es6-shim.min.js +3569 -2
- package/dist/google.js +8 -7
- package/dist/index.html +1 -1
- package/dist/{index.worker.1c69152d710fa7b84bce.worker.js → index.worker.e62ecca63f1a2e124230.worker.js} +2 -2
- package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +1 -0
- package/dist/init-service-worker.js +3 -5
- package/dist/oidc-client.min.js +10857 -39
- package/dist/polyfill.min.js +184 -1
- package/dist/silent-refresh.html +18 -9
- package/dist/sw.js +1 -1
- package/package.json +20 -21
- package/dist/616.bundle.eb4887184da6c57bf7a3.js +0 -685
- package/dist/780.bundle.fd0f13dc92e9caa0581e.js +0 -4769
- package/dist/index.worker.1c69152d710fa7b84bce.worker.js.map +0 -1
- /package/dist/{806.css → 19.css} +0 -0
- /package/dist/{55.css → 250.css} +0 -0
- /package/dist/{707.css → 967.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(self["webpackChunk"] = self["webpackChunk"] || []).push([[417],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 15747:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
@@ -355,13 +355,40 @@ function calculateSUVlbmScalingFactor(inputs) {
|
|
|
355
355
|
PatientSize
|
|
356
356
|
} = inputs;
|
|
357
357
|
let LBM;
|
|
358
|
-
const
|
|
359
|
-
// reference: https://www.medicalconnections.co.uk/kb/calculating-suv-from-pet-images/
|
|
358
|
+
const weightSizeFactor = Math.pow(PatientWeight / (PatientSize * 100), 2); // reference: https://www.medicalconnections.co.uk/kb/calculating-suv-from-pet-images/
|
|
360
359
|
|
|
361
360
|
if (PatientSex === 'F') {
|
|
362
|
-
LBM = 1.07 * PatientWeight - 148 *
|
|
361
|
+
LBM = 1.07 * PatientWeight - 148 * weightSizeFactor;
|
|
363
362
|
} else if (PatientSex === 'M') {
|
|
364
|
-
LBM = 1.1 * PatientWeight - 120 *
|
|
363
|
+
LBM = 1.1 * PatientWeight - 120 * weightSizeFactor;
|
|
364
|
+
} else {
|
|
365
|
+
throw new Error(`PatientSex is an invalid value: ${PatientSex}`);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
return LBM * 1000; // convert in gr
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* From https://link.springer.com/article/10.1007/s00259-014-2961-x
|
|
372
|
+
* and https://link.springer.com/article/10.2165/00003088-200544100-00004
|
|
373
|
+
* and
|
|
374
|
+
* @param inputs
|
|
375
|
+
* @returns
|
|
376
|
+
*/
|
|
377
|
+
|
|
378
|
+
|
|
379
|
+
function calculateSUVlbmJanmahasatianScalingFactor(inputs) {
|
|
380
|
+
const {
|
|
381
|
+
PatientSex,
|
|
382
|
+
PatientWeight,
|
|
383
|
+
PatientSize
|
|
384
|
+
} = inputs;
|
|
385
|
+
let LBM;
|
|
386
|
+
const bodyMassIndex = PatientWeight / Math.pow(PatientSize, 2);
|
|
387
|
+
|
|
388
|
+
if (PatientSex === 'F') {
|
|
389
|
+
LBM = 9270 * PatientWeight / (8780 + 244 * bodyMassIndex);
|
|
390
|
+
} else if (PatientSex === 'M') {
|
|
391
|
+
LBM = 9270 * PatientWeight / (6680 + 216 * bodyMassIndex);
|
|
365
392
|
} else {
|
|
366
393
|
throw new Error(`PatientSex is an invalid value: ${PatientSex}`);
|
|
367
394
|
}
|
|
@@ -502,9 +529,10 @@ function calculateSUVScalingFactors(instances) {
|
|
|
502
529
|
|
|
503
530
|
if (!isSingleSeries) {
|
|
504
531
|
throw new Error('The set of instances does not appear to come from one Series. Every instance must have identical values for series-level metadata properties');
|
|
505
|
-
}
|
|
532
|
+
} // Treat null, undefined and zero as a missing PatientWeight.
|
|
533
|
+
|
|
506
534
|
|
|
507
|
-
if (PatientWeight
|
|
535
|
+
if (!PatientWeight) {
|
|
508
536
|
throw new Error('PatientWeight value is missing. It is not possible to calculate the SUV factors');
|
|
509
537
|
}
|
|
510
538
|
|
|
@@ -567,6 +595,7 @@ function calculateSUVScalingFactors(instances) {
|
|
|
567
595
|
|
|
568
596
|
|
|
569
597
|
let suvlbmFactor;
|
|
598
|
+
let suvlbmJenmaFactor;
|
|
570
599
|
|
|
571
600
|
if (PatientSize === null || PatientSize === undefined) {
|
|
572
601
|
console.warn('PatientSize value is missing. It is not possible to calculate the SUV lbm factors');
|
|
@@ -579,6 +608,7 @@ function calculateSUVScalingFactors(instances) {
|
|
|
579
608
|
PatientSize
|
|
580
609
|
};
|
|
581
610
|
suvlbmFactor = calculateSUVlbmScalingFactor(suvlbmInputs);
|
|
611
|
+
suvlbmJenmaFactor = calculateSUVlbmJanmahasatianScalingFactor(suvlbmInputs);
|
|
582
612
|
}
|
|
583
613
|
|
|
584
614
|
return results.map(function (result, index) {
|
|
@@ -594,6 +624,10 @@ function calculateSUVScalingFactors(instances) {
|
|
|
594
624
|
if (suvlbmFactor) {
|
|
595
625
|
// multiply for LBM
|
|
596
626
|
factors.suvlbm = decayCorrectionArray[index] * suvlbmFactor;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
if (suvlbmJenmaFactor) {
|
|
630
|
+
factors.suvlbmJanma = decayCorrectionArray[index] * suvlbmJenmaFactor;
|
|
597
631
|
} // factor formulaes taken from:
|
|
598
632
|
// https://www.medicalconnections.co.uk/kb/calculating-suv-from-pet-images/
|
|
599
633
|
|
|
@@ -603,24 +637,23 @@ function calculateSUVScalingFactors(instances) {
|
|
|
603
637
|
}
|
|
604
638
|
|
|
605
639
|
|
|
606
|
-
//# sourceMappingURL=calculate-suv.esm.js.map
|
|
607
640
|
|
|
608
641
|
|
|
609
642
|
/***/ }),
|
|
610
643
|
|
|
611
|
-
/***/
|
|
644
|
+
/***/ 94614:
|
|
612
645
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
613
646
|
|
|
614
647
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
615
648
|
/* harmony export */ S_: () => (/* binding */ VariableSizeList)
|
|
616
649
|
/* harmony export */ });
|
|
617
650
|
/* unused harmony exports FixedSizeGrid, FixedSizeList, VariableSizeGrid, areEqual, shouldComponentUpdate */
|
|
618
|
-
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
619
|
-
/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
620
|
-
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
621
|
-
/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
622
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
623
|
-
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
651
|
+
/* harmony import */ var _babel_runtime_helpers_esm_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(76805);
|
|
652
|
+
/* harmony import */ var _babel_runtime_helpers_esm_assertThisInitialized__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(80107);
|
|
653
|
+
/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(84067);
|
|
654
|
+
/* harmony import */ var memoize_one__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25539);
|
|
655
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(43001);
|
|
656
|
+
/* harmony import */ var _babel_runtime_helpers_esm_objectWithoutPropertiesLoose__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8339);
|
|
624
657
|
|
|
625
658
|
|
|
626
659
|
|
|
@@ -2571,7 +2604,6 @@ function shouldComponentUpdate(nextProps, nextState) {
|
|
|
2571
2604
|
}
|
|
2572
2605
|
|
|
2573
2606
|
|
|
2574
|
-
//# sourceMappingURL=index.esm.js.map
|
|
2575
2607
|
|
|
2576
2608
|
|
|
2577
2609
|
/***/ })
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(self["webpackChunk"] = self["webpackChunk"] || []).push([[451],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 4451:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
// ESM COMPAT FLAG
|
|
@@ -13,80 +13,26 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
16
|
-
var prop_types = __webpack_require__(
|
|
16
|
+
var prop_types = __webpack_require__(3827);
|
|
17
17
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
18
18
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
19
|
-
var react = __webpack_require__(
|
|
19
|
+
var react = __webpack_require__(43001);
|
|
20
20
|
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
|
|
21
|
-
var es = __webpack_require__(
|
|
22
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
23
|
-
var src = __webpack_require__(
|
|
24
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
25
|
-
var ui_src = __webpack_require__(
|
|
21
|
+
var es = __webpack_require__(69190);
|
|
22
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 75 modules
|
|
23
|
+
var src = __webpack_require__(34491);
|
|
24
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 485 modules
|
|
25
|
+
var ui_src = __webpack_require__(71783);
|
|
26
26
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/initSEGToolGroup.ts
|
|
27
27
|
function createSEGToolGroupAndAddTools(ToolGroupService, customizationService, toolGroupId) {
|
|
28
28
|
const {
|
|
29
29
|
tools
|
|
30
30
|
} = customizationService.get('cornerstone.overlayViewportTools') ?? {};
|
|
31
|
-
return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools
|
|
31
|
+
return ToolGroupService.createToolGroupAndAddTools(toolGroupId, tools);
|
|
32
32
|
}
|
|
33
33
|
/* harmony default export */ const initSEGToolGroup = (createSEGToolGroupAndAddTools);
|
|
34
|
-
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/_hydrateSEG.ts
|
|
35
|
-
async function _hydrateSEGDisplaySet(_ref) {
|
|
36
|
-
let {
|
|
37
|
-
segDisplaySet,
|
|
38
|
-
viewportIndex,
|
|
39
|
-
servicesManager
|
|
40
|
-
} = _ref;
|
|
41
|
-
const {
|
|
42
|
-
segmentationService,
|
|
43
|
-
hangingProtocolService,
|
|
44
|
-
viewportGridService
|
|
45
|
-
} = servicesManager.services;
|
|
46
|
-
const displaySetInstanceUID = segDisplaySet.referencedDisplaySetInstanceUID;
|
|
47
|
-
let segmentationId = null;
|
|
48
|
-
|
|
49
|
-
// We need the hydration to notify panels about the new segmentation added
|
|
50
|
-
const suppressEvents = false;
|
|
51
|
-
segmentationId = await segmentationService.createSegmentationForSEGDisplaySet(segDisplaySet, segmentationId, suppressEvents);
|
|
52
|
-
segmentationService.hydrateSegmentation(segDisplaySet.displaySetInstanceUID);
|
|
53
|
-
const {
|
|
54
|
-
viewports
|
|
55
|
-
} = viewportGridService.getState();
|
|
56
|
-
const updatedViewports = hangingProtocolService.getViewportsRequireUpdate(viewportIndex, displaySetInstanceUID);
|
|
57
|
-
|
|
58
|
-
// Todo: fix this after we have a better way for stack viewport segmentations
|
|
59
|
-
|
|
60
|
-
// check every viewport in the viewports to see if the displaySetInstanceUID
|
|
61
|
-
// is being displayed, if so we need to update the viewport to use volume viewport
|
|
62
|
-
// (if already is not using it) since Cornerstone3D currently only supports
|
|
63
|
-
// volume viewport for segmentation
|
|
64
|
-
viewports.forEach((viewport, index) => {
|
|
65
|
-
if (index === viewportIndex) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
const shouldDisplaySeg = segmentationService.shouldRenderSegmentation(viewport.displaySetInstanceUIDs, segDisplaySet.displaySetInstanceUID);
|
|
69
|
-
if (shouldDisplaySeg) {
|
|
70
|
-
updatedViewports.push({
|
|
71
|
-
viewportIndex: index,
|
|
72
|
-
displaySetInstanceUIDs: viewport.displaySetInstanceUIDs,
|
|
73
|
-
viewportOptions: {
|
|
74
|
-
initialImageOptions: {
|
|
75
|
-
preset: 'middle'
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
// Do the entire update at once
|
|
83
|
-
viewportGridService.setDisplaySetsForViewports(updatedViewports);
|
|
84
|
-
return true;
|
|
85
|
-
}
|
|
86
|
-
/* harmony default export */ const _hydrateSEG = (_hydrateSEGDisplaySet);
|
|
87
34
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/promptHydrateSEG.ts
|
|
88
35
|
|
|
89
|
-
|
|
90
36
|
const RESPONSE = {
|
|
91
37
|
NO_NEVER: -1,
|
|
92
38
|
CANCEL: 0,
|
|
@@ -96,32 +42,36 @@ function promptHydrateSEG(_ref) {
|
|
|
96
42
|
let {
|
|
97
43
|
servicesManager,
|
|
98
44
|
segDisplaySet,
|
|
99
|
-
|
|
45
|
+
viewportId,
|
|
46
|
+
preHydrateCallbacks,
|
|
47
|
+
hydrateSEGDisplaySet
|
|
100
48
|
} = _ref;
|
|
101
49
|
const {
|
|
102
50
|
uiViewportDialogService
|
|
103
51
|
} = servicesManager.services;
|
|
104
52
|
return new Promise(async function (resolve, reject) {
|
|
105
|
-
const promptResult = await _askHydrate(uiViewportDialogService,
|
|
53
|
+
const promptResult = await _askHydrate(uiViewportDialogService, viewportId);
|
|
106
54
|
if (promptResult === RESPONSE.HYDRATE_SEG) {
|
|
107
|
-
|
|
55
|
+
preHydrateCallbacks?.forEach(callback => {
|
|
56
|
+
callback();
|
|
57
|
+
});
|
|
58
|
+
const isHydrated = await hydrateSEGDisplaySet({
|
|
108
59
|
segDisplaySet,
|
|
109
|
-
|
|
110
|
-
servicesManager
|
|
60
|
+
viewportId
|
|
111
61
|
});
|
|
112
62
|
resolve(isHydrated);
|
|
113
63
|
}
|
|
114
64
|
});
|
|
115
65
|
}
|
|
116
|
-
function _askHydrate(uiViewportDialogService,
|
|
66
|
+
function _askHydrate(uiViewportDialogService, viewportId) {
|
|
117
67
|
return new Promise(function (resolve, reject) {
|
|
118
68
|
const message = 'Do you want to open this Segmentation?';
|
|
119
69
|
const actions = [{
|
|
120
|
-
type: ui_src/* ButtonEnums.type */.LZ.
|
|
70
|
+
type: ui_src/* ButtonEnums.type */.LZ.dt.secondary,
|
|
121
71
|
text: 'No',
|
|
122
72
|
value: RESPONSE.CANCEL
|
|
123
73
|
}, {
|
|
124
|
-
type: ui_src/* ButtonEnums.type */.LZ.
|
|
74
|
+
type: ui_src/* ButtonEnums.type */.LZ.dt.primary,
|
|
125
75
|
text: 'Yes',
|
|
126
76
|
value: RESPONSE.HYDRATE_SEG
|
|
127
77
|
}];
|
|
@@ -130,7 +80,7 @@ function _askHydrate(uiViewportDialogService, viewportIndex) {
|
|
|
130
80
|
resolve(result);
|
|
131
81
|
};
|
|
132
82
|
uiViewportDialogService.show({
|
|
133
|
-
|
|
83
|
+
viewportId,
|
|
134
84
|
type: 'info',
|
|
135
85
|
message,
|
|
136
86
|
actions,
|
|
@@ -156,8 +106,8 @@ function _getStatusComponent(_ref) {
|
|
|
156
106
|
let StatusIcon = null;
|
|
157
107
|
const {
|
|
158
108
|
t
|
|
159
|
-
} = (0,es/* useTranslation */.$G)(
|
|
160
|
-
const loadStr = t(
|
|
109
|
+
} = (0,es/* useTranslation */.$G)('Common');
|
|
110
|
+
const loadStr = t('LOAD');
|
|
161
111
|
switch (isHydrated) {
|
|
162
112
|
case true:
|
|
163
113
|
StatusIcon = () => /*#__PURE__*/react.createElement(ui_src/* Icon */.JO, {
|
|
@@ -167,18 +117,19 @@ function _getStatusComponent(_ref) {
|
|
|
167
117
|
break;
|
|
168
118
|
case false:
|
|
169
119
|
StatusIcon = () => /*#__PURE__*/react.createElement(ui_src/* Icon */.JO, {
|
|
120
|
+
className: "text-aqua-pale",
|
|
170
121
|
name: "status-untracked"
|
|
171
122
|
});
|
|
172
123
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "Click LOAD to load segmentation.");
|
|
173
124
|
}
|
|
174
125
|
const StatusArea = () => /*#__PURE__*/react.createElement("div", {
|
|
175
|
-
className: "flex h-6
|
|
126
|
+
className: "flex h-6 cursor-default text-sm leading-6 text-white"
|
|
176
127
|
}, /*#__PURE__*/react.createElement("div", {
|
|
177
|
-
className: "min-w-[45px]
|
|
128
|
+
className: "bg-customgray-100 flex min-w-[45px] items-center rounded-l-xl rounded-r p-1"
|
|
178
129
|
}, /*#__PURE__*/react.createElement(StatusIcon, null), /*#__PURE__*/react.createElement("span", {
|
|
179
130
|
className: "ml-1"
|
|
180
131
|
}, "SEG")), !isHydrated && /*#__PURE__*/react.createElement("div", {
|
|
181
|
-
className: "ml-1 px-1.5
|
|
132
|
+
className: "bg-primary-main hover:bg-primary-light ml-1 cursor-pointer rounded px-1.5 hover:text-black"
|
|
182
133
|
// Using onMouseUp here because onClick is not working when the viewport is not active and is styled with pointer-events:none
|
|
183
134
|
,
|
|
184
135
|
onMouseUp: onStatusClick
|
|
@@ -198,7 +149,6 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
198
149
|
|
|
199
150
|
|
|
200
151
|
|
|
201
|
-
|
|
202
152
|
const {
|
|
203
153
|
formatDate
|
|
204
154
|
} = src.utils;
|
|
@@ -208,14 +158,15 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
208
158
|
children,
|
|
209
159
|
displaySets,
|
|
210
160
|
viewportOptions,
|
|
211
|
-
viewportIndex,
|
|
212
161
|
viewportLabel,
|
|
213
162
|
servicesManager,
|
|
214
|
-
extensionManager
|
|
163
|
+
extensionManager,
|
|
164
|
+
commandsManager
|
|
215
165
|
} = props;
|
|
216
166
|
const {
|
|
217
167
|
t
|
|
218
168
|
} = (0,es/* useTranslation */.$G)('SEGViewport');
|
|
169
|
+
const viewportId = viewportOptions.viewportId;
|
|
219
170
|
const {
|
|
220
171
|
displaySetService,
|
|
221
172
|
toolGroupService,
|
|
@@ -223,7 +174,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
223
174
|
uiNotificationService,
|
|
224
175
|
customizationService
|
|
225
176
|
} = servicesManager.services;
|
|
226
|
-
const toolGroupId = `${SEG_TOOLGROUP_BASE_NAME}-${
|
|
177
|
+
const toolGroupId = `${SEG_TOOLGROUP_BASE_NAME}-${viewportId}`;
|
|
227
178
|
|
|
228
179
|
// SEG viewport will always have a single display set
|
|
229
180
|
if (displaySets.length > 1) {
|
|
@@ -233,7 +184,6 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
233
184
|
const [viewportGrid, viewportGridService] = (0,ui_src/* useViewportGrid */.O_)();
|
|
234
185
|
|
|
235
186
|
// States
|
|
236
|
-
const [isToolGroupCreated, setToolGroupCreated] = (0,react.useState)(false);
|
|
237
187
|
const [selectedSegment, setSelectedSegment] = (0,react.useState)(1);
|
|
238
188
|
|
|
239
189
|
// Hydration means that the SEG is opened and segments are loaded into the
|
|
@@ -253,7 +203,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
253
203
|
const referencedDisplaySetRef = (0,react.useRef)(null);
|
|
254
204
|
const {
|
|
255
205
|
viewports,
|
|
256
|
-
|
|
206
|
+
activeViewportId
|
|
257
207
|
} = viewportGrid;
|
|
258
208
|
const referencedDisplaySet = segDisplaySet.getReferenceDisplaySet();
|
|
259
209
|
const referencedDisplaySetMetadata = _getReferencedDisplaySetMetadata(referencedDisplaySet, segDisplaySet);
|
|
@@ -273,6 +223,16 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
273
223
|
const onElementDisabled = () => {
|
|
274
224
|
setElement(null);
|
|
275
225
|
};
|
|
226
|
+
const storePresentationState = (0,react.useCallback)(() => {
|
|
227
|
+
viewportGrid?.viewports.forEach(_ref => {
|
|
228
|
+
let {
|
|
229
|
+
viewportId
|
|
230
|
+
} = _ref;
|
|
231
|
+
commandsManager.runCommand('storePresentation', {
|
|
232
|
+
viewportId
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}, [viewportGrid]);
|
|
276
236
|
const getCornerstoneViewport = (0,react.useCallback)(() => {
|
|
277
237
|
const {
|
|
278
238
|
component: Component
|
|
@@ -294,7 +254,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
294
254
|
onElementDisabled: onElementDisabled
|
|
295
255
|
// initialImageIndex={initialImageIndex}
|
|
296
256
|
}));
|
|
297
|
-
}, [
|
|
257
|
+
}, [viewportId, segDisplaySet, toolGroupId]);
|
|
298
258
|
const onSegmentChange = (0,react.useCallback)(direction => {
|
|
299
259
|
direction = direction === 'left' ? -1 : 1;
|
|
300
260
|
const segmentationId = segDisplaySet.displaySetInstanceUID;
|
|
@@ -321,14 +281,16 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
321
281
|
}
|
|
322
282
|
utils_promptHydrateSEG({
|
|
323
283
|
servicesManager,
|
|
324
|
-
|
|
325
|
-
segDisplaySet
|
|
284
|
+
viewportId,
|
|
285
|
+
segDisplaySet,
|
|
286
|
+
preHydrateCallbacks: [storePresentationState],
|
|
287
|
+
hydrateSEGDisplaySet
|
|
326
288
|
}).then(isHydrated => {
|
|
327
289
|
if (isHydrated) {
|
|
328
290
|
setIsHydrated(true);
|
|
329
291
|
}
|
|
330
292
|
});
|
|
331
|
-
}, [servicesManager,
|
|
293
|
+
}, [servicesManager, viewportId, segDisplaySet, segIsLoading]);
|
|
332
294
|
(0,react.useEffect)(() => {
|
|
333
295
|
const {
|
|
334
296
|
unsubscribe
|
|
@@ -351,11 +313,11 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
351
313
|
(0,react.useEffect)(() => {
|
|
352
314
|
const {
|
|
353
315
|
unsubscribe
|
|
354
|
-
} = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE,
|
|
316
|
+
} = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE, _ref2 => {
|
|
355
317
|
let {
|
|
356
318
|
percentComplete,
|
|
357
319
|
numSegments
|
|
358
|
-
} =
|
|
320
|
+
} = _ref2;
|
|
359
321
|
setProcessingProgress({
|
|
360
322
|
percentComplete,
|
|
361
323
|
totalSegments: numSegments
|
|
@@ -370,14 +332,14 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
370
332
|
Cleanup the SEG viewport when the viewport is destroyed
|
|
371
333
|
*/
|
|
372
334
|
(0,react.useEffect)(() => {
|
|
373
|
-
const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED,
|
|
335
|
+
const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED, _ref3 => {
|
|
374
336
|
let {
|
|
375
337
|
displaySetInstanceUIDs
|
|
376
|
-
} =
|
|
377
|
-
const activeViewport = viewports
|
|
338
|
+
} = _ref3;
|
|
339
|
+
const activeViewport = viewports.get(activeViewportId);
|
|
378
340
|
if (displaySetInstanceUIDs.includes(activeViewport.displaySetInstanceUID)) {
|
|
379
341
|
viewportGridService.setDisplaySetsForViewport({
|
|
380
|
-
|
|
342
|
+
viewportId: activeViewportId,
|
|
381
343
|
displaySetInstanceUIDs: []
|
|
382
344
|
});
|
|
383
345
|
}
|
|
@@ -395,7 +357,6 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
395
357
|
// This creates a custom tool group which has the lifetime of this view
|
|
396
358
|
// only, and does NOT interfere with currently displayed segmentations.
|
|
397
359
|
toolGroup = initSEGToolGroup(toolGroupService, customizationService, toolGroupId);
|
|
398
|
-
setToolGroupCreated(true);
|
|
399
360
|
return () => {
|
|
400
361
|
// remove the segmentation representations if seg displayset changed
|
|
401
362
|
segmentationService.removeSegmentationRepresentationFromToolGroup(toolGroupId);
|
|
@@ -421,7 +382,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
421
382
|
if (children && children.length) {
|
|
422
383
|
childrenWithProps = children.map((child, index) => {
|
|
423
384
|
return child && /*#__PURE__*/react.cloneElement(child, {
|
|
424
|
-
|
|
385
|
+
viewportId,
|
|
425
386
|
key: index
|
|
426
387
|
});
|
|
427
388
|
});
|
|
@@ -437,11 +398,27 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
437
398
|
SeriesDescription,
|
|
438
399
|
SpacingBetweenSlices
|
|
439
400
|
} = referencedDisplaySetRef.current.metadata;
|
|
401
|
+
const hydrateSEGDisplaySet = _ref4 => {
|
|
402
|
+
let {
|
|
403
|
+
segDisplaySet,
|
|
404
|
+
viewportId
|
|
405
|
+
} = _ref4;
|
|
406
|
+
commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
|
407
|
+
displaySets: [segDisplaySet],
|
|
408
|
+
viewportId
|
|
409
|
+
});
|
|
410
|
+
};
|
|
440
411
|
const onStatusClick = async () => {
|
|
441
|
-
|
|
412
|
+
// Before hydrating a SEG and make it added to all viewports in the grid
|
|
413
|
+
// that share the same frameOfReferenceUID, we need to store the viewport grid
|
|
414
|
+
// presentation state, so that we can restore it after hydrating the SEG. This is
|
|
415
|
+
// required if the user has changed the viewport (other viewport than SEG viewport)
|
|
416
|
+
// presentation state (w/l and invert) and then opens the SEG. If we don't store
|
|
417
|
+
// the presentation state, the viewport will be reset to the default presentation
|
|
418
|
+
storePresentationState();
|
|
419
|
+
const isHydrated = await hydrateSEGDisplaySet({
|
|
442
420
|
segDisplaySet,
|
|
443
|
-
|
|
444
|
-
servicesManager
|
|
421
|
+
viewportId
|
|
445
422
|
});
|
|
446
423
|
setIsHydrated(isHydrated);
|
|
447
424
|
};
|
|
@@ -467,15 +444,16 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
467
444
|
patientSex: PatientSex || '',
|
|
468
445
|
patientAge: PatientAge || '',
|
|
469
446
|
MRN: PatientID || '',
|
|
470
|
-
thickness: SliceThickness ?
|
|
471
|
-
|
|
447
|
+
thickness: SliceThickness ? src.utils.roundNumber(SliceThickness, 2) : '',
|
|
448
|
+
thicknessUnits: SliceThickness !== undefined ? 'mm' : '',
|
|
449
|
+
spacing: SpacingBetweenSlices !== undefined ? src.utils.roundNumber(SpacingBetweenSlices, 2) : '',
|
|
472
450
|
scanner: ManufacturerModelName || ''
|
|
473
451
|
}
|
|
474
452
|
}
|
|
475
453
|
}), /*#__PURE__*/react.createElement("div", {
|
|
476
|
-
className: "relative flex
|
|
454
|
+
className: "relative flex h-full w-full flex-row overflow-hidden"
|
|
477
455
|
}, segIsLoading && /*#__PURE__*/react.createElement(ui_src/* LoadingIndicatorTotalPercent */.bk, {
|
|
478
|
-
className: "
|
|
456
|
+
className: "h-full w-full",
|
|
479
457
|
totalNumbers: processingProgress.totalSegments,
|
|
480
458
|
percentComplete: processingProgress.percentComplete,
|
|
481
459
|
loadingText: "Loading SEG..."
|
|
@@ -483,7 +461,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
483
461
|
}
|
|
484
462
|
OHIFCornerstoneSEGViewport.propTypes = {
|
|
485
463
|
displaySets: prop_types_default().arrayOf((prop_types_default()).object),
|
|
486
|
-
|
|
464
|
+
viewportId: (prop_types_default()).string.isRequired,
|
|
487
465
|
dataSource: (prop_types_default()).object,
|
|
488
466
|
children: (prop_types_default()).node,
|
|
489
467
|
customProps: (prop_types_default()).object
|
|
@@ -493,11 +471,13 @@ OHIFCornerstoneSEGViewport.defaultProps = {
|
|
|
493
471
|
};
|
|
494
472
|
function _getReferencedDisplaySetMetadata(referencedDisplaySet, segDisplaySet) {
|
|
495
473
|
const {
|
|
496
|
-
SharedFunctionalGroupsSequence
|
|
474
|
+
SharedFunctionalGroupsSequence
|
|
497
475
|
} = segDisplaySet.instance;
|
|
476
|
+
const SharedFunctionalGroup = Array.isArray(SharedFunctionalGroupsSequence) ? SharedFunctionalGroupsSequence[0] : SharedFunctionalGroupsSequence;
|
|
498
477
|
const {
|
|
499
|
-
PixelMeasuresSequence
|
|
478
|
+
PixelMeasuresSequence
|
|
500
479
|
} = SharedFunctionalGroup;
|
|
480
|
+
const PixelMeasures = Array.isArray(PixelMeasuresSequence) ? PixelMeasuresSequence[0] : PixelMeasuresSequence;
|
|
501
481
|
const {
|
|
502
482
|
SpacingBetweenSlices,
|
|
503
483
|
SliceThickness
|