@ohif/app 3.8.0-beta.8 → 3.8.0-beta.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{220.bundle.f7e1c96c94245e70f2be.js → 109.bundle.b4fee2a22b622839baf5.js} +4466 -3715
- package/dist/{471.bundle.49c8d281adbae4a2c4df.js → 121.bundle.47f05840a5b3cdf75543.js} +94 -113
- package/dist/141.bundle.556b4c1e4cab770417ac.js +8620 -0
- package/dist/{687.bundle.9065db35c01823286f08.js → 164.bundle.fadc7c5d634402c73b5f.js} +22 -38
- package/dist/17dd54813d5acc10bf8f.wasm +0 -0
- package/dist/183.bundle.a3e238998be71c4b2af8.js +30410 -0
- package/dist/{506.bundle.5731bb4349e266491225.js → 188.bundle.51dc4b37920f45594393.js} +23 -28
- package/dist/{342.bundle.e7c3d500f86fdfcc62b5.js → 206.bundle.fcaa081a0d1f68095c31.js} +1991 -1145
- package/dist/20fc4c659b85ccd2a9c0.wasm +0 -0
- package/dist/217.bundle.d44bbaa50b6fa563fe15.js +115126 -0
- package/dist/{451.bundle.57c21db5d003c75e9d61.js → 295.bundle.5ace95771ced62bdcab8.js} +111 -128
- package/dist/{125.bundle.253395f320b72180da63.js → 297.bundle.194d8985ab974839b5b6.js} +7 -8
- package/dist/{19.bundle.f77c5787b6d8ac0b638b.js → 325.bundle.fd8e0c18db4708d03a91.js} +477 -373
- package/dist/335.bundle.8400aa5a88697a6b9d53.js +2590 -0
- package/dist/{202.bundle.d3490836f71e001dd30f.js → 342.bundle.e6d0bba29351b5650a8c.js} +566 -868
- package/dist/{776.bundle.a2dedb405a12ffd7699b.js → 41.bundle.0905b258a90a7c6437bb.js} +7453 -3624
- package/dist/422.bundle.c6fd037b075dd54f1ba7.js +865 -0
- package/dist/{957.bundle.9ea4506963ef8b2d84ba.js → 433.bundle.e0018820758f5a86fa7f.js} +14797 -27561
- package/dist/445.bundle.38c6d2af64e41cd7c614.js +7835 -0
- package/dist/{126.bundle.6e7111d58bcc937ffd80.js → 448.bundle.5e6da31477887bf53016.js} +356 -430
- package/dist/487.bundle.89d973049defb3ba6cb7.js +1876 -0
- package/dist/{886.bundle.c8dd3ecc42a4253de278.js → 530.bundle.207b38c15c4c01e4db0e.js} +104 -121
- package/dist/{250.bundle.aea3335667054bdefe36.js → 544.bundle.1c1f57118560046649c1.js} +37 -62
- package/dist/574.bundle.d648fea691d6709bf2b4.js +2652 -0
- package/dist/{181.css → 574.css} +1 -1
- package/dist/{410.bundle.15c855b0ff4a1a674fb8.js → 594.bundle.84076375b127b9c7f673.js} +183 -221
- package/dist/{221.bundle.aef554202c58483cb34e.js → 633.bundle.acab89baaa06a299d679.js} +365 -553
- package/dist/{774.bundle.4b2dc46a35012b898e1a.js → 644.bundle.1e77691d2eeb96a423b0.js} +1852 -8945
- package/dist/{663.bundle.d7be28450db14266cdd0.js → 669.bundle.b17e8a621e38d92c653f.js} +310 -265
- package/dist/699.bundle.9367d7ef9f7615b2e733.js +772 -0
- package/dist/702.bundle.963481fbf871984b646f.js +8426 -0
- package/dist/722.bundle.afab1fe6bfcd569130ac.js +1083 -0
- package/dist/{359.bundle.45ecb3d28e8c22142606.js → 724.bundle.55f9f49816de931af91a.js} +165 -260
- package/dist/{757.bundle.ec8301d8e70d2b990f65.js → 726.bundle.0b3d9277d22fe7e15b89.js} +512 -879
- package/dist/{530.bundle.a03b6f942ace3e1baa1e.js → 835.bundle.15aff0b7433bb0dd6d6d.js} +37 -30
- package/dist/{822.bundle.82cdc418f8f56da6060b.js → 862.bundle.d32ab08e64806b2e964d.js} +81 -97
- package/dist/{236.bundle.4e9924934a747afac132.js → 889.bundle.8ef8b723d0163d5d135c.js} +207 -199
- package/dist/{281.bundle.deb7492d143e7768d8bf.js → 905.bundle.8a96e1a75b7cfe5ec093.js} +157 -124
- package/dist/{814.bundle.c8c951d20039b63b865a.js → 907.bundle.5c88ed911bed18582da4.js} +16 -30
- package/dist/{417.bundle.af0a207c29b109f84159.js → 931.bundle.d270a1fda9a2836c3cc5.js} +26 -26
- package/dist/{686.bundle.dccef1f36e4bc79bcc48.js → 939.bundle.9d93b2e47c52338747a2.js} +7 -8
- package/dist/94.bundle.f5f2479c214180d05d42.js +778 -0
- package/dist/{12.bundle.b5ca13e5363f170ecb3b.js → 961.bundle.f4e52bc76d3044d05372.js} +20 -33
- package/dist/app-config.js +1 -0
- package/dist/app.bundle.css +16 -13
- package/dist/{app.bundle.a978edc59b9d82f2eb22.js → app.bundle.ed937512f7d19d61c411.js} +183396 -87682
- package/dist/assets/images/CT-AAA.png +0 -0
- package/dist/assets/images/CT-AAA2.png +0 -0
- package/dist/assets/images/CT-Air.png +0 -0
- package/dist/assets/images/CT-Bone.png +0 -0
- package/dist/assets/images/CT-Bones.png +0 -0
- package/dist/assets/images/CT-Cardiac.png +0 -0
- package/dist/assets/images/CT-Cardiac2.png +0 -0
- package/dist/assets/images/CT-Cardiac3.png +0 -0
- package/dist/assets/images/CT-Chest-Contrast-Enhanced.png +0 -0
- package/dist/assets/images/CT-Chest-Vessels.png +0 -0
- package/dist/assets/images/CT-Coronary-Arteries-2.png +0 -0
- package/dist/assets/images/CT-Coronary-Arteries-3.png +0 -0
- package/dist/assets/images/CT-Coronary-Arteries.png +0 -0
- package/dist/assets/images/CT-Cropped-Volume-Bone.png +0 -0
- package/dist/assets/images/CT-Fat.png +0 -0
- package/dist/assets/images/CT-Liver-Vasculature.png +0 -0
- package/dist/assets/images/CT-Lung.png +0 -0
- package/dist/assets/images/CT-MIP.png +0 -0
- package/dist/assets/images/CT-Muscle.png +0 -0
- package/dist/assets/images/CT-Pulmonary-Arteries.png +0 -0
- package/dist/assets/images/CT-Soft-Tissue.png +0 -0
- package/dist/assets/images/DTI-FA-Brain.png +0 -0
- package/dist/assets/images/MR-Angio.png +0 -0
- package/dist/assets/images/MR-Default.png +0 -0
- package/dist/assets/images/MR-MIP.png +0 -0
- package/dist/assets/images/MR-T2-Brain.png +0 -0
- package/dist/assets/images/VolumeRendering.png +0 -0
- package/dist/cornerstoneDICOMImageLoader.min.js +1 -1
- package/dist/cornerstoneDICOMImageLoader.min.js.map +1 -1
- package/dist/{dicom-microscopy-viewer.bundle.2c146384eb9466d02ff8.js → dicom-microscopy-viewer.bundle.d3a56dc9f62df5e11019.js} +3 -3
- package/dist/histogram-worker.bundle.829e14ec12c2b41a4323.js +359 -0
- package/dist/index.html +1 -1
- package/dist/{index.worker.e62ecca63f1a2e124230.worker.js → index.worker.64c896c4316fcd506666.worker.js} +2 -2
- package/dist/index.worker.64c896c4316fcd506666.worker.js.map +1 -0
- package/dist/polySeg.bundle.f1a6ece1396dc1385155.js +249 -0
- package/dist/serve.json +12 -0
- package/dist/sw.js +1 -1
- package/package.json +26 -22
- package/dist/181.bundle.a62b9f0ec692299acb35.js +0 -1527
- package/dist/23.bundle.e008ad788170f2ed5569.js +0 -900
- package/dist/604.bundle.a51f83e64004bca5f497.js +0 -1848
- package/dist/613.bundle.9e7072e5b575354fe51e.js +0 -532
- package/dist/743.bundle.489f7df3a089d4d374e1.js +0 -78007
- package/dist/75788f12450d4c5ed494.wasm +0 -0
- package/dist/775.bundle.2285e7e0e67878948c0d.js +0 -1009
- package/dist/788.bundle.207ac23c0dfa70cbe3fb.js +0 -2682
- package/dist/82.bundle.d6fdcca0f67540bb226a.js +0 -1049
- package/dist/index.worker.e62ecca63f1a2e124230.worker.js.map +0 -1
- /package/dist/{19.css → 325.css} +0 -0
- /package/dist/{776.css → 41.css} +0 -0
- /package/dist/{579.css → 481.css} +0 -0
- /package/dist/{250.css → 544.css} +0 -0
- /package/dist/{221.css → 633.css} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[295],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 58295:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
// ESM COMPAT FLAG
|
|
@@ -13,16 +13,14 @@ __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__(11374);
|
|
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__(41766);
|
|
20
20
|
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
|
|
21
|
-
var es = __webpack_require__(
|
|
22
|
-
// EXTERNAL MODULE: ../../
|
|
23
|
-
var src = __webpack_require__(
|
|
24
|
-
// EXTERNAL MODULE: ../../ui/src/index.js + 486 modules
|
|
25
|
-
var ui_src = __webpack_require__(22582);
|
|
21
|
+
var es = __webpack_require__(80619);
|
|
22
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 785 modules
|
|
23
|
+
var src = __webpack_require__(5085);
|
|
26
24
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/initSEGToolGroup.ts
|
|
27
25
|
function createSEGToolGroupAndAddTools(ToolGroupService, customizationService, toolGroupId) {
|
|
28
26
|
const {
|
|
@@ -38,14 +36,13 @@ const RESPONSE = {
|
|
|
38
36
|
CANCEL: 0,
|
|
39
37
|
HYDRATE_SEG: 5
|
|
40
38
|
};
|
|
41
|
-
function promptHydrateSEG(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
} = _ref;
|
|
39
|
+
function promptHydrateSEG({
|
|
40
|
+
servicesManager,
|
|
41
|
+
segDisplaySet,
|
|
42
|
+
viewportId,
|
|
43
|
+
preHydrateCallbacks,
|
|
44
|
+
hydrateSEGDisplaySet
|
|
45
|
+
}) {
|
|
49
46
|
const {
|
|
50
47
|
uiViewportDialogService
|
|
51
48
|
} = servicesManager.services;
|
|
@@ -67,11 +64,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
|
|
|
67
64
|
return new Promise(function (resolve, reject) {
|
|
68
65
|
const message = 'Do you want to open this Segmentation?';
|
|
69
66
|
const actions = [{
|
|
70
|
-
type:
|
|
67
|
+
type: src/* ButtonEnums.type */.Ny.NW.secondary,
|
|
71
68
|
text: 'No',
|
|
72
69
|
value: RESPONSE.CANCEL
|
|
73
70
|
}, {
|
|
74
|
-
type:
|
|
71
|
+
type: src/* ButtonEnums.type */.Ny.NW.primary,
|
|
75
72
|
text: 'Yes',
|
|
76
73
|
value: RESPONSE.HYDRATE_SEG
|
|
77
74
|
}];
|
|
@@ -88,6 +85,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
|
|
|
88
85
|
onOutsideClick: () => {
|
|
89
86
|
uiViewportDialogService.hide();
|
|
90
87
|
resolve(RESPONSE.CANCEL);
|
|
88
|
+
},
|
|
89
|
+
onKeyPress: event => {
|
|
90
|
+
if (event.key === 'Enter') {
|
|
91
|
+
onSubmit(RESPONSE.HYDRATE_SEG);
|
|
92
|
+
}
|
|
91
93
|
}
|
|
92
94
|
});
|
|
93
95
|
});
|
|
@@ -97,44 +99,45 @@ function _askHydrate(uiViewportDialogService, viewportId) {
|
|
|
97
99
|
|
|
98
100
|
|
|
99
101
|
|
|
100
|
-
function _getStatusComponent(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
} = _ref;
|
|
102
|
+
function _getStatusComponent({
|
|
103
|
+
isHydrated,
|
|
104
|
+
onStatusClick
|
|
105
|
+
}) {
|
|
105
106
|
let ToolTipMessage = null;
|
|
106
107
|
let StatusIcon = null;
|
|
107
|
-
const {
|
|
108
|
-
t
|
|
109
|
-
} = (0,es/* useTranslation */.$G)('Common');
|
|
110
|
-
const loadStr = t('LOAD');
|
|
111
108
|
switch (isHydrated) {
|
|
112
109
|
case true:
|
|
113
|
-
StatusIcon = () => /*#__PURE__*/react.createElement(
|
|
110
|
+
StatusIcon = () => /*#__PURE__*/react.createElement(src/* Icon */.In, {
|
|
114
111
|
name: "status-alert"
|
|
115
112
|
});
|
|
116
113
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "This Segmentation is loaded in the segmentation panel");
|
|
117
114
|
break;
|
|
118
115
|
case false:
|
|
119
|
-
StatusIcon = () => /*#__PURE__*/react.createElement(
|
|
116
|
+
StatusIcon = () => /*#__PURE__*/react.createElement(src/* Icon */.In, {
|
|
120
117
|
className: "text-aqua-pale",
|
|
121
118
|
name: "status-untracked"
|
|
122
119
|
});
|
|
123
120
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "Click LOAD to load segmentation.");
|
|
124
121
|
}
|
|
125
|
-
const StatusArea = () =>
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
122
|
+
const StatusArea = () => {
|
|
123
|
+
const {
|
|
124
|
+
t
|
|
125
|
+
} = (0,es/* useTranslation */.Bd)('Common');
|
|
126
|
+
const loadStr = t('LOAD');
|
|
127
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
128
|
+
className: "flex h-6 cursor-default text-sm leading-6 text-white"
|
|
129
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
130
|
+
className: "bg-customgray-100 flex min-w-[45px] items-center rounded-l-xl rounded-r p-1"
|
|
131
|
+
}, /*#__PURE__*/react.createElement(StatusIcon, null), /*#__PURE__*/react.createElement("span", {
|
|
132
|
+
className: "ml-1"
|
|
133
|
+
}, "SEG")), !isHydrated && /*#__PURE__*/react.createElement("div", {
|
|
134
|
+
className: "bg-primary-main hover:bg-primary-light ml-1 cursor-pointer rounded px-1.5 hover:text-black"
|
|
135
|
+
// Using onMouseUp here because onClick is not working when the viewport is not active and is styled with pointer-events:none
|
|
136
|
+
,
|
|
137
|
+
onMouseUp: onStatusClick
|
|
138
|
+
}, loadStr));
|
|
139
|
+
};
|
|
140
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, ToolTipMessage && /*#__PURE__*/react.createElement(src/* Tooltip */.m_, {
|
|
138
141
|
content: /*#__PURE__*/react.createElement(ToolTipMessage, null),
|
|
139
142
|
position: "bottom-left"
|
|
140
143
|
}, /*#__PURE__*/react.createElement(StatusArea, null)), !ToolTipMessage && /*#__PURE__*/react.createElement(StatusArea, null));
|
|
@@ -148,31 +151,27 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
148
151
|
|
|
149
152
|
|
|
150
153
|
|
|
151
|
-
|
|
152
|
-
const {
|
|
153
|
-
formatDate
|
|
154
|
-
} = src.utils;
|
|
155
154
|
const SEG_TOOLGROUP_BASE_NAME = 'SEGToolGroup';
|
|
156
155
|
function OHIFCornerstoneSEGViewport(props) {
|
|
157
156
|
const {
|
|
158
157
|
children,
|
|
159
158
|
displaySets,
|
|
160
159
|
viewportOptions,
|
|
161
|
-
viewportLabel,
|
|
162
160
|
servicesManager,
|
|
163
161
|
extensionManager,
|
|
164
162
|
commandsManager
|
|
165
163
|
} = props;
|
|
166
164
|
const {
|
|
167
165
|
t
|
|
168
|
-
} = (0,es/* useTranslation
|
|
166
|
+
} = (0,es/* useTranslation */.Bd)('SEGViewport');
|
|
169
167
|
const viewportId = viewportOptions.viewportId;
|
|
170
168
|
const {
|
|
171
169
|
displaySetService,
|
|
172
170
|
toolGroupService,
|
|
173
171
|
segmentationService,
|
|
174
172
|
uiNotificationService,
|
|
175
|
-
customizationService
|
|
173
|
+
customizationService,
|
|
174
|
+
viewportActionCornersService
|
|
176
175
|
} = servicesManager.services;
|
|
177
176
|
const toolGroupId = `${SEG_TOOLGROUP_BASE_NAME}-${viewportId}`;
|
|
178
177
|
|
|
@@ -181,7 +180,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
181
180
|
throw new Error('SEG viewport should only have a single display set');
|
|
182
181
|
}
|
|
183
182
|
const segDisplaySet = displaySets[0];
|
|
184
|
-
const [viewportGrid, viewportGridService] = (0,
|
|
183
|
+
const [viewportGrid, viewportGridService] = (0,src/* useViewportGrid */.ih)();
|
|
185
184
|
|
|
186
185
|
// States
|
|
187
186
|
const [selectedSegment, setSelectedSegment] = (0,react.useState)(1);
|
|
@@ -224,10 +223,9 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
224
223
|
setElement(null);
|
|
225
224
|
};
|
|
226
225
|
const storePresentationState = (0,react.useCallback)(() => {
|
|
227
|
-
viewportGrid?.viewports.forEach(
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
} = _ref;
|
|
226
|
+
viewportGrid?.viewports.forEach(({
|
|
227
|
+
viewportId
|
|
228
|
+
}) => {
|
|
231
229
|
commandsManager.runCommand('storePresentation', {
|
|
232
230
|
viewportId
|
|
233
231
|
});
|
|
@@ -250,13 +248,14 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
250
248
|
orientation: viewportOptions.orientation,
|
|
251
249
|
viewportId: viewportOptions.viewportId
|
|
252
250
|
},
|
|
253
|
-
onElementEnabled:
|
|
251
|
+
onElementEnabled: evt => {
|
|
252
|
+
props.onElementEnabled?.(evt);
|
|
253
|
+
onElementEnabled(evt);
|
|
254
|
+
},
|
|
254
255
|
onElementDisabled: onElementDisabled
|
|
255
|
-
// initialImageIndex={initialImageIndex}
|
|
256
256
|
}));
|
|
257
257
|
}, [viewportId, segDisplaySet, toolGroupId]);
|
|
258
258
|
const onSegmentChange = (0,react.useCallback)(direction => {
|
|
259
|
-
direction = direction === 'left' ? -1 : 1;
|
|
260
259
|
const segmentationId = segDisplaySet.displaySetInstanceUID;
|
|
261
260
|
const segmentation = segmentationService.getSegmentation(segmentationId);
|
|
262
261
|
const {
|
|
@@ -298,13 +297,6 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
298
297
|
if (evt.segDisplaySet.displaySetInstanceUID === segDisplaySet.displaySetInstanceUID) {
|
|
299
298
|
setSegIsLoading(false);
|
|
300
299
|
}
|
|
301
|
-
if (evt.overlappingSegments) {
|
|
302
|
-
uiNotificationService.show({
|
|
303
|
-
title: 'Overlapping Segments',
|
|
304
|
-
message: 'Overlapping segments detected which is not currently supported',
|
|
305
|
-
type: 'warning'
|
|
306
|
-
});
|
|
307
|
-
}
|
|
308
300
|
});
|
|
309
301
|
return () => {
|
|
310
302
|
unsubscribe();
|
|
@@ -313,11 +305,10 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
313
305
|
(0,react.useEffect)(() => {
|
|
314
306
|
const {
|
|
315
307
|
unsubscribe
|
|
316
|
-
} = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE,
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
} = _ref2;
|
|
308
|
+
} = segmentationService.subscribe(segmentationService.EVENTS.SEGMENT_LOADING_COMPLETE, ({
|
|
309
|
+
percentComplete,
|
|
310
|
+
numSegments
|
|
311
|
+
}) => {
|
|
321
312
|
setProcessingProgress({
|
|
322
313
|
percentComplete,
|
|
323
314
|
totalSegments: numSegments
|
|
@@ -332,10 +323,9 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
332
323
|
Cleanup the SEG viewport when the viewport is destroyed
|
|
333
324
|
*/
|
|
334
325
|
(0,react.useEffect)(() => {
|
|
335
|
-
const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED,
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
} = _ref3;
|
|
326
|
+
const onDisplaySetsRemovedSubscription = displaySetService.subscribe(displaySetService.EVENTS.DISPLAY_SETS_REMOVED, ({
|
|
327
|
+
displaySetInstanceUIDs
|
|
328
|
+
}) => {
|
|
339
329
|
const activeViewport = viewports.get(activeViewportId);
|
|
340
330
|
if (displaySetInstanceUIDs.includes(activeViewport.displaySetInstanceUID)) {
|
|
341
331
|
viewportGridService.setDisplaySetsForViewport({
|
|
@@ -373,6 +363,51 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
373
363
|
referencedDisplaySetRef.current = null;
|
|
374
364
|
};
|
|
375
365
|
}, [segDisplaySet]);
|
|
366
|
+
const hydrateSEGDisplaySet = (0,react.useCallback)(({
|
|
367
|
+
segDisplaySet,
|
|
368
|
+
viewportId
|
|
369
|
+
}) => {
|
|
370
|
+
commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
|
371
|
+
displaySets: [segDisplaySet],
|
|
372
|
+
viewportId
|
|
373
|
+
});
|
|
374
|
+
}, [commandsManager]);
|
|
375
|
+
const onStatusClick = (0,react.useCallback)(async () => {
|
|
376
|
+
// Before hydrating a SEG and make it added to all viewports in the grid
|
|
377
|
+
// that share the same frameOfReferenceUID, we need to store the viewport grid
|
|
378
|
+
// presentation state, so that we can restore it after hydrating the SEG. This is
|
|
379
|
+
// required if the user has changed the viewport (other viewport than SEG viewport)
|
|
380
|
+
// presentation state (w/l and invert) and then opens the SEG. If we don't store
|
|
381
|
+
// the presentation state, the viewport will be reset to the default presentation
|
|
382
|
+
storePresentationState();
|
|
383
|
+
const isHydrated = await hydrateSEGDisplaySet({
|
|
384
|
+
segDisplaySet,
|
|
385
|
+
viewportId
|
|
386
|
+
});
|
|
387
|
+
setIsHydrated(isHydrated);
|
|
388
|
+
}, [hydrateSEGDisplaySet, segDisplaySet, storePresentationState, viewportId]);
|
|
389
|
+
(0,react.useEffect)(() => {
|
|
390
|
+
viewportActionCornersService.setComponents([{
|
|
391
|
+
viewportId,
|
|
392
|
+
id: 'viewportStatusComponent',
|
|
393
|
+
component: _getStatusComponent({
|
|
394
|
+
isHydrated,
|
|
395
|
+
onStatusClick
|
|
396
|
+
}),
|
|
397
|
+
indexPriority: -100,
|
|
398
|
+
location: viewportActionCornersService.LOCATIONS.topLeft
|
|
399
|
+
}, {
|
|
400
|
+
viewportId,
|
|
401
|
+
id: 'viewportActionArrowsComponent',
|
|
402
|
+
component: /*#__PURE__*/react.createElement(src/* ViewportActionArrows */.$I, {
|
|
403
|
+
key: "actionArrows",
|
|
404
|
+
onArrowsClick: onSegmentChange,
|
|
405
|
+
className: viewportId === activeViewportId ? 'visible' : 'invisible group-hover:visible'
|
|
406
|
+
}),
|
|
407
|
+
indexPriority: 0,
|
|
408
|
+
location: viewportActionCornersService.LOCATIONS.topRight
|
|
409
|
+
}]);
|
|
410
|
+
}, [activeViewportId, isHydrated, onSegmentChange, onStatusClick, viewportActionCornersService, viewportId]);
|
|
376
411
|
|
|
377
412
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
378
413
|
let childrenWithProps = null;
|
|
@@ -398,61 +433,9 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
398
433
|
SeriesDescription,
|
|
399
434
|
SpacingBetweenSlices
|
|
400
435
|
} = referencedDisplaySetRef.current.metadata;
|
|
401
|
-
|
|
402
|
-
let {
|
|
403
|
-
segDisplaySet,
|
|
404
|
-
viewportId
|
|
405
|
-
} = _ref4;
|
|
406
|
-
commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
|
407
|
-
displaySets: [segDisplaySet],
|
|
408
|
-
viewportId
|
|
409
|
-
});
|
|
410
|
-
};
|
|
411
|
-
const onStatusClick = async () => {
|
|
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({
|
|
420
|
-
segDisplaySet,
|
|
421
|
-
viewportId
|
|
422
|
-
});
|
|
423
|
-
setIsHydrated(isHydrated);
|
|
424
|
-
};
|
|
425
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ui_src/* ViewportActionBar */.uY, {
|
|
426
|
-
onDoubleClick: evt => {
|
|
427
|
-
evt.stopPropagation();
|
|
428
|
-
evt.preventDefault();
|
|
429
|
-
},
|
|
430
|
-
onArrowsClick: onSegmentChange,
|
|
431
|
-
getStatusComponent: () => {
|
|
432
|
-
return _getStatusComponent({
|
|
433
|
-
isHydrated,
|
|
434
|
-
onStatusClick
|
|
435
|
-
});
|
|
436
|
-
},
|
|
437
|
-
studyData: {
|
|
438
|
-
label: viewportLabel,
|
|
439
|
-
useAltStyling: true,
|
|
440
|
-
studyDate: formatDate(StudyDate),
|
|
441
|
-
seriesDescription: `SEG Viewport ${SeriesDescription}`,
|
|
442
|
-
patientInformation: {
|
|
443
|
-
patientName: PatientName ? src["default"].utils.formatPN(PatientName.Alphabetic) : '',
|
|
444
|
-
patientSex: PatientSex || '',
|
|
445
|
-
patientAge: PatientAge || '',
|
|
446
|
-
MRN: PatientID || '',
|
|
447
|
-
thickness: SliceThickness ? src.utils.roundNumber(SliceThickness, 2) : '',
|
|
448
|
-
thicknessUnits: SliceThickness !== undefined ? 'mm' : '',
|
|
449
|
-
spacing: SpacingBetweenSlices !== undefined ? src.utils.roundNumber(SpacingBetweenSlices, 2) : '',
|
|
450
|
-
scanner: ManufacturerModelName || ''
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
436
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
454
437
|
className: "relative flex h-full w-full flex-row overflow-hidden"
|
|
455
|
-
}, segIsLoading && /*#__PURE__*/react.createElement(
|
|
438
|
+
}, segIsLoading && /*#__PURE__*/react.createElement(src/* LoadingIndicatorTotalPercent */.pT, {
|
|
456
439
|
className: "h-full w-full",
|
|
457
440
|
totalNumbers: processingProgress.totalSegments,
|
|
458
441
|
percentComplete: processingProgress.percentComplete,
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[297],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 46297:
|
|
5
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__, {
|
|
9
9
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10
10
|
/* harmony export */ });
|
|
11
|
-
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
12
|
-
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
11
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(41766);
|
|
12
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11374);
|
|
13
13
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
function OHIFCornerstonePdfViewport(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} = _ref;
|
|
16
|
+
function OHIFCornerstonePdfViewport({
|
|
17
|
+
displaySets
|
|
18
|
+
}) {
|
|
20
19
|
const [url, setUrl] = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(null);
|
|
21
20
|
if (displaySets && displaySets.length > 1) {
|
|
22
21
|
throw new Error('OHIFCornerstonePdfViewport: only one display set is supported for dicom pdf right now');
|