@ohif/app 3.10.0-beta.113 → 3.10.0-beta.115
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/1568.bundle.af4308b321dfab0445e6.js +6562 -0
- package/dist/{1919.bundle.fae108d3c6ad35ed05ae.js → 1919.bundle.8bd683b21cbfe1cb71a7.js} +12 -8
- package/dist/1919.css +1 -1
- package/dist/{870.bundle.26a075bb828c43c13794.js → 2308.bundle.8db15bbd9d5833f21526.js} +54 -135
- package/dist/{870.css → 2308.css} +1 -1
- package/dist/{2701.bundle.c9ea5a2bd0df31dd3aaa.js → 2701.bundle.b68c4419910024a0758d.js} +14 -10
- package/dist/3480.bundle.22f8a106b17da4d7e826.js +7495 -0
- package/dist/{3677.bundle.22ecea02fae99fc4b073.js → 3677.bundle.4a319db2fd495efa4564.js} +1648 -1654
- package/dist/{5770.bundle.700382010763de7c58fd.js → 4113.bundle.8fccd7af6118fde173aa.js} +34 -80
- package/dist/{4202.bundle.add83801fbc8227d551b.js → 4202.bundle.c86958c59da67316127c.js} +1 -1
- package/dist/{4526.bundle.bf1047785c90ef0a9fec.js → 4526.bundle.7b394677fd5dc4fad06f.js} +6 -6
- package/dist/{99.bundle.f7e8de6d86029ec75605.js → 4675.bundle.b7e00e5915520885fa1f.js} +967 -2
- package/dist/4743.bundle.9faa6ddab058d9a939f4.js +6634 -0
- package/dist/{4759.bundle.0d60078f58f5a56c0157.js → 4759.bundle.e4ff22f9db3f555aad7b.js} +4 -0
- package/dist/4759.css +1 -1
- package/dist/{2236.bundle.2fbf9a607e380f3bdd7f.js → 4789.bundle.5bc2d9e5507319d9cadf.js} +22327 -22350
- package/dist/{4834.bundle.750ec176d0ef84772b0a.js → 4834.bundle.6b5e7e0fc3343ec1960a.js} +1 -1
- package/dist/{4991.bundle.aa561005b9bff1f391af.js → 4991.bundle.897fe8cb1e85dbf31543.js} +4 -0
- package/dist/5258.bundle.f95ab2e02467a734bdb6.js +4519 -0
- package/dist/{5915.bundle.84b8c2aa4d4a8c7e40a2.js → 5341.bundle.2f963b49a4856e342cd1.js} +48327 -48879
- package/dist/{5674.bundle.05e639d0871778c8093a.js → 5674.bundle.977cff87c10fbb29cbb3.js} +4 -0
- package/dist/5674.css +1 -1
- package/dist/{573.bundle.ae0bd4f3e1f4eac8ae43.js → 573.bundle.9549b3f7fa44438654f0.js} +1 -1
- package/dist/{6027.bundle.32be836eef7308434394.js → 6027.bundle.d85e8a6bae1085cda03e.js} +3 -5
- package/dist/{8888.bundle.f6a648dc743772c89787.js → 6139.bundle.12d9035382cda028683b.js} +26538 -32458
- package/dist/{6201.bundle.11e6c535543d13b0bb98.js → 6201.bundle.db75c77eb056cb88c2b0.js} +4 -4
- package/dist/6201.css +1 -1
- package/dist/{6341.bundle.5e868cc5104bc834fcbc.js → 6341.bundle.40ae99e784ab35e9407c.js} +11 -21
- package/dist/6341.css +1 -1
- package/dist/{5038.bundle.790dfe509bc9841701b0.js → 6727.bundle.ffc91186f23237ec35c4.js} +4022 -11619
- package/dist/{6734.bundle.1a6cfb006f9a16963b0d.js → 6734.bundle.6829e6ba782c290fb687.js} +2 -2
- package/dist/6734.css +1 -1
- package/dist/6752.bundle.e33e02dd8f006be51464.js +2249 -0
- package/dist/{7197.bundle.3503d1951304cac940fa.js → 7197.bundle.e8529fdc03c3cc927e38.js} +50 -41
- package/dist/7197.css +1 -1
- package/dist/{5692.bundle.22ae2ac093b6d6b65a6e.js → 7942.bundle.a76695b6bc780cbf0b23.js} +474 -513
- package/dist/{8008.bundle.74e51bdb02ff5d264f50.js → 8008.bundle.bbb188c7a9c5358b5682.js} +4 -9
- package/dist/{810.bundle.342fc8fac8ae665558c6.js → 810.bundle.e388d7b970d9622441c4.js} +10 -10
- package/dist/810.css +1 -1
- package/dist/{8228.bundle.4bcb42b49355447ef23c.js → 8228.bundle.9532c8d75799a8d9c093.js} +2 -2
- package/dist/{8259.bundle.39723f9c04717f80687e.js → 8259.bundle.0f474d990a129494e1df.js} +3 -3
- package/dist/8402.css +1 -1
- package/dist/{8558.bundle.56d667a6969a60bab102.js → 8558.bundle.ffb653dfb0104bdd128e.js} +5 -1
- package/dist/8834.bundle.88696f3afc37982b4273.js +14581 -0
- package/dist/{9026.bundle.90271a421048d1adc3db.js → 9026.bundle.317d3f9be65ef67b9bff.js} +15 -10
- package/dist/{9551.bundle.44d1426054e46cf5d673.js → 9551.bundle.92b13000deb4aa87f2fd.js} +4 -9
- package/dist/{9072.bundle.49293623f9ed4582eeeb.js → 9855.bundle.ba46a4315a78373262ad.js} +451 -393
- package/dist/{9862.bundle.a4ccc41bcff91a46d37e.js → 9862.bundle.e44946f8d28ded1e722f.js} +3 -3
- package/dist/{9890.bundle.07483064f31feb5718a4.js → 9890.bundle.711bf3486194cdd5c039.js} +6 -6
- package/dist/9890.css +1 -1
- package/dist/app-config.js +8 -1
- package/dist/{app.bundle.3dc9aa5b6077224cc394.js → app.bundle.aac0f76ff17b3e978aa1.js} +55160 -53512
- package/dist/app.bundle.css +2 -2
- package/dist/{polySeg.bundle.d41f5224f4efc124505a.js → compute.bundle.fa052dcf2ef82b4950ad.js} +4 -3
- package/dist/{histogram-worker.bundle.6b0dbbdb168d711efad4.js → histogram-worker.bundle.986106c30f091f2cef47.js} +2 -1
- package/dist/index.html +1 -1
- package/dist/polySeg.bundle.7d21e7dc9b361089e3a5.js +250 -0
- package/dist/{suv-peak-worker.bundle.4ca63044b76f51350d34.js → suv-peak-worker.bundle.f22f853b6599f7ec6f0c.js} +6 -5
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- package/dist/2045.bundle.aaa10dff6d93bec47a45.js +0 -9708
- package/dist/6896.bundle.ca9b905abe733f279387.js +0 -7147
- /package/dist/{213.bundle.a98935570805e4a7b9b2.js → 213.bundle.533d331e72ec5aa85b1c.js} +0 -0
- /package/dist/{2424.bundle.4f1eeae6a8f248dd34c1.js → 2424.bundle.4f39ac6cdb1a28a0ded3.js} +0 -0
- /package/dist/{2825.bundle.a9ed7e8b46a92a157797.js → 2825.bundle.f6bfd4cc1a286ebb1b38.js} +0 -0
- /package/dist/{7955.bundle.eba45d4238f7e762545d.js → 7955.bundle.24dbe9de87056ecbb422.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[9855],{
|
|
3
3
|
|
|
4
4
|
/***/ 35392:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -18,10 +18,10 @@ var es = __webpack_require__(99993);
|
|
|
18
18
|
// EXTERNAL MODULE: ../../../node_modules/classnames/index.js
|
|
19
19
|
var classnames = __webpack_require__(55530);
|
|
20
20
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
21
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
22
|
-
var src = __webpack_require__(
|
|
23
|
-
// EXTERNAL MODULE: ../../ui-next/src/index.ts +
|
|
24
|
-
var ui_next_src = __webpack_require__(
|
|
21
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 693 modules
|
|
22
|
+
var src = __webpack_require__(61533);
|
|
23
|
+
// EXTERNAL MODULE: ../../ui-next/src/index.ts + 2653 modules
|
|
24
|
+
var ui_next_src = __webpack_require__(95371);
|
|
25
25
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
|
|
26
26
|
var esm = __webpack_require__(81985);
|
|
27
27
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/components/WindowLevelActionMenu/Colormap.tsx
|
|
@@ -295,46 +295,33 @@ function WindowLevel({
|
|
|
295
295
|
|
|
296
296
|
|
|
297
297
|
|
|
298
|
-
|
|
299
298
|
function VolumeRenderingPresetsContent({
|
|
300
299
|
presets,
|
|
301
300
|
viewportId,
|
|
302
301
|
commandsManager,
|
|
303
|
-
|
|
302
|
+
hide
|
|
304
303
|
}) {
|
|
305
|
-
const [filteredPresets, setFilteredPresets] = (0,react.useState)(presets);
|
|
306
304
|
const [searchValue, setSearchValue] = (0,react.useState)('');
|
|
307
305
|
const [selectedPreset, setSelectedPreset] = (0,react.useState)(null);
|
|
308
|
-
const handleSearchChange = (0,react.useCallback)(
|
|
309
|
-
setSearchValue(value);
|
|
310
|
-
|
|
311
|
-
setFilteredPresets(filtered);
|
|
312
|
-
}, [presets]);
|
|
306
|
+
const handleSearchChange = (0,react.useCallback)(event => {
|
|
307
|
+
setSearchValue(event.target.value);
|
|
308
|
+
}, []);
|
|
313
309
|
const handleApply = (0,react.useCallback)(props => {
|
|
314
310
|
commandsManager.runCommand('setViewportPreset', {
|
|
315
311
|
...props
|
|
316
312
|
});
|
|
317
313
|
}, [commandsManager]);
|
|
314
|
+
const filteredPresets = searchValue ? presets.filter(preset => preset.name.toLowerCase().includes(searchValue.toLowerCase())) : presets;
|
|
318
315
|
const formatLabel = (label, maxChars) => {
|
|
319
316
|
return label.length > maxChars ? `${label.slice(0, maxChars)}...` : label;
|
|
320
317
|
};
|
|
321
|
-
return /*#__PURE__*/react.createElement(
|
|
322
|
-
className: "
|
|
323
|
-
}, /*#__PURE__*/react.createElement(
|
|
324
|
-
className: "border-secondary-light h-[433px] w-full overflow-hidden rounded border bg-black px-2.5"
|
|
325
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
326
|
-
className: "flex h-[46px] w-full items-center justify-start"
|
|
327
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
328
|
-
className: "h-[26px] w-[200px]"
|
|
329
|
-
}, /*#__PURE__*/react.createElement(src/* InputFilterText */.Cv, {
|
|
318
|
+
return /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MU, {
|
|
319
|
+
className: "h-[500px]"
|
|
320
|
+
}, /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MU.PresetBody, null, /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MU.PresetFilter, null, /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MU.PresetSearch, {
|
|
330
321
|
value: searchValue,
|
|
331
|
-
|
|
332
|
-
placeholder:
|
|
333
|
-
}))
|
|
334
|
-
className: "ohif-scrollbar overflow h-[385px] w-full overflow-y-auto"
|
|
335
|
-
}, /*#__PURE__*/react.createElement("div", {
|
|
336
|
-
className: "grid grid-cols-4 gap-3 pt-2 pr-3"
|
|
337
|
-
}, filteredPresets.map((preset, index) => /*#__PURE__*/react.createElement("div", {
|
|
322
|
+
onChange: handleSearchChange,
|
|
323
|
+
placeholder: "Search all"
|
|
324
|
+
})), /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MU.PresetGrid, null, filteredPresets.map((preset, index) => /*#__PURE__*/react.createElement("div", {
|
|
338
325
|
key: index,
|
|
339
326
|
className: "flex cursor-pointer flex-col items-start",
|
|
340
327
|
onClick: () => {
|
|
@@ -346,19 +333,14 @@ function VolumeRenderingPresetsContent({
|
|
|
346
333
|
}
|
|
347
334
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI.ByName, {
|
|
348
335
|
name: preset.name,
|
|
349
|
-
className: selectedPreset?.name === preset.name ? 'border-
|
|
336
|
+
className: selectedPreset?.name === preset.name ? 'border-highlight h-[75px] w-[95px] max-w-none rounded border-2' : 'hover:border-highlight h-[75px] w-[95px] max-w-none rounded border-2 border-black'
|
|
350
337
|
}), /*#__PURE__*/react.createElement("label", {
|
|
351
|
-
className: "text-
|
|
352
|
-
}, formatLabel(preset.name, 11))))))
|
|
353
|
-
className: "
|
|
354
|
-
}, /*#__PURE__*/react.createElement(
|
|
355
|
-
|
|
356
|
-
},
|
|
357
|
-
name: "Cancel",
|
|
358
|
-
size: src/* ButtonEnums.size */.Ny.Ej.medium,
|
|
359
|
-
type: src/* ButtonEnums.type */.Ny.NW.secondary,
|
|
360
|
-
onClick: onClose
|
|
361
|
-
}, ' ', "Cancel", ' '))));
|
|
338
|
+
className: "text-muted-foreground mt-1 text-left text-xs"
|
|
339
|
+
}, formatLabel(preset.name, 11)))))), /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es, {
|
|
340
|
+
className: "mt-4 flex-shrink-0"
|
|
341
|
+
}, /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es.Right, null, /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es.Secondary, {
|
|
342
|
+
onClick: hide
|
|
343
|
+
}, "Cancel"))));
|
|
362
344
|
}
|
|
363
345
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/components/WindowLevelActionMenu/VolumeRenderingPresets.tsx
|
|
364
346
|
|
|
@@ -372,21 +354,19 @@ function VolumeRenderingPresets({
|
|
|
372
354
|
volumeRenderingPresets
|
|
373
355
|
}) {
|
|
374
356
|
const {
|
|
375
|
-
|
|
357
|
+
uiDialogService
|
|
376
358
|
} = servicesManager.services;
|
|
377
359
|
const onClickPresets = () => {
|
|
378
|
-
|
|
360
|
+
uiDialogService.show({
|
|
361
|
+
id: 'volume-rendering-presets',
|
|
379
362
|
content: VolumeRenderingPresetsContent,
|
|
380
363
|
title: 'Rendering Presets',
|
|
381
|
-
|
|
364
|
+
isDraggable: true,
|
|
382
365
|
contentProps: {
|
|
383
|
-
onClose: uiModalService.hide,
|
|
384
366
|
presets: volumeRenderingPresets,
|
|
385
367
|
viewportId,
|
|
386
368
|
commandsManager
|
|
387
|
-
}
|
|
388
|
-
containerDimensions: 'h-[543px] w-[460px]',
|
|
389
|
-
contentDimensions: 'h-[493px] w-[460px] pl-[12px] pr-[12px]'
|
|
369
|
+
}
|
|
390
370
|
});
|
|
391
371
|
};
|
|
392
372
|
return /*#__PURE__*/react.createElement(src/* AllInOneMenu.Item */.se.q7, {
|
|
@@ -904,7 +884,7 @@ function WindowLevelActionMenu({
|
|
|
904
884
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(86326);
|
|
905
885
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97598);
|
|
906
886
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
907
|
-
/* harmony import */ var _ohif_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
887
|
+
/* harmony import */ var _ohif_ui__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(61533);
|
|
908
888
|
/* harmony import */ var _services_ViewportActionCornersService_ViewportActionCornersService__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77954);
|
|
909
889
|
|
|
910
890
|
|
|
@@ -1175,7 +1155,7 @@ function useSegmentations({
|
|
|
1175
1155
|
|
|
1176
1156
|
/***/ }),
|
|
1177
1157
|
|
|
1178
|
-
/***/
|
|
1158
|
+
/***/ 39855:
|
|
1179
1159
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1180
1160
|
|
|
1181
1161
|
// ESM COMPAT FLAG
|
|
@@ -1183,6 +1163,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1183
1163
|
|
|
1184
1164
|
// EXPORTS
|
|
1185
1165
|
__webpack_require__.d(__webpack_exports__, {
|
|
1166
|
+
CornerstoneViewportDownloadForm: () => (/* reexport */ utils_CornerstoneViewportDownloadForm),
|
|
1186
1167
|
DicomUpload: () => (/* reexport */ DicomUpload_DicomUpload),
|
|
1187
1168
|
Enums: () => (/* reexport */ enums),
|
|
1188
1169
|
ImageOverlayViewerTool: () => (/* reexport */ tools_ImageOverlayViewerTool),
|
|
@@ -1238,8 +1219,8 @@ __webpack_require__.r(types_namespaceObject);
|
|
|
1238
1219
|
var react = __webpack_require__(86326);
|
|
1239
1220
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
|
|
1240
1221
|
var esm = __webpack_require__(81985);
|
|
1241
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
|
|
1242
|
-
var dist_esm = __webpack_require__(
|
|
1222
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
|
|
1223
|
+
var dist_esm = __webpack_require__(4667);
|
|
1243
1224
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/enums.ts
|
|
1244
1225
|
const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
|
|
1245
1226
|
const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
|
|
@@ -1254,8 +1235,8 @@ var src = __webpack_require__(5058);
|
|
|
1254
1235
|
var loaders = __webpack_require__(19742);
|
|
1255
1236
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/enums/RequestType.js
|
|
1256
1237
|
var RequestType = __webpack_require__(43213);
|
|
1257
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/index.js +
|
|
1258
|
-
var dicom_image_loader_dist_esm = __webpack_require__(
|
|
1238
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/dicom-image-loader/dist/esm/index.js + 76 modules
|
|
1239
|
+
var dicom_image_loader_dist_esm = __webpack_require__(79453);
|
|
1259
1240
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/initWADOImageLoader.js
|
|
1260
1241
|
|
|
1261
1242
|
|
|
@@ -1290,8 +1271,10 @@ function initWADOImageLoader(userAuthenticationService, appConfig, extensionMana
|
|
|
1290
1271
|
function destroy() {
|
|
1291
1272
|
console.debug('Destroying WADO Image Loader');
|
|
1292
1273
|
}
|
|
1293
|
-
// EXTERNAL MODULE: ../../../
|
|
1294
|
-
var
|
|
1274
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/polymorphic-segmentation/dist/esm/index.js + 14 modules
|
|
1275
|
+
var polymorphic_segmentation_dist_esm = __webpack_require__(56983);
|
|
1276
|
+
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts + 146 modules
|
|
1277
|
+
var default_src = __webpack_require__(47942);
|
|
1295
1278
|
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/state.ts
|
|
1296
1279
|
var state = __webpack_require__(71353);
|
|
1297
1280
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/getActiveViewportEnabledElement.ts
|
|
@@ -1388,28 +1371,14 @@ function onCompletedCalibrationLine(servicesManager, csToolsEvent) {
|
|
|
1388
1371
|
reject('UIDialogService is not initiated');
|
|
1389
1372
|
return;
|
|
1390
1373
|
}
|
|
1391
|
-
(0,default_src.callInputDialog)(
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
reject('cancel');
|
|
1400
|
-
}
|
|
1401
|
-
}, false, {
|
|
1402
|
-
dialogTitle: 'Calibration',
|
|
1403
|
-
inputLabel: 'Actual Physical distance (mm)',
|
|
1404
|
-
// the input value must be a number
|
|
1405
|
-
validateFunc: val => {
|
|
1406
|
-
try {
|
|
1407
|
-
const v = Number.parseFloat(val);
|
|
1408
|
-
return !isNaN(v) && v !== 0.0;
|
|
1409
|
-
} catch {
|
|
1410
|
-
return false;
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1374
|
+
(0,default_src.callInputDialog)({
|
|
1375
|
+
uiDialogService,
|
|
1376
|
+
title: 'Calibration',
|
|
1377
|
+
placeholder: 'Actual Physical distance (mm)',
|
|
1378
|
+
defaultValue: `${length}`
|
|
1379
|
+
}).then(newValue => {
|
|
1380
|
+
adjustCalibration(Number.parseFloat(newValue));
|
|
1381
|
+
resolve(true);
|
|
1413
1382
|
});
|
|
1414
1383
|
});
|
|
1415
1384
|
}
|
|
@@ -1676,12 +1645,17 @@ ImageOverlayViewerTool.addOverlayPlaneModule = tools_OverlayPlaneModuleProvider.
|
|
|
1676
1645
|
|
|
1677
1646
|
|
|
1678
1647
|
|
|
1648
|
+
|
|
1679
1649
|
function initCornerstoneTools(configuration = {}) {
|
|
1680
1650
|
dist_esm.CrosshairsTool.isAnnotation = false;
|
|
1681
1651
|
dist_esm.ReferenceLinesTool.isAnnotation = false;
|
|
1682
1652
|
dist_esm.AdvancedMagnifyTool.isAnnotation = false;
|
|
1683
1653
|
dist_esm.PlanarFreehandContourSegmentationTool.isAnnotation = false;
|
|
1684
|
-
(0,dist_esm.init)(
|
|
1654
|
+
(0,dist_esm.init)({
|
|
1655
|
+
addons: {
|
|
1656
|
+
polySeg: polymorphic_segmentation_dist_esm
|
|
1657
|
+
}
|
|
1658
|
+
});
|
|
1685
1659
|
(0,dist_esm.addTool)(dist_esm.PanTool);
|
|
1686
1660
|
(0,dist_esm.addTool)(dist_esm.WindowLevelTool);
|
|
1687
1661
|
(0,dist_esm.addTool)(dist_esm.StackScrollTool);
|
|
@@ -1774,8 +1748,8 @@ const toolNames = {
|
|
|
1774
1748
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/constants/supportedTools.js
|
|
1775
1749
|
const supportedTools = ['Length', 'EllipticalROI', 'CircleROI', 'Bidirectional', 'ArrowAnnotate', 'Angle', 'CobbAngle', 'Probe', 'RectangleROI', 'PlanarFreehandROI', 'SplineROI', 'LivewireContour', 'UltrasoundDirectionalTool', 'SCOORD3DPoint'];
|
|
1776
1750
|
/* harmony default export */ const constants_supportedTools = (supportedTools);
|
|
1777
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/index.js
|
|
1778
|
-
var stateManagement_annotation = __webpack_require__(
|
|
1751
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/index.js
|
|
1752
|
+
var stateManagement_annotation = __webpack_require__(32102);
|
|
1779
1753
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/utils/getIsLocked.ts
|
|
1780
1754
|
|
|
1781
1755
|
const getIsLocked = annotationUID => {
|
|
@@ -2718,7 +2692,7 @@ function CircleROI_getDisplayText(mappedAnnotations, displaySet) {
|
|
|
2718
2692
|
|
|
2719
2693
|
|
|
2720
2694
|
|
|
2721
|
-
const
|
|
2695
|
+
const ArrowAnnotate = {
|
|
2722
2696
|
toAnnotation: measurement => {},
|
|
2723
2697
|
/**
|
|
2724
2698
|
* Maps cornerstone annotation event data to measurement service format.
|
|
@@ -2877,7 +2851,7 @@ function ArrowAnnotate_getReport(mappedAnnotations, points, FrameOfReferenceUID)
|
|
|
2877
2851
|
values
|
|
2878
2852
|
};
|
|
2879
2853
|
}
|
|
2880
|
-
/* harmony default export */ const
|
|
2854
|
+
/* harmony default export */ const measurementServiceMappings_ArrowAnnotate = (ArrowAnnotate);
|
|
2881
2855
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/CobbAngle.ts
|
|
2882
2856
|
|
|
2883
2857
|
|
|
@@ -4656,8 +4630,8 @@ const measurementServiceMappingsFactory = (measurementService, displaySetService
|
|
|
4656
4630
|
}]
|
|
4657
4631
|
},
|
|
4658
4632
|
ArrowAnnotate: {
|
|
4659
|
-
toAnnotation:
|
|
4660
|
-
toMeasurement: csToolsAnnotation =>
|
|
4633
|
+
toAnnotation: measurementServiceMappings_ArrowAnnotate.toAnnotation,
|
|
4634
|
+
toMeasurement: csToolsAnnotation => measurementServiceMappings_ArrowAnnotate.toMeasurement(csToolsAnnotation, displaySetService, cornerstoneViewportService, _getValueTypeFromToolType, customizationService),
|
|
4661
4635
|
matchingCriteria: [{
|
|
4662
4636
|
valueType: src/* MeasurementService */.C5.VALUE_TYPES.POINT,
|
|
4663
4637
|
points: 1
|
|
@@ -5972,8 +5946,8 @@ var useLutPresentationStore = __webpack_require__(10182);
|
|
|
5972
5946
|
var usePositionPresentationStore = __webpack_require__(44646);
|
|
5973
5947
|
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/stores/useSegmentationPresentationStore.ts + 1 modules
|
|
5974
5948
|
var useSegmentationPresentationStore = __webpack_require__(2847);
|
|
5975
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js
|
|
5976
|
-
var esm_utilities = __webpack_require__(
|
|
5949
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js
|
|
5950
|
+
var esm_utilities = __webpack_require__(98866);
|
|
5977
5951
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/init.tsx
|
|
5978
5952
|
|
|
5979
5953
|
|
|
@@ -6342,8 +6316,8 @@ function _showCPURenderingModal(uiModalService, hangingProtocolService) {
|
|
|
6342
6316
|
inheritsFrom: 'ohif.overlayItem.instanceNumber'
|
|
6343
6317
|
}]
|
|
6344
6318
|
});
|
|
6345
|
-
// EXTERNAL MODULE: ../../ui-next/src/index.ts +
|
|
6346
|
-
var ui_next_src = __webpack_require__(
|
|
6319
|
+
// EXTERNAL MODULE: ../../ui-next/src/index.ts + 2653 modules
|
|
6320
|
+
var ui_next_src = __webpack_require__(95371);
|
|
6347
6321
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/customizations/segmentationPanelCustomization.tsx
|
|
6348
6322
|
|
|
6349
6323
|
|
|
@@ -6754,8 +6728,8 @@ const defaultWindowLevelPresets = {
|
|
|
6754
6728
|
/* harmony default export */ const windowLevelPresetsCustomization = ({
|
|
6755
6729
|
'cornerstone.windowLevelPresets': WindowLevelActionMenu_defaultWindowLevelPresets
|
|
6756
6730
|
});
|
|
6757
|
-
// EXTERNAL MODULE: ../../ui/src/index.js +
|
|
6758
|
-
var ui_src = __webpack_require__(
|
|
6731
|
+
// EXTERNAL MODULE: ../../ui/src/index.js + 693 modules
|
|
6732
|
+
var ui_src = __webpack_require__(61533);
|
|
6759
6733
|
// EXTERNAL MODULE: ../../../node_modules/react-dropzone/dist/es/index.js + 4 modules
|
|
6760
6734
|
var es = __webpack_require__(85252);
|
|
6761
6735
|
// EXTERNAL MODULE: ../../../node_modules/prop-types/index.js
|
|
@@ -7386,21 +7360,120 @@ DicomUpload.propTypes = {
|
|
|
7386
7360
|
dicomUploadComponent: DicomUpload_DicomUpload,
|
|
7387
7361
|
codingValues: {}
|
|
7388
7362
|
});
|
|
7389
|
-
|
|
7390
|
-
var WindowLevelActionMenu = __webpack_require__(35392);
|
|
7391
|
-
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/customizations/windowLevelActionMenuCustomization.ts
|
|
7363
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/customizations/captureViewportModalCustomization.tsx
|
|
7392
7364
|
|
|
7393
|
-
|
|
7394
|
-
|
|
7365
|
+
|
|
7366
|
+
const MAX_TEXTURE_SIZE = 10000;
|
|
7367
|
+
const DEFAULT_FILENAME = 'image';
|
|
7368
|
+
function ViewportDownloadFormNew({
|
|
7369
|
+
onClose,
|
|
7370
|
+
defaultSize,
|
|
7371
|
+
fileTypeOptions,
|
|
7372
|
+
viewportId,
|
|
7373
|
+
showAnnotations,
|
|
7374
|
+
onAnnotationsChange,
|
|
7375
|
+
dimensions,
|
|
7376
|
+
warningState,
|
|
7377
|
+
onDimensionsChange,
|
|
7378
|
+
onEnableViewport,
|
|
7379
|
+
onDisableViewport,
|
|
7380
|
+
onDownload
|
|
7381
|
+
}) {
|
|
7382
|
+
const [viewportElement, setViewportElement] = (0,react.useState)(null);
|
|
7383
|
+
const [showWarningMessage, setShowWarningMessage] = (0,react.useState)(true);
|
|
7384
|
+
const [filename, setFilename] = (0,react.useState)(DEFAULT_FILENAME);
|
|
7385
|
+
const [fileType, setFileType] = (0,react.useState)('jpg');
|
|
7386
|
+
(0,react.useEffect)(() => {
|
|
7387
|
+
if (!viewportElement) {
|
|
7388
|
+
return;
|
|
7389
|
+
}
|
|
7390
|
+
onEnableViewport(viewportElement);
|
|
7391
|
+
return () => {
|
|
7392
|
+
onDisableViewport();
|
|
7393
|
+
};
|
|
7394
|
+
}, [onDisableViewport, onEnableViewport, viewportElement]);
|
|
7395
|
+
return /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji, null, /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.Body, null, /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.ImageVisual, null, /*#__PURE__*/react.createElement("div", {
|
|
7396
|
+
style: {
|
|
7397
|
+
height: dimensions.height,
|
|
7398
|
+
width: dimensions.width,
|
|
7399
|
+
position: 'relative'
|
|
7400
|
+
},
|
|
7401
|
+
"data-viewport-uid": viewportId,
|
|
7402
|
+
ref: setViewportElement
|
|
7403
|
+
}, warningState.enabled && showWarningMessage && /*#__PURE__*/react.createElement("div", {
|
|
7404
|
+
className: "text-foreground absolute left-1/2 bottom-[5px] z-[1000] -translate-x-1/2 whitespace-nowrap rounded bg-black p-3 text-xs font-bold",
|
|
7405
|
+
style: {
|
|
7406
|
+
fontSize: '12px'
|
|
7407
|
+
}
|
|
7408
|
+
}, warningState.value))), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.ImageOptions, null, /*#__PURE__*/react.createElement("div", {
|
|
7409
|
+
className: "flex items-end space-x-2"
|
|
7410
|
+
}, /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.Filename, {
|
|
7411
|
+
value: filename,
|
|
7412
|
+
onChange: e => setFilename(e.target.value)
|
|
7413
|
+
}, "File name"), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.Filetype, {
|
|
7414
|
+
selected: fileType,
|
|
7415
|
+
onSelect: setFileType,
|
|
7416
|
+
options: fileTypeOptions
|
|
7417
|
+
})), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.ImageSize, {
|
|
7418
|
+
width: dimensions.width.toString(),
|
|
7419
|
+
height: dimensions.height.toString(),
|
|
7420
|
+
onWidthChange: e => {
|
|
7421
|
+
onDimensionsChange({
|
|
7422
|
+
...dimensions,
|
|
7423
|
+
width: parseInt(e.target.value) || defaultSize
|
|
7424
|
+
});
|
|
7425
|
+
},
|
|
7426
|
+
onHeightChange: e => {
|
|
7427
|
+
onDimensionsChange({
|
|
7428
|
+
...dimensions,
|
|
7429
|
+
height: parseInt(e.target.value) || defaultSize
|
|
7430
|
+
});
|
|
7431
|
+
},
|
|
7432
|
+
maxWidth: MAX_TEXTURE_SIZE.toString(),
|
|
7433
|
+
maxHeight: MAX_TEXTURE_SIZE.toString()
|
|
7434
|
+
}, "Image size ", /*#__PURE__*/react.createElement("span", {
|
|
7435
|
+
className: "text-muted-foreground"
|
|
7436
|
+
}, "px")), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.SwitchOption, {
|
|
7437
|
+
defaultChecked: showAnnotations,
|
|
7438
|
+
checked: showAnnotations,
|
|
7439
|
+
onCheckedChange: onAnnotationsChange
|
|
7440
|
+
}, "Include annotations"), warningState.enabled && /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.ji.SwitchOption, {
|
|
7441
|
+
defaultChecked: showWarningMessage,
|
|
7442
|
+
checked: showWarningMessage,
|
|
7443
|
+
onCheckedChange: setShowWarningMessage
|
|
7444
|
+
}, "Include warning message"), /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es, {
|
|
7445
|
+
className: "mt-2"
|
|
7446
|
+
}, /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es.Right, null, /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es.Secondary, {
|
|
7447
|
+
onClick: onClose
|
|
7448
|
+
}, "Cancel"), /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.es.Primary, {
|
|
7449
|
+
onClick: () => {
|
|
7450
|
+
onDownload(filename || DEFAULT_FILENAME, fileType);
|
|
7451
|
+
onClose();
|
|
7452
|
+
}
|
|
7453
|
+
}, "Save"))))));
|
|
7454
|
+
}
|
|
7455
|
+
/* harmony default export */ const captureViewportModalCustomization = ({
|
|
7456
|
+
'ohif.captureViewportModal': ViewportDownloadFormNew
|
|
7457
|
+
});
|
|
7458
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/customizations/viewportDownloadWarningCustomization.tsx
|
|
7459
|
+
/* harmony default export */ const viewportDownloadWarningCustomization = ({
|
|
7460
|
+
'viewportDownload.warningMessage': {
|
|
7461
|
+
enabled: true,
|
|
7462
|
+
value: 'Not For Diagnostic Use'
|
|
7463
|
+
}
|
|
7395
7464
|
});
|
|
7396
7465
|
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/services/ViewportActionCornersService/ViewportActionCornersService.ts
|
|
7397
7466
|
var ViewportActionCornersService = __webpack_require__(77954);
|
|
7467
|
+
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/components/WindowLevelActionMenu/WindowLevelActionMenu.tsx + 10 modules
|
|
7468
|
+
var WindowLevelActionMenu = __webpack_require__(35392);
|
|
7398
7469
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/customizations/viewportActionMenuCustomizations.ts
|
|
7399
7470
|
|
|
7471
|
+
|
|
7400
7472
|
/* harmony default export */ const viewportActionMenuCustomizations = ({
|
|
7401
7473
|
'viewportActionMenu.windowLevelActionMenu': {
|
|
7402
7474
|
enabled: true,
|
|
7403
|
-
location: ViewportActionCornersService/* default */.A.LOCATIONS.topRight
|
|
7475
|
+
location: ViewportActionCornersService/* default */.A.LOCATIONS.topRight,
|
|
7476
|
+
component: WindowLevelActionMenu/* WindowLevelActionMenu */.K
|
|
7404
7477
|
},
|
|
7405
7478
|
'viewportActionMenu.segmentationOverlay': {
|
|
7406
7479
|
enabled: true,
|
|
@@ -7420,6 +7493,7 @@ var ViewportActionCornersService = __webpack_require__(77954);
|
|
|
7420
7493
|
|
|
7421
7494
|
|
|
7422
7495
|
|
|
7496
|
+
|
|
7423
7497
|
function getCustomizationModule({
|
|
7424
7498
|
commandsManager,
|
|
7425
7499
|
servicesManager
|
|
@@ -7440,7 +7514,8 @@ function getCustomizationModule({
|
|
|
7440
7514
|
...colorbarCustomization,
|
|
7441
7515
|
...windowLevelPresetsCustomization,
|
|
7442
7516
|
...miscCustomization,
|
|
7443
|
-
...
|
|
7517
|
+
...captureViewportModalCustomization,
|
|
7518
|
+
...viewportDownloadWarningCustomization,
|
|
7444
7519
|
...viewportActionMenuCustomizations
|
|
7445
7520
|
}
|
|
7446
7521
|
}];
|
|
@@ -7448,240 +7523,8 @@ function getCustomizationModule({
|
|
|
7448
7523
|
/* harmony default export */ const src_getCustomizationModule = (getCustomizationModule);
|
|
7449
7524
|
// EXTERNAL MODULE: ../../i18n/src/index.js + 150 modules
|
|
7450
7525
|
var i18n_src = __webpack_require__(16076);
|
|
7451
|
-
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js
|
|
7452
|
-
var gl_matrix_esm = __webpack_require__(
|
|
7453
|
-
// EXTERNAL MODULE: ../../../node_modules/html2canvas/dist/html2canvas.esm.js
|
|
7454
|
-
var html2canvas_esm = __webpack_require__(91037);
|
|
7455
|
-
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx
|
|
7456
|
-
|
|
7457
|
-
|
|
7458
|
-
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
|
|
7462
|
-
const MINIMUM_SIZE = 100;
|
|
7463
|
-
const DEFAULT_SIZE = 512;
|
|
7464
|
-
const MAX_TEXTURE_SIZE = 10000;
|
|
7465
|
-
const VIEWPORT_ID = 'cornerstone-viewport-download-form';
|
|
7466
|
-
const CornerstoneViewportDownloadForm = ({
|
|
7467
|
-
onClose,
|
|
7468
|
-
activeViewportId: activeViewportIdProp,
|
|
7469
|
-
cornerstoneViewportService
|
|
7470
|
-
}) => {
|
|
7471
|
-
const enabledElement = (0,state/* getEnabledElement */.kJ)(activeViewportIdProp);
|
|
7472
|
-
const activeViewportElement = enabledElement?.element;
|
|
7473
|
-
const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7474
|
-
const {
|
|
7475
|
-
viewportId: activeViewportId,
|
|
7476
|
-
renderingEngineId,
|
|
7477
|
-
viewport: activeViewport
|
|
7478
|
-
} = activeViewportEnabledElement;
|
|
7479
|
-
const toolGroup = dist_esm.ToolGroupManager.getToolGroupForViewport(activeViewportId, renderingEngineId);
|
|
7480
|
-
const toolModeAndBindings = Object.keys(toolGroup.toolOptions).reduce((acc, toolName) => {
|
|
7481
|
-
const tool = toolGroup.toolOptions[toolName];
|
|
7482
|
-
const {
|
|
7483
|
-
mode,
|
|
7484
|
-
bindings
|
|
7485
|
-
} = tool;
|
|
7486
|
-
return {
|
|
7487
|
-
...acc,
|
|
7488
|
-
[toolName]: {
|
|
7489
|
-
mode,
|
|
7490
|
-
bindings
|
|
7491
|
-
}
|
|
7492
|
-
};
|
|
7493
|
-
}, {});
|
|
7494
|
-
(0,react.useEffect)(() => {
|
|
7495
|
-
return () => {
|
|
7496
|
-
Object.keys(toolModeAndBindings).forEach(toolName => {
|
|
7497
|
-
const {
|
|
7498
|
-
mode,
|
|
7499
|
-
bindings
|
|
7500
|
-
} = toolModeAndBindings[toolName];
|
|
7501
|
-
toolGroup.setToolMode(toolName, mode, {
|
|
7502
|
-
bindings
|
|
7503
|
-
});
|
|
7504
|
-
});
|
|
7505
|
-
};
|
|
7506
|
-
}, []);
|
|
7507
|
-
const enableViewport = viewportElement => {
|
|
7508
|
-
if (viewportElement) {
|
|
7509
|
-
const {
|
|
7510
|
-
renderingEngine,
|
|
7511
|
-
viewport
|
|
7512
|
-
} = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7513
|
-
const viewportInput = {
|
|
7514
|
-
viewportId: VIEWPORT_ID,
|
|
7515
|
-
element: viewportElement,
|
|
7516
|
-
type: viewport.type,
|
|
7517
|
-
defaultOptions: {
|
|
7518
|
-
background: viewport.defaultOptions.background,
|
|
7519
|
-
orientation: viewport.defaultOptions.orientation
|
|
7520
|
-
}
|
|
7521
|
-
};
|
|
7522
|
-
renderingEngine.enableElement(viewportInput);
|
|
7523
|
-
}
|
|
7524
|
-
};
|
|
7525
|
-
const disableViewport = viewportElement => {
|
|
7526
|
-
if (viewportElement) {
|
|
7527
|
-
const {
|
|
7528
|
-
renderingEngine
|
|
7529
|
-
} = (0,esm.getEnabledElement)(viewportElement);
|
|
7530
|
-
return new Promise(resolve => {
|
|
7531
|
-
renderingEngine.disableElement(VIEWPORT_ID);
|
|
7532
|
-
});
|
|
7533
|
-
}
|
|
7534
|
-
};
|
|
7535
|
-
const updateViewportPreview = (downloadViewportElement, internalCanvas, fileType) => new Promise(resolve => {
|
|
7536
|
-
const enabledElement = (0,esm.getEnabledElement)(downloadViewportElement);
|
|
7537
|
-
const {
|
|
7538
|
-
viewport: downloadViewport,
|
|
7539
|
-
renderingEngine
|
|
7540
|
-
} = enabledElement;
|
|
7541
|
-
|
|
7542
|
-
// Note: Since any trigger of dimensions will update the viewport,
|
|
7543
|
-
// we need to resize the offScreenCanvas to accommodate for the new
|
|
7544
|
-
// dimensions, this is due to the reason that we are using the GPU offScreenCanvas
|
|
7545
|
-
// to render the viewport for the downloadViewport.
|
|
7546
|
-
renderingEngine.resize();
|
|
7547
|
-
|
|
7548
|
-
// Trigger the render on the viewport to update the on screen
|
|
7549
|
-
// downloadViewport.resetCamera();
|
|
7550
|
-
downloadViewport.render();
|
|
7551
|
-
downloadViewportElement.addEventListener(esm.Enums.Events.IMAGE_RENDERED, function updateViewport(event) {
|
|
7552
|
-
const enabledElement = (0,esm.getEnabledElement)(event.target);
|
|
7553
|
-
const {
|
|
7554
|
-
viewport
|
|
7555
|
-
} = enabledElement;
|
|
7556
|
-
const {
|
|
7557
|
-
element
|
|
7558
|
-
} = viewport;
|
|
7559
|
-
const downloadCanvas = (0,esm.getOrCreateCanvas)(element);
|
|
7560
|
-
const type = 'image/' + fileType;
|
|
7561
|
-
const dataUrl = downloadCanvas.toDataURL(type, 1);
|
|
7562
|
-
let newWidth = element.offsetHeight;
|
|
7563
|
-
let newHeight = element.offsetWidth;
|
|
7564
|
-
if (newWidth > DEFAULT_SIZE || newHeight > DEFAULT_SIZE) {
|
|
7565
|
-
const multiplier = DEFAULT_SIZE / Math.max(newWidth, newHeight);
|
|
7566
|
-
newHeight *= multiplier;
|
|
7567
|
-
newWidth *= multiplier;
|
|
7568
|
-
}
|
|
7569
|
-
resolve({
|
|
7570
|
-
dataUrl,
|
|
7571
|
-
width: newWidth,
|
|
7572
|
-
height: newHeight
|
|
7573
|
-
});
|
|
7574
|
-
downloadViewportElement.removeEventListener(esm.Enums.Events.IMAGE_RENDERED, updateViewport);
|
|
7575
|
-
|
|
7576
|
-
// for some reason we need a reset camera here, and I don't know why
|
|
7577
|
-
downloadViewport.resetCamera();
|
|
7578
|
-
const presentation = activeViewport.getViewPresentation();
|
|
7579
|
-
if (downloadViewport.setView) {
|
|
7580
|
-
downloadViewport.setView(activeViewport.getViewReference(), presentation);
|
|
7581
|
-
}
|
|
7582
|
-
downloadViewport.render();
|
|
7583
|
-
});
|
|
7584
|
-
});
|
|
7585
|
-
const loadImage = (activeViewportElement, viewportElement, width, height) => new Promise(resolve => {
|
|
7586
|
-
if (activeViewportElement && viewportElement) {
|
|
7587
|
-
const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7588
|
-
if (!activeViewportEnabledElement) {
|
|
7589
|
-
return;
|
|
7590
|
-
}
|
|
7591
|
-
const {
|
|
7592
|
-
viewport
|
|
7593
|
-
} = activeViewportEnabledElement;
|
|
7594
|
-
const renderingEngine = cornerstoneViewportService.getRenderingEngine();
|
|
7595
|
-
const downloadViewport = renderingEngine.getViewport(VIEWPORT_ID);
|
|
7596
|
-
if (downloadViewport instanceof esm.StackViewport) {
|
|
7597
|
-
const imageId = viewport.getCurrentImageId();
|
|
7598
|
-
const properties = viewport.getProperties();
|
|
7599
|
-
downloadViewport.setStack([imageId]).then(() => {
|
|
7600
|
-
try {
|
|
7601
|
-
downloadViewport.setProperties(properties);
|
|
7602
|
-
const newWidth = Math.min(width || image.width, MAX_TEXTURE_SIZE);
|
|
7603
|
-
const newHeight = Math.min(height || image.height, MAX_TEXTURE_SIZE);
|
|
7604
|
-
resolve({
|
|
7605
|
-
width: newWidth,
|
|
7606
|
-
height: newHeight
|
|
7607
|
-
});
|
|
7608
|
-
} catch (e) {
|
|
7609
|
-
// Happens on clicking the cancel button
|
|
7610
|
-
console.warn('Unable to set properties', e);
|
|
7611
|
-
}
|
|
7612
|
-
});
|
|
7613
|
-
} else if (downloadViewport instanceof esm.BaseVolumeViewport) {
|
|
7614
|
-
const actors = viewport.getActors();
|
|
7615
|
-
// downloadViewport.setActors(actors);
|
|
7616
|
-
actors.forEach(actor => {
|
|
7617
|
-
downloadViewport.addActor(actor);
|
|
7618
|
-
});
|
|
7619
|
-
downloadViewport.render();
|
|
7620
|
-
const newWidth = Math.min(width || image.width, MAX_TEXTURE_SIZE);
|
|
7621
|
-
const newHeight = Math.min(height || image.height, MAX_TEXTURE_SIZE);
|
|
7622
|
-
resolve({
|
|
7623
|
-
width: newWidth,
|
|
7624
|
-
height: newHeight
|
|
7625
|
-
});
|
|
7626
|
-
}
|
|
7627
|
-
}
|
|
7628
|
-
});
|
|
7629
|
-
const toggleAnnotations = (toggle, viewportElement, activeViewportElement) => {
|
|
7630
|
-
const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7631
|
-
const downloadViewportElement = (0,esm.getEnabledElement)(viewportElement);
|
|
7632
|
-
const {
|
|
7633
|
-
viewportId: activeViewportId,
|
|
7634
|
-
renderingEngineId
|
|
7635
|
-
} = activeViewportEnabledElement;
|
|
7636
|
-
const {
|
|
7637
|
-
viewportId: downloadViewportId
|
|
7638
|
-
} = downloadViewportElement;
|
|
7639
|
-
if (!activeViewportEnabledElement || !downloadViewportElement) {
|
|
7640
|
-
return;
|
|
7641
|
-
}
|
|
7642
|
-
const toolGroup = dist_esm.ToolGroupManager.getToolGroupForViewport(activeViewportId, renderingEngineId);
|
|
7643
|
-
|
|
7644
|
-
// add the viewport to the toolGroup
|
|
7645
|
-
toolGroup.addViewport(downloadViewportId, renderingEngineId);
|
|
7646
|
-
Object.keys(toolGroup.getToolInstances()).forEach(toolName => {
|
|
7647
|
-
// make all tools Enabled so that they can not be interacted with
|
|
7648
|
-
// in the download viewport
|
|
7649
|
-
if (toggle && toolName !== 'Crosshairs') {
|
|
7650
|
-
try {
|
|
7651
|
-
toolGroup.setToolEnabled(toolName);
|
|
7652
|
-
} catch (e) {
|
|
7653
|
-
console.log(e);
|
|
7654
|
-
}
|
|
7655
|
-
} else {
|
|
7656
|
-
toolGroup.setToolDisabled(toolName);
|
|
7657
|
-
}
|
|
7658
|
-
});
|
|
7659
|
-
};
|
|
7660
|
-
const downloadBlob = (filename, fileType) => {
|
|
7661
|
-
const file = `${filename}.${fileType}`;
|
|
7662
|
-
const divForDownloadViewport = document.querySelector(`div[data-viewport-uid="${VIEWPORT_ID}"]`);
|
|
7663
|
-
(0,html2canvas_esm/* default */.A)(divForDownloadViewport).then(canvas => {
|
|
7664
|
-
const link = document.createElement('a');
|
|
7665
|
-
link.download = file;
|
|
7666
|
-
link.href = canvas.toDataURL(fileType, 1.0);
|
|
7667
|
-
link.click();
|
|
7668
|
-
});
|
|
7669
|
-
};
|
|
7670
|
-
return /*#__PURE__*/react.createElement(ui_src/* ViewportDownloadForm */.VS, {
|
|
7671
|
-
onClose: onClose,
|
|
7672
|
-
minimumSize: MINIMUM_SIZE,
|
|
7673
|
-
maximumSize: MAX_TEXTURE_SIZE,
|
|
7674
|
-
defaultSize: DEFAULT_SIZE,
|
|
7675
|
-
activeViewportElement: activeViewportElement,
|
|
7676
|
-
enableViewport: enableViewport,
|
|
7677
|
-
disableViewport: disableViewport,
|
|
7678
|
-
updateViewportPreview: updateViewportPreview,
|
|
7679
|
-
loadImage: loadImage,
|
|
7680
|
-
toggleAnnotations: toggleAnnotations,
|
|
7681
|
-
downloadBlob: downloadBlob
|
|
7682
|
-
});
|
|
7683
|
-
};
|
|
7684
|
-
/* harmony default export */ const utils_CornerstoneViewportDownloadForm = (CornerstoneViewportDownloadForm);
|
|
7526
|
+
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js
|
|
7527
|
+
var gl_matrix_esm = __webpack_require__(40230);
|
|
7685
7528
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/imageSliceSync/toggleImageSliceSync.ts
|
|
7686
7529
|
const IMAGE_SLICE_SYNC_NAME = 'IMAGE_SLICE_SYNC';
|
|
7687
7530
|
function toggleImageSliceSync({
|
|
@@ -7872,6 +7715,201 @@ var useSynchronizersStore = __webpack_require__(68578);
|
|
|
7872
7715
|
|
|
7873
7716
|
|
|
7874
7717
|
|
|
7718
|
+
// EXTERNAL MODULE: ../../../node_modules/html2canvas/dist/html2canvas.esm.js
|
|
7719
|
+
var html2canvas_esm = __webpack_require__(91037);
|
|
7720
|
+
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/CornerstoneViewportDownloadForm.tsx
|
|
7721
|
+
|
|
7722
|
+
|
|
7723
|
+
|
|
7724
|
+
|
|
7725
|
+
|
|
7726
|
+
|
|
7727
|
+
const DEFAULT_SIZE = 512;
|
|
7728
|
+
const CornerstoneViewportDownloadForm_MAX_TEXTURE_SIZE = 10000;
|
|
7729
|
+
const VIEWPORT_ID = 'cornerstone-viewport-download-form';
|
|
7730
|
+
const FILE_TYPE_OPTIONS = [{
|
|
7731
|
+
value: 'jpg',
|
|
7732
|
+
label: 'JPG'
|
|
7733
|
+
}, {
|
|
7734
|
+
value: 'png',
|
|
7735
|
+
label: 'PNG'
|
|
7736
|
+
}];
|
|
7737
|
+
const CornerstoneViewportDownloadForm = ({
|
|
7738
|
+
hide,
|
|
7739
|
+
activeViewportId: activeViewportIdProp
|
|
7740
|
+
}) => {
|
|
7741
|
+
const {
|
|
7742
|
+
servicesManager
|
|
7743
|
+
} = (0,src/* useSystem */.Jg)();
|
|
7744
|
+
const {
|
|
7745
|
+
customizationService,
|
|
7746
|
+
cornerstoneViewportService
|
|
7747
|
+
} = servicesManager.services;
|
|
7748
|
+
const [showAnnotations, setShowAnnotations] = (0,react.useState)(true);
|
|
7749
|
+
const [viewportDimensions, setViewportDimensions] = (0,react.useState)({
|
|
7750
|
+
width: DEFAULT_SIZE,
|
|
7751
|
+
height: DEFAULT_SIZE
|
|
7752
|
+
});
|
|
7753
|
+
const warningState = customizationService.getCustomization('viewportDownload.warningMessage');
|
|
7754
|
+
const refViewportEnabledElementOHIF = (0,state/* getEnabledElement */.kJ)(activeViewportIdProp);
|
|
7755
|
+
const activeViewportElement = refViewportEnabledElementOHIF?.element;
|
|
7756
|
+
const {
|
|
7757
|
+
viewportId: activeViewportId,
|
|
7758
|
+
renderingEngineId
|
|
7759
|
+
} = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7760
|
+
const renderingEngine = cornerstoneViewportService.getRenderingEngine();
|
|
7761
|
+
const toolGroup = dist_esm.ToolGroupManager.getToolGroupForViewport(activeViewportId, renderingEngineId);
|
|
7762
|
+
(0,react.useEffect)(() => {
|
|
7763
|
+
const toolModeAndBindings = Object.keys(toolGroup.toolOptions).reduce((acc, toolName) => {
|
|
7764
|
+
const tool = toolGroup.toolOptions[toolName];
|
|
7765
|
+
const {
|
|
7766
|
+
mode,
|
|
7767
|
+
bindings
|
|
7768
|
+
} = tool;
|
|
7769
|
+
return {
|
|
7770
|
+
...acc,
|
|
7771
|
+
[toolName]: {
|
|
7772
|
+
mode,
|
|
7773
|
+
bindings
|
|
7774
|
+
}
|
|
7775
|
+
};
|
|
7776
|
+
}, {});
|
|
7777
|
+
return () => {
|
|
7778
|
+
Object.keys(toolModeAndBindings).forEach(toolName => {
|
|
7779
|
+
const {
|
|
7780
|
+
mode,
|
|
7781
|
+
bindings
|
|
7782
|
+
} = toolModeAndBindings[toolName];
|
|
7783
|
+
toolGroup.setToolMode(toolName, mode, {
|
|
7784
|
+
bindings
|
|
7785
|
+
});
|
|
7786
|
+
});
|
|
7787
|
+
};
|
|
7788
|
+
}, []);
|
|
7789
|
+
const handleEnableViewport = viewportElement => {
|
|
7790
|
+
if (!viewportElement) {
|
|
7791
|
+
return;
|
|
7792
|
+
}
|
|
7793
|
+
const {
|
|
7794
|
+
viewport
|
|
7795
|
+
} = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7796
|
+
const viewportInput = {
|
|
7797
|
+
viewportId: VIEWPORT_ID,
|
|
7798
|
+
element: viewportElement,
|
|
7799
|
+
type: viewport.type,
|
|
7800
|
+
defaultOptions: {
|
|
7801
|
+
background: viewport.defaultOptions.background,
|
|
7802
|
+
orientation: viewport.defaultOptions.orientation
|
|
7803
|
+
}
|
|
7804
|
+
};
|
|
7805
|
+
renderingEngine.enableElement(viewportInput);
|
|
7806
|
+
};
|
|
7807
|
+
const handleDisableViewport = async () => {
|
|
7808
|
+
renderingEngine.disableElement(VIEWPORT_ID);
|
|
7809
|
+
};
|
|
7810
|
+
const handleLoadImage = async (width, height) => {
|
|
7811
|
+
if (!activeViewportElement) {
|
|
7812
|
+
return;
|
|
7813
|
+
}
|
|
7814
|
+
const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7815
|
+
if (!activeViewportEnabledElement) {
|
|
7816
|
+
return;
|
|
7817
|
+
}
|
|
7818
|
+
const {
|
|
7819
|
+
viewport
|
|
7820
|
+
} = activeViewportEnabledElement;
|
|
7821
|
+
const downloadViewport = renderingEngine.getViewport(VIEWPORT_ID);
|
|
7822
|
+
try {
|
|
7823
|
+
if (downloadViewport instanceof esm.StackViewport) {
|
|
7824
|
+
const imageId = viewport.getCurrentImageId();
|
|
7825
|
+
const properties = viewport.getProperties();
|
|
7826
|
+
await downloadViewport.setStack([imageId]);
|
|
7827
|
+
downloadViewport.setProperties(properties);
|
|
7828
|
+
return {
|
|
7829
|
+
width: Math.min(width || DEFAULT_SIZE, CornerstoneViewportDownloadForm_MAX_TEXTURE_SIZE),
|
|
7830
|
+
height: Math.min(height || DEFAULT_SIZE, CornerstoneViewportDownloadForm_MAX_TEXTURE_SIZE)
|
|
7831
|
+
};
|
|
7832
|
+
} else if (downloadViewport instanceof esm.BaseVolumeViewport) {
|
|
7833
|
+
const volumeIds = viewport.getAllVolumeIds();
|
|
7834
|
+
downloadViewport.setVolumes([{
|
|
7835
|
+
volumeId: volumeIds[0]
|
|
7836
|
+
}]);
|
|
7837
|
+
return {
|
|
7838
|
+
width: Math.min(width || DEFAULT_SIZE, CornerstoneViewportDownloadForm_MAX_TEXTURE_SIZE),
|
|
7839
|
+
height: Math.min(height || DEFAULT_SIZE, CornerstoneViewportDownloadForm_MAX_TEXTURE_SIZE)
|
|
7840
|
+
};
|
|
7841
|
+
}
|
|
7842
|
+
} catch (error) {
|
|
7843
|
+
console.error('Error loading image:', error);
|
|
7844
|
+
}
|
|
7845
|
+
};
|
|
7846
|
+
const handleToggleAnnotations = show => {
|
|
7847
|
+
const activeViewportEnabledElement = (0,esm.getEnabledElement)(activeViewportElement);
|
|
7848
|
+
if (!activeViewportEnabledElement) {
|
|
7849
|
+
return;
|
|
7850
|
+
}
|
|
7851
|
+
const downloadViewport = renderingEngine.getViewport(VIEWPORT_ID);
|
|
7852
|
+
if (!downloadViewport) {
|
|
7853
|
+
return;
|
|
7854
|
+
}
|
|
7855
|
+
const {
|
|
7856
|
+
viewportId: activeViewportId,
|
|
7857
|
+
renderingEngineId
|
|
7858
|
+
} = activeViewportEnabledElement;
|
|
7859
|
+
const {
|
|
7860
|
+
id: downloadViewportId
|
|
7861
|
+
} = downloadViewport;
|
|
7862
|
+
const toolGroup = dist_esm.ToolGroupManager.getToolGroupForViewport(activeViewportId, renderingEngineId);
|
|
7863
|
+
toolGroup.addViewport(downloadViewportId, renderingEngineId);
|
|
7864
|
+
Object.keys(toolGroup.getToolInstances()).forEach(toolName => {
|
|
7865
|
+
if (show && toolName !== 'Crosshairs') {
|
|
7866
|
+
try {
|
|
7867
|
+
toolGroup.setToolEnabled(toolName);
|
|
7868
|
+
} catch (error) {
|
|
7869
|
+
console.debug('Error enabling tool:', error);
|
|
7870
|
+
}
|
|
7871
|
+
} else {
|
|
7872
|
+
toolGroup.setToolDisabled(toolName);
|
|
7873
|
+
}
|
|
7874
|
+
});
|
|
7875
|
+
};
|
|
7876
|
+
(0,react.useEffect)(() => {
|
|
7877
|
+
if (viewportDimensions.width && viewportDimensions.height) {
|
|
7878
|
+
setTimeout(() => {
|
|
7879
|
+
handleLoadImage(viewportDimensions.width, viewportDimensions.height);
|
|
7880
|
+
handleToggleAnnotations(showAnnotations);
|
|
7881
|
+
}, 100);
|
|
7882
|
+
}
|
|
7883
|
+
}, [viewportDimensions, showAnnotations]);
|
|
7884
|
+
const handleDownload = async (filename, fileType) => {
|
|
7885
|
+
const divForDownloadViewport = document.querySelector(`div[data-viewport-uid="${VIEWPORT_ID}"]`);
|
|
7886
|
+
if (!divForDownloadViewport) {
|
|
7887
|
+
console.debug('No viewport found for download');
|
|
7888
|
+
return;
|
|
7889
|
+
}
|
|
7890
|
+
const canvas = await (0,html2canvas_esm/* default */.A)(divForDownloadViewport);
|
|
7891
|
+
const link = document.createElement('a');
|
|
7892
|
+
link.download = `${filename}.${fileType}`;
|
|
7893
|
+
link.href = canvas.toDataURL(`image/${fileType}`, 1.0);
|
|
7894
|
+
link.click();
|
|
7895
|
+
};
|
|
7896
|
+
const ViewportDownloadFormNew = customizationService.getCustomization('ohif.captureViewportModal');
|
|
7897
|
+
return /*#__PURE__*/react.createElement(ViewportDownloadFormNew, {
|
|
7898
|
+
onClose: hide,
|
|
7899
|
+
defaultSize: DEFAULT_SIZE,
|
|
7900
|
+
fileTypeOptions: FILE_TYPE_OPTIONS,
|
|
7901
|
+
viewportId: VIEWPORT_ID,
|
|
7902
|
+
showAnnotations: showAnnotations,
|
|
7903
|
+
onAnnotationsChange: setShowAnnotations,
|
|
7904
|
+
dimensions: viewportDimensions,
|
|
7905
|
+
onDimensionsChange: setViewportDimensions,
|
|
7906
|
+
onEnableViewport: handleEnableViewport,
|
|
7907
|
+
onDisableViewport: handleDisableViewport,
|
|
7908
|
+
onDownload: handleDownload,
|
|
7909
|
+
warningState: warningState
|
|
7910
|
+
});
|
|
7911
|
+
};
|
|
7912
|
+
/* harmony default export */ const utils_CornerstoneViewportDownloadForm = (CornerstoneViewportDownloadForm);
|
|
7875
7913
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/commandsModule.ts
|
|
7876
7914
|
|
|
7877
7915
|
|
|
@@ -8059,20 +8097,58 @@ function commandsModule({
|
|
|
8059
8097
|
}
|
|
8060
8098
|
},
|
|
8061
8099
|
/**
|
|
8062
|
-
*
|
|
8063
|
-
*
|
|
8100
|
+
* Common logic for handling measurement label updates through dialog
|
|
8101
|
+
* @param uid - measurement uid
|
|
8102
|
+
* @returns Promise that resolves when the label is updated
|
|
8064
8103
|
*/
|
|
8065
|
-
|
|
8066
|
-
uid
|
|
8067
|
-
}) => {
|
|
8104
|
+
_handleMeasurementLabelDialog: async uid => {
|
|
8068
8105
|
const labelConfig = customizationService.getCustomization('measurementLabels');
|
|
8069
8106
|
const renderContent = customizationService.getCustomization('ui.labellingComponent');
|
|
8070
8107
|
const measurement = measurementService.getMeasurement(uid);
|
|
8071
|
-
(
|
|
8108
|
+
if (!measurement) {
|
|
8109
|
+
console.debug('No measurement found for label editing');
|
|
8110
|
+
return;
|
|
8111
|
+
}
|
|
8112
|
+
if (!labelConfig) {
|
|
8113
|
+
const label = await (0,default_src.callInputDialog)({
|
|
8114
|
+
uiDialogService,
|
|
8115
|
+
title: 'Edit Measurement Label',
|
|
8116
|
+
placeholder: measurement.label || 'Enter new label',
|
|
8117
|
+
defaultValue: measurement.label
|
|
8118
|
+
});
|
|
8119
|
+
if (label !== undefined && label !== null) {
|
|
8120
|
+
measurementService.update(uid, {
|
|
8121
|
+
...measurement,
|
|
8122
|
+
label
|
|
8123
|
+
}, true);
|
|
8124
|
+
}
|
|
8125
|
+
return;
|
|
8126
|
+
}
|
|
8127
|
+
const val = await (0,default_src.callInputDialogAutoComplete)({
|
|
8128
|
+
measurement,
|
|
8129
|
+
uiDialogService,
|
|
8130
|
+
labelConfig,
|
|
8131
|
+
renderContent
|
|
8132
|
+
});
|
|
8133
|
+
if (val !== undefined && val !== null) {
|
|
8072
8134
|
measurementService.update(uid, {
|
|
8073
8135
|
...val
|
|
8074
8136
|
}, true);
|
|
8075
|
-
}
|
|
8137
|
+
}
|
|
8138
|
+
},
|
|
8139
|
+
/**
|
|
8140
|
+
* Show the measurement labelling input dialog and update the label
|
|
8141
|
+
* on the measurement with a response if not cancelled.
|
|
8142
|
+
*/
|
|
8143
|
+
setMeasurementLabel: async ({
|
|
8144
|
+
uid
|
|
8145
|
+
}) => {
|
|
8146
|
+
await actions._handleMeasurementLabelDialog(uid);
|
|
8147
|
+
},
|
|
8148
|
+
renameMeasurement: async ({
|
|
8149
|
+
uid
|
|
8150
|
+
}) => {
|
|
8151
|
+
await actions._handleMeasurementLabelDialog(uid);
|
|
8076
8152
|
},
|
|
8077
8153
|
/**
|
|
8078
8154
|
*
|
|
@@ -8180,18 +8256,6 @@ function commandsModule({
|
|
|
8180
8256
|
}) => {
|
|
8181
8257
|
measurementService.remove(uid);
|
|
8182
8258
|
},
|
|
8183
|
-
renameMeasurement: ({
|
|
8184
|
-
uid
|
|
8185
|
-
}) => {
|
|
8186
|
-
const labelConfig = customizationService.getCustomization('measurementLabels');
|
|
8187
|
-
const renderContent = customizationService.getCustomization('ui.labellingComponent');
|
|
8188
|
-
const measurement = measurementService.getMeasurement(uid);
|
|
8189
|
-
(0,default_src.showLabelAnnotationPopup)(measurement, uiDialogService, labelConfig, renderContent).then(val => {
|
|
8190
|
-
measurementService.update(uid, {
|
|
8191
|
-
...val
|
|
8192
|
-
}, true);
|
|
8193
|
-
});
|
|
8194
|
-
},
|
|
8195
8259
|
toggleLockMeasurement: ({
|
|
8196
8260
|
uid
|
|
8197
8261
|
}) => {
|
|
@@ -8232,13 +8296,11 @@ function commandsModule({
|
|
|
8232
8296
|
viewportGridService.setActiveViewportId(viewportId);
|
|
8233
8297
|
},
|
|
8234
8298
|
arrowTextCallback: ({
|
|
8235
|
-
callback
|
|
8236
|
-
data,
|
|
8237
|
-
uid
|
|
8299
|
+
callback
|
|
8238
8300
|
}) => {
|
|
8239
8301
|
const labelConfig = customizationService.getCustomization('measurementLabels');
|
|
8240
8302
|
const renderContent = customizationService.getCustomization('ui.labellingComponent');
|
|
8241
|
-
(0,default_src.
|
|
8303
|
+
(0,default_src.callInputDialogAutoComplete)(uiDialogService, callback, {}, labelConfig, renderContent);
|
|
8242
8304
|
},
|
|
8243
8305
|
toggleCine: () => {
|
|
8244
8306
|
const {
|
|
@@ -8443,6 +8505,7 @@ function commandsModule({
|
|
|
8443
8505
|
}]
|
|
8444
8506
|
});
|
|
8445
8507
|
},
|
|
8508
|
+
// capture viewport
|
|
8446
8509
|
showDownloadViewportModal: () => {
|
|
8447
8510
|
const {
|
|
8448
8511
|
activeViewportId
|
|
@@ -8465,10 +8528,9 @@ function commandsModule({
|
|
|
8465
8528
|
title: 'Download High Quality Image',
|
|
8466
8529
|
contentProps: {
|
|
8467
8530
|
activeViewportId,
|
|
8468
|
-
onClose: uiModalService.hide,
|
|
8469
8531
|
cornerstoneViewportService
|
|
8470
8532
|
},
|
|
8471
|
-
|
|
8533
|
+
containerClassName: 'max-w-4xl p-4'
|
|
8472
8534
|
});
|
|
8473
8535
|
}
|
|
8474
8536
|
},
|
|
@@ -9080,12 +9142,10 @@ function commandsModule({
|
|
|
9080
9142
|
segmentationService,
|
|
9081
9143
|
viewportGridService
|
|
9082
9144
|
} = servicesManager.services;
|
|
9083
|
-
const datasources = extensionManager.getActiveDataSource();
|
|
9084
9145
|
const displaySetInstanceUIDs = await (0,default_src.createReportAsync)({
|
|
9085
9146
|
servicesManager,
|
|
9086
9147
|
getReport: () => commandsManager.runCommand('storeSegmentation', {
|
|
9087
|
-
segmentationId
|
|
9088
|
-
dataSource: datasources[0]
|
|
9148
|
+
segmentationId
|
|
9089
9149
|
}),
|
|
9090
9150
|
reportType: 'Segmentation'
|
|
9091
9151
|
});
|
|
@@ -9273,7 +9333,7 @@ function commandsModule({
|
|
|
9273
9333
|
fillAlphaInactive: value
|
|
9274
9334
|
});
|
|
9275
9335
|
},
|
|
9276
|
-
editSegmentLabel: ({
|
|
9336
|
+
editSegmentLabel: async ({
|
|
9277
9337
|
segmentationId,
|
|
9278
9338
|
segmentIndex
|
|
9279
9339
|
}) => {
|
|
@@ -9286,18 +9346,13 @@ function commandsModule({
|
|
|
9286
9346
|
return;
|
|
9287
9347
|
}
|
|
9288
9348
|
const segment = segmentation.segments[segmentIndex];
|
|
9289
|
-
|
|
9290
|
-
|
|
9291
|
-
|
|
9292
|
-
|
|
9293
|
-
|
|
9294
|
-
|
|
9295
|
-
}
|
|
9349
|
+
(0,default_src.callInputDialog)({
|
|
9350
|
+
uiDialogService,
|
|
9351
|
+
title: 'Edit Segment Label',
|
|
9352
|
+
placeholder: 'Enter new label',
|
|
9353
|
+
defaultValue: segment.label
|
|
9354
|
+
}).then(label => {
|
|
9296
9355
|
segmentationService.setSegmentLabel(segmentationId, segmentIndex, label);
|
|
9297
|
-
};
|
|
9298
|
-
(0,default_src.callInputDialog)(uiDialogService, label, callback, false, {
|
|
9299
|
-
dialogTitle: 'Edit Segment Label',
|
|
9300
|
-
inputLabel: 'Enter new label'
|
|
9301
9356
|
});
|
|
9302
9357
|
},
|
|
9303
9358
|
editSegmentationLabel: ({
|
|
@@ -9314,18 +9369,16 @@ function commandsModule({
|
|
|
9314
9369
|
const {
|
|
9315
9370
|
label
|
|
9316
9371
|
} = segmentation;
|
|
9317
|
-
|
|
9318
|
-
|
|
9319
|
-
|
|
9320
|
-
|
|
9372
|
+
(0,default_src.callInputDialog)({
|
|
9373
|
+
uiDialogService,
|
|
9374
|
+
title: 'Edit Segmentation Label',
|
|
9375
|
+
placeholder: 'Enter new label',
|
|
9376
|
+
defaultValue: label
|
|
9377
|
+
}).then(label => {
|
|
9321
9378
|
segmentationService.addOrUpdateSegmentation({
|
|
9322
9379
|
segmentationId,
|
|
9323
9380
|
label
|
|
9324
9381
|
});
|
|
9325
|
-
};
|
|
9326
|
-
(0,default_src.callInputDialog)(uiDialogService, label, callback, false, {
|
|
9327
|
-
dialogTitle: 'Edit Segmentation Label',
|
|
9328
|
-
inputLabel: 'Enter new label'
|
|
9329
9382
|
});
|
|
9330
9383
|
},
|
|
9331
9384
|
editSegmentColor: ({
|
|
@@ -9345,12 +9398,16 @@ function commandsModule({
|
|
|
9345
9398
|
b: color[2],
|
|
9346
9399
|
a: color[3] / 255.0
|
|
9347
9400
|
};
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9401
|
+
uiDialogService.show({
|
|
9402
|
+
content: default_src.colorPickerDialog,
|
|
9403
|
+
title: 'Segment Color',
|
|
9404
|
+
contentProps: {
|
|
9405
|
+
value: rgbaColor,
|
|
9406
|
+
onSave: newRgbaColor => {
|
|
9407
|
+
const color = [newRgbaColor.r, newRgbaColor.g, newRgbaColor.b, newRgbaColor.a * 255.0];
|
|
9408
|
+
segmentationService.setSegmentColor(viewportId, segmentationId, segmentIndex, color);
|
|
9409
|
+
}
|
|
9351
9410
|
}
|
|
9352
|
-
const color = [newRgbaColor.r, newRgbaColor.g, newRgbaColor.b, newRgbaColor.a * 255.0];
|
|
9353
|
-
segmentationService.setSegmentColor(viewportId, segmentationId, segmentIndex, color);
|
|
9354
9411
|
});
|
|
9355
9412
|
},
|
|
9356
9413
|
getRenderInactiveSegmentations: () => {
|
|
@@ -9402,6 +9459,9 @@ function commandsModule({
|
|
|
9402
9459
|
setMeasurementLabel: {
|
|
9403
9460
|
commandFn: actions.setMeasurementLabel
|
|
9404
9461
|
},
|
|
9462
|
+
renameMeasurement: {
|
|
9463
|
+
commandFn: actions.renameMeasurement
|
|
9464
|
+
},
|
|
9405
9465
|
updateMeasurement: {
|
|
9406
9466
|
commandFn: actions.updateMeasurement
|
|
9407
9467
|
},
|
|
@@ -9414,9 +9474,6 @@ function commandsModule({
|
|
|
9414
9474
|
removeMeasurement: {
|
|
9415
9475
|
commandFn: actions.removeMeasurement
|
|
9416
9476
|
},
|
|
9417
|
-
renameMeasurement: {
|
|
9418
|
-
commandFn: actions.renameMeasurement
|
|
9419
|
-
},
|
|
9420
9477
|
toggleLockMeasurement: {
|
|
9421
9478
|
commandFn: actions.toggleLockMeasurement
|
|
9422
9479
|
},
|
|
@@ -12655,8 +12712,8 @@ var updateLabelmapSegmentationImageReferences = __webpack_require__(78231);
|
|
|
12655
12712
|
var triggerSegmentationEvents = __webpack_require__(49906);
|
|
12656
12713
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/helpers/convertStackToVolumeLabelmap.js
|
|
12657
12714
|
var convertStackToVolumeLabelmap = __webpack_require__(6273);
|
|
12658
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js +
|
|
12659
|
-
var stateManagement_segmentation = __webpack_require__(
|
|
12715
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/index.js + 8 modules
|
|
12716
|
+
var stateManagement_segmentation = __webpack_require__(44595);
|
|
12660
12717
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts
|
|
12661
12718
|
var _SegmentationService;
|
|
12662
12719
|
|
|
@@ -16104,6 +16161,7 @@ function src_extends() { return src_extends = Object.assign ? Object.assign.bind
|
|
|
16104
16161
|
|
|
16105
16162
|
|
|
16106
16163
|
|
|
16164
|
+
|
|
16107
16165
|
|
|
16108
16166
|
|
|
16109
16167
|
const {
|
|
@@ -16278,7 +16336,7 @@ const cornerstoneExtension = {
|
|
|
16278
16336
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16279
16337
|
/* harmony export */ });
|
|
16280
16338
|
/* harmony import */ var _ohif_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5058);
|
|
16281
|
-
/* harmony import */ var _ohif_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
16339
|
+
/* harmony import */ var _ohif_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61533);
|
|
16282
16340
|
var _ViewportActionCornersService;
|
|
16283
16341
|
|
|
16284
16342
|
|
|
@@ -16351,8 +16409,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
16351
16409
|
var src = __webpack_require__(5058);
|
|
16352
16410
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js
|
|
16353
16411
|
var esm = __webpack_require__(81985);
|
|
16354
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
|
|
16355
|
-
var dist_esm = __webpack_require__(
|
|
16412
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/index.js
|
|
16413
|
+
var dist_esm = __webpack_require__(4667);
|
|
16356
16414
|
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/services/ViewportService/constants.ts
|
|
16357
16415
|
var constants = __webpack_require__(47294);
|
|
16358
16416
|
;// CONCATENATED MODULE: ../../../extensions/cornerstone/src/utils/getCornerstoneBlendMode.ts
|