@ohif/app 3.8.0-beta.65 → 3.8.0-beta.67
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/{121.bundle.fda405f29003c308ce09.js → 121.bundle.d8b3c6b530d6151f251d.js} +52 -75
- package/dist/{155.bundle.a57744809d0f46030ee0.js → 155.bundle.a2b8640977007e407d30.js} +7 -16
- package/dist/{188.bundle.c448aed48915741e9f97.js → 188.bundle.b6a7e833fdf99cee3ee6.js} +2 -2
- package/dist/{191.bundle.4850ab82949bb6f0eb73.js → 191.bundle.7d89c921abefd1140d50.js} +29 -8
- package/dist/{295.bundle.57700cd41fd87e1521b4.js → 295.bundle.075944a082306d2e432f.js} +75 -86
- package/dist/{41.bundle.58b85dd990fb6fac615e.js → 41.bundle.1c504116ebea23b157f6.js} +10 -50
- package/dist/{448.bundle.d195aba3aef25ec286d1.js → 448.bundle.f284c88c8780233e06b1.js} +7 -15
- package/dist/494.bundle.ffd75704a069c0720596.js +2565 -0
- package/dist/{530.bundle.72d9812f117036615a38.js → 530.bundle.aaf1c61342805ff32648.js} +41 -67
- package/dist/{544.bundle.c3009e245ceb1554c70a.js → 544.bundle.33ed8e4a3eaf16b55af7.js} +4 -4
- package/dist/{559.bundle.05bd51e94422a2cab116.js → 559.bundle.601f9e285f6b3b4d1ac5.js} +4 -4
- package/dist/{889.bundle.ffc727aa6d1a74f2138d.js → 574.bundle.c79d3fa0066f39b76442.js} +1005 -49
- package/dist/{594.bundle.14b122ab995e4b13e652.js → 594.bundle.49d072fb31c8994ae85f.js} +4 -4
- package/dist/{701.bundle.bc40f1a7d5d6b1a4dd38.js → 595.bundle.7a41a0998ab07dfa0212.js} +958 -66
- package/dist/{638.bundle.a63003e18bed65f227bb.js → 638.bundle.4c2972aa5a19f816d94a.js} +4 -4
- package/dist/{699.bundle.efc67171e6d212f25a24.js → 699.bundle.43997eacac9490c1751c.js} +7 -21
- package/dist/{724.bundle.3945f8d2e9c8b0b23628.js → 724.bundle.00e619f0960de50c8e19.js} +22 -57
- package/dist/{862.bundle.d787dac01f4567560a42.js → 862.bundle.1f1613561a4d6059a8aa.js} +64 -83
- package/dist/{270.bundle.16ac8114c5c4ce006f4a.js → 889.bundle.2daaac42e278b28b3d01.js} +5 -5
- package/dist/{90.bundle.abde898ebd3c74f521f9.js → 90.bundle.ce42cccceaec1135a165.js} +39 -34
- package/dist/{905.bundle.6b5b42b2403e4676bb3a.js → 905.bundle.af59bd2bcb04c4978059.js} +2 -2
- package/dist/{907.bundle.fbd5768fa5b53f9d3f86.js → 907.bundle.401a07f50863efc6c6c1.js} +2 -2
- package/dist/{961.bundle.8bb5a713fc5a3817c6a6.js → 961.bundle.fdf0e1c0c54cfb2a952a.js} +2 -2
- package/dist/{987.bundle.91d4867efedd5b4d84cb.js → 987.bundle.6bdfb3cd8762b8889632.js} +27 -7
- package/dist/{app.bundle.0c24b249dc8b631916ef.js → app.bundle.aadaff7af8cd415a1eae.js} +1818 -644
- package/dist/app.bundle.css +6 -4
- 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/index.html +1 -1
- package/dist/{polySeg.bundle.c1cec6312eb6c6dc3701.js → polySeg.bundle.e7b4c29fb9173e8567b8.js} +1 -1
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- package/dist/339.bundle.57dac3644803cefe3e3d.js +0 -2591
- /package/dist/{164.bundle.ff12d6019a627cda2a6c.js → 164.bundle.ce3d1cd75bd8e13791d7.js} +0 -0
- /package/dist/{290.bundle.8b4d7dfbc7cfe418a0f1.js → 290.bundle.952de53057f98e2c5ef0.js} +0 -0
- /package/dist/{342.bundle.a039c24e9f661f3b884d.js → 342.bundle.6e49f63ea7cea4645c0a.js} +0 -0
- /package/dist/{504.bundle.aa165082e2acc5ccf080.js → 504.bundle.993d7e2dec36257d4ce4.js} +0 -0
- /package/dist/{889.css → 574.css} +0 -0
- /package/dist/{701.css → 595.css} +0 -0
|
@@ -17,10 +17,8 @@ var react = __webpack_require__(41766);
|
|
|
17
17
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
18
18
|
var prop_types = __webpack_require__(11374);
|
|
19
19
|
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
20
|
-
// EXTERNAL MODULE: ../../
|
|
21
|
-
var src = __webpack_require__(
|
|
22
|
-
// EXTERNAL MODULE: ../../ui/src/index.js + 497 modules
|
|
23
|
-
var ui_src = __webpack_require__(58046);
|
|
20
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 519 modules
|
|
21
|
+
var src = __webpack_require__(3962);
|
|
24
22
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/utils/promptHydrateRT.ts
|
|
25
23
|
|
|
26
24
|
const RESPONSE = {
|
|
@@ -59,11 +57,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
|
|
|
59
57
|
return new Promise(function (resolve, reject) {
|
|
60
58
|
const message = 'Do you want to open this Segmentation?';
|
|
61
59
|
const actions = [{
|
|
62
|
-
type:
|
|
60
|
+
type: src/* ButtonEnums.type */.Ny.NW.secondary,
|
|
63
61
|
text: 'No',
|
|
64
62
|
value: RESPONSE.CANCEL
|
|
65
63
|
}, {
|
|
66
|
-
type:
|
|
64
|
+
type: src/* ButtonEnums.type */.Ny.NW.primary,
|
|
67
65
|
text: 'Yes',
|
|
68
66
|
value: RESPONSE.HYDRATE_SEG
|
|
69
67
|
}];
|
|
@@ -97,37 +95,39 @@ function _getStatusComponent({
|
|
|
97
95
|
}) {
|
|
98
96
|
let ToolTipMessage = null;
|
|
99
97
|
let StatusIcon = null;
|
|
100
|
-
const {
|
|
101
|
-
t
|
|
102
|
-
} = (0,es/* useTranslation */.Bd)('Common');
|
|
103
|
-
const loadStr = t('LOAD');
|
|
104
98
|
switch (isHydrated) {
|
|
105
99
|
case true:
|
|
106
|
-
StatusIcon = () => /*#__PURE__*/react.createElement(
|
|
100
|
+
StatusIcon = () => /*#__PURE__*/react.createElement(src/* Icon */.In, {
|
|
107
101
|
name: "status-alert"
|
|
108
102
|
});
|
|
109
103
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "This Segmentation is loaded in the segmentation panel");
|
|
110
104
|
break;
|
|
111
105
|
case false:
|
|
112
|
-
StatusIcon = () => /*#__PURE__*/react.createElement(
|
|
106
|
+
StatusIcon = () => /*#__PURE__*/react.createElement(src/* Icon */.In, {
|
|
113
107
|
className: "text-aqua-pale",
|
|
114
108
|
name: "status-untracked"
|
|
115
109
|
});
|
|
116
110
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "Click LOAD to load RTSTRUCT.");
|
|
117
111
|
}
|
|
118
|
-
const StatusArea = () =>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
112
|
+
const StatusArea = () => {
|
|
113
|
+
const {
|
|
114
|
+
t
|
|
115
|
+
} = (0,es/* useTranslation */.Bd)('Common');
|
|
116
|
+
const loadStr = t('LOAD');
|
|
117
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
118
|
+
className: "flex h-6 cursor-default text-sm leading-6 text-white"
|
|
119
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
120
|
+
className: "bg-customgray-100 flex min-w-[45px] items-center rounded-l-xl rounded-r p-1"
|
|
121
|
+
}, /*#__PURE__*/react.createElement(StatusIcon, null), /*#__PURE__*/react.createElement("span", {
|
|
122
|
+
className: "ml-1"
|
|
123
|
+
}, "RTSTRUCT")), !isHydrated && /*#__PURE__*/react.createElement("div", {
|
|
124
|
+
className: "bg-primary-main hover:bg-primary-light ml-1 cursor-pointer rounded px-1.5 hover:text-black"
|
|
125
|
+
// Using onMouseUp here because onClick is not working when the viewport is not active and is styled with pointer-events:none
|
|
126
|
+
,
|
|
127
|
+
onMouseUp: onStatusClick
|
|
128
|
+
}, loadStr));
|
|
129
|
+
};
|
|
130
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, ToolTipMessage && /*#__PURE__*/react.createElement(src/* Tooltip */.m_, {
|
|
131
131
|
content: /*#__PURE__*/react.createElement(ToolTipMessage, null),
|
|
132
132
|
position: "bottom-left"
|
|
133
133
|
}, /*#__PURE__*/react.createElement(StatusArea, null)), !ToolTipMessage && /*#__PURE__*/react.createElement(StatusArea, null));
|
|
@@ -148,17 +148,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
|
|
151
|
-
|
|
152
|
-
const {
|
|
153
|
-
formatDate
|
|
154
|
-
} = src.utils;
|
|
155
151
|
const RT_TOOLGROUP_BASE_NAME = 'RTToolGroup';
|
|
156
152
|
function OHIFCornerstoneRTViewport(props) {
|
|
157
153
|
const {
|
|
158
154
|
children,
|
|
159
155
|
displaySets,
|
|
160
156
|
viewportOptions,
|
|
161
|
-
viewportLabel,
|
|
162
157
|
servicesManager,
|
|
163
158
|
extensionManager,
|
|
164
159
|
commandsManager
|
|
@@ -168,7 +163,8 @@ function OHIFCornerstoneRTViewport(props) {
|
|
|
168
163
|
toolGroupService,
|
|
169
164
|
segmentationService,
|
|
170
165
|
uiNotificationService,
|
|
171
|
-
customizationService
|
|
166
|
+
customizationService,
|
|
167
|
+
viewportActionCornersService
|
|
172
168
|
} = servicesManager.services;
|
|
173
169
|
const viewportId = viewportOptions.viewportId;
|
|
174
170
|
const toolGroupId = `${RT_TOOLGROUP_BASE_NAME}-${viewportId}`;
|
|
@@ -178,7 +174,7 @@ function OHIFCornerstoneRTViewport(props) {
|
|
|
178
174
|
throw new Error('RT viewport should only have a single display set');
|
|
179
175
|
}
|
|
180
176
|
const rtDisplaySet = displaySets[0];
|
|
181
|
-
const [viewportGrid, viewportGridService] = (0,
|
|
177
|
+
const [viewportGrid, viewportGridService] = (0,src/* useViewportGrid */.ih)();
|
|
182
178
|
|
|
183
179
|
// States
|
|
184
180
|
const [isToolGroupCreated, setToolGroupCreated] = (0,react.useState)(false);
|
|
@@ -261,7 +257,6 @@ function OHIFCornerstoneRTViewport(props) {
|
|
|
261
257
|
}));
|
|
262
258
|
}, [viewportId, rtDisplaySet, toolGroupId]);
|
|
263
259
|
const onSegmentChange = (0,react.useCallback)(direction => {
|
|
264
|
-
direction = direction === 'left' ? -1 : 1;
|
|
265
260
|
const segmentationId = rtDisplaySet.displaySetInstanceUID;
|
|
266
261
|
const segmentation = segmentationService.getSegmentation(segmentationId);
|
|
267
262
|
const {
|
|
@@ -387,19 +382,7 @@ function OHIFCornerstoneRTViewport(props) {
|
|
|
387
382
|
});
|
|
388
383
|
});
|
|
389
384
|
}
|
|
390
|
-
const {
|
|
391
|
-
PatientID,
|
|
392
|
-
PatientName,
|
|
393
|
-
PatientSex,
|
|
394
|
-
PatientAge,
|
|
395
|
-
SliceThickness,
|
|
396
|
-
ManufacturerModelName,
|
|
397
|
-
StudyDate,
|
|
398
|
-
SeriesDescription,
|
|
399
|
-
SpacingBetweenSlices,
|
|
400
|
-
SeriesNumber
|
|
401
|
-
} = referencedDisplaySetRef.current.metadata;
|
|
402
|
-
const onStatusClick = async () => {
|
|
385
|
+
const onStatusClick = (0,react.useCallback)(async () => {
|
|
403
386
|
// Before hydrating a RT and make it added to all viewports in the grid
|
|
404
387
|
// that share the same frameOfReferenceUID, we need to store the viewport grid
|
|
405
388
|
// presentation state, so that we can restore it after hydrating the RT. This is
|
|
@@ -412,38 +395,32 @@ function OHIFCornerstoneRTViewport(props) {
|
|
|
412
395
|
viewportId
|
|
413
396
|
});
|
|
414
397
|
setIsHydrated(isHydrated);
|
|
415
|
-
};
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
onArrowsClick: onSegmentChange,
|
|
422
|
-
getStatusComponent: () => {
|
|
423
|
-
return _getStatusComponent({
|
|
398
|
+
}, [hydrateRTDisplaySet, rtDisplaySet, storePresentationState, viewportId]);
|
|
399
|
+
(0,react.useEffect)(() => {
|
|
400
|
+
viewportActionCornersService.setComponents([{
|
|
401
|
+
viewportId,
|
|
402
|
+
id: 'viewportStatusComponent',
|
|
403
|
+
component: _getStatusComponent({
|
|
424
404
|
isHydrated,
|
|
425
405
|
onStatusClick
|
|
426
|
-
})
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
406
|
+
}),
|
|
407
|
+
indexPriority: -100,
|
|
408
|
+
location: viewportActionCornersService.LOCATIONS.topLeft
|
|
409
|
+
}, {
|
|
410
|
+
viewportId,
|
|
411
|
+
id: 'viewportActionArrowsComponent',
|
|
412
|
+
component: /*#__PURE__*/react.createElement(src/* ViewportActionArrows */.$I, {
|
|
413
|
+
key: "actionArrows",
|
|
414
|
+
onArrowsClick: onSegmentChange,
|
|
415
|
+
className: viewportId === activeViewportId ? 'visible' : 'invisible group-hover:visible'
|
|
416
|
+
}),
|
|
417
|
+
indexPriority: 0,
|
|
418
|
+
location: viewportActionCornersService.LOCATIONS.topRight
|
|
419
|
+
}]);
|
|
420
|
+
}, [activeViewportId, isHydrated, onSegmentChange, onStatusClick, viewportActionCornersService, viewportId]);
|
|
421
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
445
422
|
className: "relative flex h-full w-full flex-row overflow-hidden"
|
|
446
|
-
}, rtIsLoading && /*#__PURE__*/react.createElement(
|
|
423
|
+
}, rtIsLoading && /*#__PURE__*/react.createElement(src/* LoadingIndicatorTotalPercent */.pT, {
|
|
447
424
|
className: "h-full w-full",
|
|
448
425
|
totalNumbers: processingProgress.totalSegments,
|
|
449
426
|
percentComplete: processingProgress.percentComplete,
|
|
@@ -20,8 +20,8 @@ var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
|
20
20
|
var es = __webpack_require__(57593);
|
|
21
21
|
// EXTERNAL MODULE: ../../../node_modules/@xstate/react/es/index.js + 8 modules
|
|
22
22
|
var react_es = __webpack_require__(6835);
|
|
23
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
24
|
-
var src = __webpack_require__(
|
|
23
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 519 modules
|
|
24
|
+
var src = __webpack_require__(3962);
|
|
25
25
|
;// CONCATENATED MODULE: ../../../extensions/measurement-tracking/src/contexts/TrackedMeasurementsContext/measurementTrackingMachine.js
|
|
26
26
|
|
|
27
27
|
const RESPONSE = {
|
|
@@ -1102,10 +1102,10 @@ var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
|
1102
1102
|
var dist = __webpack_require__(37396);
|
|
1103
1103
|
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
|
|
1104
1104
|
var es = __webpack_require__(80619);
|
|
1105
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
1106
|
-
var src = __webpack_require__(
|
|
1107
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
1108
|
-
var ui_src = __webpack_require__(
|
|
1105
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 68 modules
|
|
1106
|
+
var src = __webpack_require__(85073);
|
|
1107
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 519 modules
|
|
1108
|
+
var ui_src = __webpack_require__(3962);
|
|
1109
1109
|
;// CONCATENATED MODULE: ../../../extensions/measurement-tracking/src/panels/PanelStudyBrowserTracking/PanelStudyBrowserTracking.tsx
|
|
1110
1110
|
|
|
1111
1111
|
|
|
@@ -1429,14 +1429,6 @@ viewportGridService, dataSource, displaySetService, uiDialogService, uiNotificat
|
|
|
1429
1429
|
const imageSrc = thumbnailImageSrcMap[ds.displaySetInstanceUID];
|
|
1430
1430
|
const componentType = _getComponentType(ds);
|
|
1431
1431
|
const numPanes = viewportGridService.getNumViewportPanes();
|
|
1432
|
-
const viewportIdentificator = [];
|
|
1433
|
-
if (numPanes !== 1) {
|
|
1434
|
-
viewports.forEach(viewportData => {
|
|
1435
|
-
if (viewportData?.displaySetInstanceUIDs?.includes(ds.displaySetInstanceUID)) {
|
|
1436
|
-
viewportIdentificator.push(viewportData.viewportLabel);
|
|
1437
|
-
}
|
|
1438
|
-
});
|
|
1439
|
-
}
|
|
1440
1432
|
const array = componentType === 'thumbnailTracked' ? thumbnailDisplaySets : thumbnailNoImageDisplaySets;
|
|
1441
1433
|
const {
|
|
1442
1434
|
displaySetInstanceUID
|
|
@@ -1459,8 +1451,7 @@ viewportGridService, dataSource, displaySetService, uiDialogService, uiNotificat
|
|
|
1459
1451
|
// .. Any other data to pass
|
|
1460
1452
|
},
|
|
1461
1453
|
isTracked: trackedSeriesInstanceUIDs.includes(ds.SeriesInstanceUID),
|
|
1462
|
-
isHydratedForDerivedDisplaySet: ds.isHydrated
|
|
1463
|
-
viewportIdentificator
|
|
1454
|
+
isHydratedForDerivedDisplaySet: ds.isHydrated
|
|
1464
1455
|
};
|
|
1465
1456
|
if (componentType === 'thumbnailNoImage') {
|
|
1466
1457
|
if (dataSource.reject && dataSource.reject.series) {
|
|
@@ -22,8 +22,8 @@ const SOPClassHandlerId = `${id}.sopClassHandlerModule.${SOPClassHandlerName}`;
|
|
|
22
22
|
|
|
23
23
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
24
24
|
var react = __webpack_require__(41766);
|
|
25
|
-
// EXTERNAL MODULE: ../../core/src/index.ts +
|
|
26
|
-
var src = __webpack_require__(
|
|
25
|
+
// EXTERNAL MODULE: ../../core/src/index.ts + 68 modules
|
|
26
|
+
var src = __webpack_require__(85073);
|
|
27
27
|
// EXTERNAL MODULE: ../../../node_modules/dcmjs/build/dcmjs.es.js
|
|
28
28
|
var dcmjs_es = __webpack_require__(31426);
|
|
29
29
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-rt/src/loadRTStruct.js
|
|
@@ -9784,6 +9784,26 @@ class TrackballRotateTool extends base/* BaseTool */.oS {
|
|
|
9784
9784
|
},
|
|
9785
9785
|
}) {
|
|
9786
9786
|
super(toolProps, defaultToolProps);
|
|
9787
|
+
this.preMouseDownCallback = (evt) => {
|
|
9788
|
+
const eventDetail = evt.detail;
|
|
9789
|
+
const { element } = eventDetail;
|
|
9790
|
+
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
9791
|
+
const { viewport } = enabledElement;
|
|
9792
|
+
const actorEntry = viewport.getDefaultActor();
|
|
9793
|
+
const actor = actorEntry.actor;
|
|
9794
|
+
const mapper = actor.getMapper();
|
|
9795
|
+
const originalSampleDistance = mapper.getSampleDistance();
|
|
9796
|
+
mapper.setSampleDistance(originalSampleDistance * 2);
|
|
9797
|
+
if (this.cleanUp !== null) {
|
|
9798
|
+
element.removeEventListener('mouseup', this.cleanUp);
|
|
9799
|
+
}
|
|
9800
|
+
this.cleanUp = () => {
|
|
9801
|
+
mapper.setSampleDistance(originalSampleDistance);
|
|
9802
|
+
viewport.render();
|
|
9803
|
+
};
|
|
9804
|
+
element.addEventListener('mouseup', this.cleanUp, { once: true });
|
|
9805
|
+
return true;
|
|
9806
|
+
};
|
|
9787
9807
|
this.rotateCamera = (viewport, centerWorld, axis, angle) => {
|
|
9788
9808
|
const vtkCamera = viewport.getVtkActiveCamera();
|
|
9789
9809
|
const viewUp = vtkCamera.getViewUp();
|
|
@@ -24581,7 +24601,6 @@ function getToolStateByViewportId(viewportId) {
|
|
|
24581
24601
|
const { ViewportStatus } = esm.Enums;
|
|
24582
24602
|
const { triggerEvent } = esm.utilities;
|
|
24583
24603
|
const debounced = true;
|
|
24584
|
-
const loop = true;
|
|
24585
24604
|
const dynamicVolumesPlayingMap = new Map();
|
|
24586
24605
|
function playClip(element, playClipOptions) {
|
|
24587
24606
|
let playClipTimeouts;
|
|
@@ -24642,7 +24661,7 @@ function playClip(element, playClipOptions) {
|
|
|
24642
24661
|
const { numScrollSteps, currentStepIndex } = playClipContext;
|
|
24643
24662
|
let newStepIndex = currentStepIndex + (playClipData.reverse ? -1 : 1);
|
|
24644
24663
|
const newStepIndexOutOfRange = newStepIndex < 0 || newStepIndex >= numScrollSteps;
|
|
24645
|
-
if (!loop && newStepIndexOutOfRange) {
|
|
24664
|
+
if (!playClipData.loop && newStepIndexOutOfRange) {
|
|
24646
24665
|
_stopClip(element, {
|
|
24647
24666
|
stopDynamicCine: !isDynamicCinePlaying,
|
|
24648
24667
|
viewportId: viewport.id,
|
|
@@ -28270,6 +28289,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28270
28289
|
floodFill: () => (/* reexport */ floodFill/* default */.A),
|
|
28271
28290
|
getBrushSizeForToolGroup: () => (/* reexport */ getBrushSizeForToolGroup),
|
|
28272
28291
|
getBrushThresholdForToolGroup: () => (/* reexport */ getBrushThresholdForToolGroup),
|
|
28292
|
+
getBrushToolInstances: () => (/* reexport */ segmentation_utilities/* getBrushToolInstances */.n7),
|
|
28273
28293
|
getDefaultRepresentationConfig: () => (/* reexport */ getDefaultRepresentationConfig),
|
|
28274
28294
|
getHoveredContourSegmentationAnnotation: () => (/* reexport */ getHoveredContourSegmentationAnnotation),
|
|
28275
28295
|
getSegmentAtLabelmapBorder: () => (/* reexport */ getSegmentAtLabelmapBorder),
|
|
@@ -28522,7 +28542,7 @@ function setBrushSizeForToolGroup(toolGroupId, brushSize, toolName) {
|
|
|
28522
28542
|
if (toolGroup === undefined) {
|
|
28523
28543
|
return;
|
|
28524
28544
|
}
|
|
28525
|
-
const brushBasedToolInstances = (0,segmentation_utilities/*
|
|
28545
|
+
const brushBasedToolInstances = (0,segmentation_utilities/* getBrushToolInstances */.n7)(toolGroupId, toolName);
|
|
28526
28546
|
brushBasedToolInstances.forEach((tool) => {
|
|
28527
28547
|
tool.configuration.brushSize = brushSize;
|
|
28528
28548
|
tool.invalidateBrushCursor();
|
|
@@ -28546,7 +28566,7 @@ function getBrushSizeForToolGroup(toolGroupId, toolName) {
|
|
|
28546
28566
|
if (!Object.keys(toolInstances).length) {
|
|
28547
28567
|
return;
|
|
28548
28568
|
}
|
|
28549
|
-
const brushBasedToolInstances = (0,segmentation_utilities/*
|
|
28569
|
+
const brushBasedToolInstances = (0,segmentation_utilities/* getBrushToolInstances */.n7)(toolGroupId, toolName);
|
|
28550
28570
|
const brushToolInstance = brushBasedToolInstances[0];
|
|
28551
28571
|
if (!brushToolInstance) {
|
|
28552
28572
|
return;
|
|
@@ -28564,7 +28584,7 @@ function setBrushThresholdForToolGroup(toolGroupId, threshold, otherArgs = { isD
|
|
|
28564
28584
|
if (toolGroup === undefined) {
|
|
28565
28585
|
return;
|
|
28566
28586
|
}
|
|
28567
|
-
const brushBasedToolInstances = (0,segmentation_utilities/*
|
|
28587
|
+
const brushBasedToolInstances = (0,segmentation_utilities/* getBrushToolInstances */.n7)(toolGroupId);
|
|
28568
28588
|
const configuration = {
|
|
28569
28589
|
...otherArgs,
|
|
28570
28590
|
...(threshold !== undefined && { threshold }),
|
|
@@ -28593,7 +28613,7 @@ function getBrushThresholdForToolGroup(toolGroupId) {
|
|
|
28593
28613
|
if (!Object.keys(toolInstances).length) {
|
|
28594
28614
|
return;
|
|
28595
28615
|
}
|
|
28596
|
-
const brushBasedToolInstances = (0,segmentation_utilities/*
|
|
28616
|
+
const brushBasedToolInstances = (0,segmentation_utilities/* getBrushToolInstances */.n7)(toolGroupId);
|
|
28597
28617
|
const brushToolInstance = brushBasedToolInstances[0];
|
|
28598
28618
|
if (!brushToolInstance) {
|
|
28599
28619
|
return;
|
|
@@ -28992,7 +29012,7 @@ function invalidateBrushCursor(toolGroupId) {
|
|
|
28992
29012
|
if (toolGroup === undefined) {
|
|
28993
29013
|
return;
|
|
28994
29014
|
}
|
|
28995
|
-
const brushBasedToolInstances = (0,segmentation_utilities/*
|
|
29015
|
+
const brushBasedToolInstances = (0,segmentation_utilities/* getBrushToolInstances */.n7)(toolGroupId);
|
|
28996
29016
|
brushBasedToolInstances.forEach((tool) => {
|
|
28997
29017
|
tool.invalidateBrushCursor();
|
|
28998
29018
|
});
|
|
@@ -29208,6 +29228,7 @@ function getHoveredContourSegmentationAnnotation(segmentationId) {
|
|
|
29208
29228
|
|
|
29209
29229
|
|
|
29210
29230
|
|
|
29231
|
+
|
|
29211
29232
|
|
|
29212
29233
|
|
|
29213
29234
|
/***/ }),
|
|
@@ -29340,8 +29361,8 @@ function triggerSegmentationRender(toolGroupId) {
|
|
|
29340
29361
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
29341
29362
|
|
|
29342
29363
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29343
|
-
/* harmony export */ Ay: () => (/* binding */ getBrushToolInstances),
|
|
29344
29364
|
/* harmony export */ Q5: () => (/* binding */ getVoxelOverlap),
|
|
29365
|
+
/* harmony export */ n7: () => (/* binding */ getBrushToolInstances),
|
|
29345
29366
|
/* harmony export */ zf: () => (/* binding */ processVolumes)
|
|
29346
29367
|
/* harmony export */ });
|
|
29347
29368
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50719);
|
|
@@ -19,10 +19,8 @@ var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
|
19
19
|
var react = __webpack_require__(41766);
|
|
20
20
|
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
|
|
21
21
|
var es = __webpack_require__(80619);
|
|
22
|
-
// EXTERNAL MODULE: ../../
|
|
23
|
-
var src = __webpack_require__(
|
|
24
|
-
// EXTERNAL MODULE: ../../ui/src/index.js + 497 modules
|
|
25
|
-
var ui_src = __webpack_require__(58046);
|
|
22
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 519 modules
|
|
23
|
+
var src = __webpack_require__(3962);
|
|
26
24
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone-dicom-seg/src/utils/initSEGToolGroup.ts
|
|
27
25
|
function createSEGToolGroupAndAddTools(ToolGroupService, customizationService, toolGroupId) {
|
|
28
26
|
const {
|
|
@@ -66,11 +64,11 @@ function _askHydrate(uiViewportDialogService, viewportId) {
|
|
|
66
64
|
return new Promise(function (resolve, reject) {
|
|
67
65
|
const message = 'Do you want to open this Segmentation?';
|
|
68
66
|
const actions = [{
|
|
69
|
-
type:
|
|
67
|
+
type: src/* ButtonEnums.type */.Ny.NW.secondary,
|
|
70
68
|
text: 'No',
|
|
71
69
|
value: RESPONSE.CANCEL
|
|
72
70
|
}, {
|
|
73
|
-
type:
|
|
71
|
+
type: src/* ButtonEnums.type */.Ny.NW.primary,
|
|
74
72
|
text: 'Yes',
|
|
75
73
|
value: RESPONSE.HYDRATE_SEG
|
|
76
74
|
}];
|
|
@@ -102,37 +100,39 @@ function _getStatusComponent({
|
|
|
102
100
|
}) {
|
|
103
101
|
let ToolTipMessage = null;
|
|
104
102
|
let StatusIcon = null;
|
|
105
|
-
const {
|
|
106
|
-
t
|
|
107
|
-
} = (0,es/* useTranslation */.Bd)('Common');
|
|
108
|
-
const loadStr = t('LOAD');
|
|
109
103
|
switch (isHydrated) {
|
|
110
104
|
case true:
|
|
111
|
-
StatusIcon = () => /*#__PURE__*/react.createElement(
|
|
105
|
+
StatusIcon = () => /*#__PURE__*/react.createElement(src/* Icon */.In, {
|
|
112
106
|
name: "status-alert"
|
|
113
107
|
});
|
|
114
108
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "This Segmentation is loaded in the segmentation panel");
|
|
115
109
|
break;
|
|
116
110
|
case false:
|
|
117
|
-
StatusIcon = () => /*#__PURE__*/react.createElement(
|
|
111
|
+
StatusIcon = () => /*#__PURE__*/react.createElement(src/* Icon */.In, {
|
|
118
112
|
className: "text-aqua-pale",
|
|
119
113
|
name: "status-untracked"
|
|
120
114
|
});
|
|
121
115
|
ToolTipMessage = () => /*#__PURE__*/react.createElement("div", null, "Click LOAD to load segmentation.");
|
|
122
116
|
}
|
|
123
|
-
const StatusArea = () =>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
,
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
117
|
+
const StatusArea = () => {
|
|
118
|
+
const {
|
|
119
|
+
t
|
|
120
|
+
} = (0,es/* useTranslation */.Bd)('Common');
|
|
121
|
+
const loadStr = t('LOAD');
|
|
122
|
+
return /*#__PURE__*/react.createElement("div", {
|
|
123
|
+
className: "flex h-6 cursor-default text-sm leading-6 text-white"
|
|
124
|
+
}, /*#__PURE__*/react.createElement("div", {
|
|
125
|
+
className: "bg-customgray-100 flex min-w-[45px] items-center rounded-l-xl rounded-r p-1"
|
|
126
|
+
}, /*#__PURE__*/react.createElement(StatusIcon, null), /*#__PURE__*/react.createElement("span", {
|
|
127
|
+
className: "ml-1"
|
|
128
|
+
}, "SEG")), !isHydrated && /*#__PURE__*/react.createElement("div", {
|
|
129
|
+
className: "bg-primary-main hover:bg-primary-light ml-1 cursor-pointer rounded px-1.5 hover:text-black"
|
|
130
|
+
// Using onMouseUp here because onClick is not working when the viewport is not active and is styled with pointer-events:none
|
|
131
|
+
,
|
|
132
|
+
onMouseUp: onStatusClick
|
|
133
|
+
}, loadStr));
|
|
134
|
+
};
|
|
135
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, ToolTipMessage && /*#__PURE__*/react.createElement(src/* Tooltip */.m_, {
|
|
136
136
|
content: /*#__PURE__*/react.createElement(ToolTipMessage, null),
|
|
137
137
|
position: "bottom-left"
|
|
138
138
|
}, /*#__PURE__*/react.createElement(StatusArea, null)), !ToolTipMessage && /*#__PURE__*/react.createElement(StatusArea, null));
|
|
@@ -146,17 +146,12 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
const {
|
|
151
|
-
formatDate
|
|
152
|
-
} = src.utils;
|
|
153
149
|
const SEG_TOOLGROUP_BASE_NAME = 'SEGToolGroup';
|
|
154
150
|
function OHIFCornerstoneSEGViewport(props) {
|
|
155
151
|
const {
|
|
156
152
|
children,
|
|
157
153
|
displaySets,
|
|
158
154
|
viewportOptions,
|
|
159
|
-
viewportLabel,
|
|
160
155
|
servicesManager,
|
|
161
156
|
extensionManager,
|
|
162
157
|
commandsManager
|
|
@@ -170,7 +165,8 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
170
165
|
toolGroupService,
|
|
171
166
|
segmentationService,
|
|
172
167
|
uiNotificationService,
|
|
173
|
-
customizationService
|
|
168
|
+
customizationService,
|
|
169
|
+
viewportActionCornersService
|
|
174
170
|
} = servicesManager.services;
|
|
175
171
|
const toolGroupId = `${SEG_TOOLGROUP_BASE_NAME}-${viewportId}`;
|
|
176
172
|
|
|
@@ -179,7 +175,7 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
179
175
|
throw new Error('SEG viewport should only have a single display set');
|
|
180
176
|
}
|
|
181
177
|
const segDisplaySet = displaySets[0];
|
|
182
|
-
const [viewportGrid, viewportGridService] = (0,
|
|
178
|
+
const [viewportGrid, viewportGridService] = (0,src/* useViewportGrid */.ih)();
|
|
183
179
|
|
|
184
180
|
// States
|
|
185
181
|
const [selectedSegment, setSelectedSegment] = (0,react.useState)(1);
|
|
@@ -252,7 +248,6 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
252
248
|
}));
|
|
253
249
|
}, [viewportId, segDisplaySet, toolGroupId]);
|
|
254
250
|
const onSegmentChange = (0,react.useCallback)(direction => {
|
|
255
|
-
direction = direction === 'left' ? -1 : 1;
|
|
256
251
|
const segmentationId = segDisplaySet.displaySetInstanceUID;
|
|
257
252
|
const segmentation = segmentationService.getSegmentation(segmentationId);
|
|
258
253
|
const {
|
|
@@ -360,6 +355,51 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
360
355
|
referencedDisplaySetRef.current = null;
|
|
361
356
|
};
|
|
362
357
|
}, [segDisplaySet]);
|
|
358
|
+
const hydrateSEGDisplaySet = (0,react.useCallback)(({
|
|
359
|
+
segDisplaySet,
|
|
360
|
+
viewportId
|
|
361
|
+
}) => {
|
|
362
|
+
commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
|
363
|
+
displaySets: [segDisplaySet],
|
|
364
|
+
viewportId
|
|
365
|
+
});
|
|
366
|
+
}, [commandsManager]);
|
|
367
|
+
const onStatusClick = (0,react.useCallback)(async () => {
|
|
368
|
+
// Before hydrating a SEG and make it added to all viewports in the grid
|
|
369
|
+
// that share the same frameOfReferenceUID, we need to store the viewport grid
|
|
370
|
+
// presentation state, so that we can restore it after hydrating the SEG. This is
|
|
371
|
+
// required if the user has changed the viewport (other viewport than SEG viewport)
|
|
372
|
+
// presentation state (w/l and invert) and then opens the SEG. If we don't store
|
|
373
|
+
// the presentation state, the viewport will be reset to the default presentation
|
|
374
|
+
storePresentationState();
|
|
375
|
+
const isHydrated = await hydrateSEGDisplaySet({
|
|
376
|
+
segDisplaySet,
|
|
377
|
+
viewportId
|
|
378
|
+
});
|
|
379
|
+
setIsHydrated(isHydrated);
|
|
380
|
+
}, [hydrateSEGDisplaySet, segDisplaySet, storePresentationState, viewportId]);
|
|
381
|
+
(0,react.useEffect)(() => {
|
|
382
|
+
viewportActionCornersService.setComponents([{
|
|
383
|
+
viewportId,
|
|
384
|
+
id: 'viewportStatusComponent',
|
|
385
|
+
component: _getStatusComponent({
|
|
386
|
+
isHydrated,
|
|
387
|
+
onStatusClick
|
|
388
|
+
}),
|
|
389
|
+
indexPriority: -100,
|
|
390
|
+
location: viewportActionCornersService.LOCATIONS.topLeft
|
|
391
|
+
}, {
|
|
392
|
+
viewportId,
|
|
393
|
+
id: 'viewportActionArrowsComponent',
|
|
394
|
+
component: /*#__PURE__*/react.createElement(src/* ViewportActionArrows */.$I, {
|
|
395
|
+
key: "actionArrows",
|
|
396
|
+
onArrowsClick: onSegmentChange,
|
|
397
|
+
className: viewportId === activeViewportId ? 'visible' : 'invisible group-hover:visible'
|
|
398
|
+
}),
|
|
399
|
+
indexPriority: 0,
|
|
400
|
+
location: viewportActionCornersService.LOCATIONS.topRight
|
|
401
|
+
}]);
|
|
402
|
+
}, [activeViewportId, isHydrated, onSegmentChange, onStatusClick, viewportActionCornersService, viewportId]);
|
|
363
403
|
|
|
364
404
|
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
365
405
|
let childrenWithProps = null;
|
|
@@ -385,60 +425,9 @@ function OHIFCornerstoneSEGViewport(props) {
|
|
|
385
425
|
SeriesDescription,
|
|
386
426
|
SpacingBetweenSlices
|
|
387
427
|
} = referencedDisplaySetRef.current.metadata;
|
|
388
|
-
|
|
389
|
-
segDisplaySet,
|
|
390
|
-
viewportId
|
|
391
|
-
}) => {
|
|
392
|
-
commandsManager.runCommand('loadSegmentationDisplaySetsForViewport', {
|
|
393
|
-
displaySets: [segDisplaySet],
|
|
394
|
-
viewportId
|
|
395
|
-
});
|
|
396
|
-
};
|
|
397
|
-
const onStatusClick = async () => {
|
|
398
|
-
// Before hydrating a SEG and make it added to all viewports in the grid
|
|
399
|
-
// that share the same frameOfReferenceUID, we need to store the viewport grid
|
|
400
|
-
// presentation state, so that we can restore it after hydrating the SEG. This is
|
|
401
|
-
// required if the user has changed the viewport (other viewport than SEG viewport)
|
|
402
|
-
// presentation state (w/l and invert) and then opens the SEG. If we don't store
|
|
403
|
-
// the presentation state, the viewport will be reset to the default presentation
|
|
404
|
-
storePresentationState();
|
|
405
|
-
const isHydrated = await hydrateSEGDisplaySet({
|
|
406
|
-
segDisplaySet,
|
|
407
|
-
viewportId
|
|
408
|
-
});
|
|
409
|
-
setIsHydrated(isHydrated);
|
|
410
|
-
};
|
|
411
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(ui_src/* ViewportActionBar */.cS, {
|
|
412
|
-
onDoubleClick: evt => {
|
|
413
|
-
evt.stopPropagation();
|
|
414
|
-
evt.preventDefault();
|
|
415
|
-
},
|
|
416
|
-
onArrowsClick: onSegmentChange,
|
|
417
|
-
getStatusComponent: () => {
|
|
418
|
-
return _getStatusComponent({
|
|
419
|
-
isHydrated,
|
|
420
|
-
onStatusClick
|
|
421
|
-
});
|
|
422
|
-
},
|
|
423
|
-
studyData: {
|
|
424
|
-
label: viewportLabel,
|
|
425
|
-
useAltStyling: true,
|
|
426
|
-
studyDate: formatDate(StudyDate),
|
|
427
|
-
seriesDescription: `SEG Viewport ${SeriesDescription}`,
|
|
428
|
-
patientInformation: {
|
|
429
|
-
patientName: PatientName ? src/* default.utils */.Ay.utils.formatPN(PatientName.Alphabetic) : '',
|
|
430
|
-
patientSex: PatientSex || '',
|
|
431
|
-
patientAge: PatientAge || '',
|
|
432
|
-
MRN: PatientID || '',
|
|
433
|
-
thickness: SliceThickness ? src.utils.roundNumber(SliceThickness, 2) : '',
|
|
434
|
-
thicknessUnits: SliceThickness !== undefined ? 'mm' : '',
|
|
435
|
-
spacing: SpacingBetweenSlices !== undefined ? src.utils.roundNumber(SpacingBetweenSlices, 2) : '',
|
|
436
|
-
scanner: ManufacturerModelName || ''
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}), /*#__PURE__*/react.createElement("div", {
|
|
428
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("div", {
|
|
440
429
|
className: "relative flex h-full w-full flex-row overflow-hidden"
|
|
441
|
-
}, segIsLoading && /*#__PURE__*/react.createElement(
|
|
430
|
+
}, segIsLoading && /*#__PURE__*/react.createElement(src/* LoadingIndicatorTotalPercent */.pT, {
|
|
442
431
|
className: "h-full w-full",
|
|
443
432
|
totalNumbers: processingProgress.totalSegments,
|
|
444
433
|
percentComplete: processingProgress.percentComplete,
|