@ohif/app 3.12.0-beta.99 → 3.12.1
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/{1403.bundle.94a178e2572f1f0b2a2c.js → 1403.bundle.761239eb886a88301851.js} +37 -37
- package/dist/{1459.bundle.3785cdd0abf449adebf1.js → 1459.bundle.fcdd0dec6286845179bf.js} +5 -6
- package/dist/{147.bundle.205350dc3d21478277b1.js → 147.bundle.47af018b91121924a12c.js} +10 -18
- package/dist/{1608.bundle.f855c4bdb7f00eb66fca.js → 1608.bundle.b9abbf4ed6cc2e491dc3.js} +10 -10
- package/dist/{1730.bundle.37c569ae3ed057b69840.js → 1730.bundle.51e69967a025226592cd.js} +41 -40
- package/dist/{1927.bundle.019331c266d306772371.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
- package/dist/{1933.bundle.ab5e8036f6e1c854c965.js → 1933.bundle.e3ba7d4dcbbd75701d8e.js} +19 -17
- package/dist/{2018.bundle.469f9ad42597b6b29ff1.js → 2018.bundle.45c44470b4b098aa343f.js} +65 -66
- package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.aea8d3b39486dd5ab39e.js} +569 -558
- package/dist/{213.bundle.398730bb3ceb1af54413.js → 213.bundle.863ab5d320fc06043a4e.js} +5 -7
- package/dist/{3584.bundle.839a16d349815b3f7c97.js → 2199.bundle.974037f21bfd12c4e8af.js} +256 -2236
- package/dist/{2424.bundle.be90e7bcf0fd8db68b2f.js → 2424.bundle.b070e83baf101dad2121.js} +5 -7
- package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
- package/dist/{2701.bundle.aca0d4f24a6f2094c3c3.js → 2701.bundle.58a6a580073edbb4cc04.js} +9 -9
- package/dist/{2842.bundle.7852a204d3510fca8b27.js → 2816.bundle.838fa4d72921c026083c.js} +1136 -2342
- package/dist/{9195.bundle.e2fd5c6b5830c0ee25a8.js → 2851.bundle.70227d013c1937e846be.js} +318 -150
- package/dist/{1903.bundle.dc5248f7cb6ba1dc1072.js → 3081.bundle.930757b1a5aa8549e112.js} +752 -466
- package/dist/{3343.bundle.f8fe9316b0ff68d087f7.js → 3343.bundle.a4424b8418b8c0c1a9e4.js} +27 -25
- package/dist/{3461.bundle.50c752c623f39cf6c457.js → 3461.bundle.ab31c31a5ddc4baa72f7.js} +40 -40
- package/dist/{4202.bundle.790706560c6edb303476.js → 4202.bundle.4f76d3a50d6cf819fba0.js} +6 -6
- package/dist/{4019.bundle.01f63d5dd5b96ded0c00.js → 4287.bundle.87e14e648f2bce5e4176.js} +372 -567
- package/dist/{4775.bundle.d7f0645419f1df8e00b8.js → 4775.bundle.768f00df706f506f3789.js} +57 -51
- package/dist/{4819.bundle.ef1151f023b3784bc1be.js → 4819.bundle.6377aba4cf194120e7d4.js} +35 -34
- package/dist/{5028.bundle.b3611b7c7422a5c2e723.js → 5028.bundle.3a086ff61ec8dc1da4b1.js} +13 -15
- package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
- package/dist/{5457.bundle.9f2eb65ad85fcbb75e27.js → 5457.bundle.0063531ed24c06fba48b.js} +16 -23
- package/dist/{5462.bundle.a81a691eeef782ab95b9.js → 5462.bundle.d5bb9b3ddc510fea141f.js} +1108 -1030
- package/dist/{5485.bundle.71041ca4bc9e6ab57d92.js → 5485.bundle.b523d7015979fc641f7e.js} +17 -32
- package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
- package/dist/5724.bundle.62ea5c07c7809ab4cd74.js +297 -0
- package/dist/5724.css +2 -0
- package/dist/{5802.bundle.28ab859d9b48a5b2c31c.js → 5802.bundle.ae4d88742c353de462c2.js} +13 -18
- package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
- package/dist/{5858.bundle.d5f4bf849aaeebf5025c.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
- package/dist/{6027.bundle.160bd47ea03784276275.js → 6027.bundle.3cf6c827b4ce9066b426.js} +3 -5
- package/dist/{6163.bundle.1f096bdbe3a341c1710d.js → 6163.bundle.ac77880c970e788c9a07.js} +33 -33
- package/dist/{5549.bundle.d5def6a3124a3a481b7c.js → 6280.bundle.f22f9955eb906e1d7da8.js} +2475 -1200
- package/dist/{3353.bundle.a0f1654c642395bbbbbc.js → 6347.bundle.f8393c20d5159ed41b64.js} +358 -214
- package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
- package/dist/{6376.bundle.272e755bdcbb5615a44e.js → 6376.bundle.527820a5cb1eece2a8d2.js} +6 -6
- package/dist/{5400.bundle.de97508611da1c00d58a.js → 6409.bundle.24edbaa283b7c521b8f7.js} +517 -146
- package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
- package/dist/7159.bundle.a5991a5d4f0dd8f1c95f.js +3 -3
- package/dist/{7190.bundle.d731ae6cf6e933a2c408.js → 7190.bundle.479332d662ffe08d1f92.js} +1462 -955
- package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
- package/dist/{7431.bundle.999b2b65d4973bc56218.js → 7431.bundle.b31ebb4a2625e89d864e.js} +38 -32
- package/dist/{7639.bundle.e004d734044049fe8fe9.js → 7639.bundle.0147cdd1c23858221b62.js} +27 -25
- package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
- package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
- package/dist/{8305.bundle.ba43ed23edea2bf394b3.js → 8305.bundle.565339762503b9ae4f59.js} +57 -41
- package/dist/{85.bundle.a16e254910c60223df19.js → 85.bundle.b2365b2e4c3c6935f453.js} +3 -5
- package/dist/{8558.bundle.463ddb34a619cf47493e.js → 8558.bundle.9af6d13a22ddb44ea766.js} +60 -32
- package/dist/{8583.bundle.59c239cf891c2e10bf10.js → 8583.bundle.f51188077125da303398.js} +42 -39
- package/dist/{5448.bundle.9a36e001169ea3bfeb6c.js → 8665.bundle.dc56c125411422f9f686.js} +3753 -1424
- package/dist/{7412.bundle.aec4834a71fc27c4ce06.js → 9205.bundle.2a2f38a4ee23647f5fa4.js} +3413 -1271
- package/dist/{9845.bundle.31aec3fe7a5cdc247f4e.js → 9845.bundle.31f3e7e2d28fa6033ee5.js} +22 -14
- package/dist/{9862.bundle.3ca0ad5f54db87ccf91e.js → 9862.bundle.73ea2a7703bf1bb96275.js} +8 -6
- package/dist/{9927.bundle.f421cd167be94a7109f6.js → 9927.bundle.af31e6ce5cac195607fd.js} +19 -21
- package/dist/app-config.js +12 -0
- package/dist/{app.bundle.7df5bc1cd812bd602686.js → app.bundle.b2817894afde20b59bdb.js} +67903 -63389
- package/dist/app.bundle.css +1 -1
- package/dist/{compute.bundle.fdee4a0f193ee2e1b6da.js → compute.bundle.73440405025831e0e072.js} +10 -22
- package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js +3254 -1792
- package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.map +1 -1
- package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.1938b79f9d6db363528a.js → interpolation.bundle.7554483d97f6119414f9.js} +14 -26
- package/dist/{polySeg.bundle.11f9746cd60c9811a412.js → polySeg.bundle.6373e24bd578ae0d41eb.js} +8 -20
- package/dist/sw.js +1 -1
- package/package.json +24 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[3081],{
|
|
3
3
|
|
|
4
|
-
/***/ 38007
|
|
5
|
-
|
|
4
|
+
/***/ 38007
|
|
5
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
// EXPORTS
|
|
@@ -25,8 +25,8 @@ var useSegmentations = __webpack_require__(73421);
|
|
|
25
25
|
var useViewportSegmentations = __webpack_require__(79063);
|
|
26
26
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
27
27
|
var react = __webpack_require__(86326);
|
|
28
|
-
// EXTERNAL MODULE: ../../ui-next/src/index.ts +
|
|
29
|
-
var src = __webpack_require__(
|
|
28
|
+
// EXTERNAL MODULE: ../../ui-next/src/index.ts + 3075 modules
|
|
29
|
+
var src = __webpack_require__(12517);
|
|
30
30
|
;// ../../../extensions/cornerstone/src/hooks/useViewportHover.ts
|
|
31
31
|
|
|
32
32
|
|
|
@@ -109,15 +109,15 @@ var useViewportRendering = __webpack_require__(47488);
|
|
|
109
109
|
|
|
110
110
|
|
|
111
111
|
|
|
112
|
-
/***/ }
|
|
112
|
+
/***/ },
|
|
113
113
|
|
|
114
|
-
/***/ 9234
|
|
115
|
-
|
|
114
|
+
/***/ 9234
|
|
115
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
116
116
|
|
|
117
117
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
118
118
|
/* harmony export */ c: () => (/* binding */ useActiveViewportSegmentationRepresentations)
|
|
119
119
|
/* harmony export */ });
|
|
120
|
-
/* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
120
|
+
/* harmony import */ var _ohif_ui_next__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12517);
|
|
121
121
|
/* harmony import */ var _useViewportSegmentations__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(79063);
|
|
122
122
|
|
|
123
123
|
|
|
@@ -131,10 +131,10 @@ function useActiveViewportSegmentationRepresentations() {
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
|
|
134
|
-
/***/ }
|
|
134
|
+
/***/ },
|
|
135
135
|
|
|
136
|
-
/***/ 84535
|
|
137
|
-
|
|
136
|
+
/***/ 84535
|
|
137
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
138
138
|
|
|
139
139
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
140
140
|
/* harmony export */ R: () => (/* binding */ useMeasurementTracking)
|
|
@@ -238,10 +238,10 @@ function useMeasurementTracking({
|
|
|
238
238
|
}
|
|
239
239
|
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (useMeasurementTracking)));
|
|
240
240
|
|
|
241
|
-
/***/ }
|
|
241
|
+
/***/ },
|
|
242
242
|
|
|
243
|
-
/***/ 19214
|
|
244
|
-
|
|
243
|
+
/***/ 19214
|
|
244
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
245
245
|
|
|
246
246
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
247
247
|
/* harmony export */ d: () => (/* binding */ useMeasurements)
|
|
@@ -250,6 +250,8 @@ function useMeasurementTracking({
|
|
|
250
250
|
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62051);
|
|
251
251
|
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_1__);
|
|
252
252
|
/* harmony import */ var _ohif_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42356);
|
|
253
|
+
/* harmony import */ var _ohif_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(89010);
|
|
254
|
+
|
|
253
255
|
|
|
254
256
|
|
|
255
257
|
|
|
@@ -268,7 +270,7 @@ function mapMeasurementToDisplay(measurement, displaySetService) {
|
|
|
268
270
|
displayText: baseDisplayText
|
|
269
271
|
} = measurement;
|
|
270
272
|
const firstSite = findingSites?.[0];
|
|
271
|
-
const label = baseLabel || finding?.text || firstSite?.text || '
|
|
273
|
+
const label = baseLabel || finding?.text || firstSite?.text || _ohif_i18n__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A.t('MeasurementTable:empty');
|
|
272
274
|
|
|
273
275
|
// Initialize displayText with the structure used in Length.ts and CobbAngle.ts
|
|
274
276
|
const displayText = {
|
|
@@ -346,10 +348,10 @@ function useMeasurements({
|
|
|
346
348
|
return displayMeasurements;
|
|
347
349
|
}
|
|
348
350
|
|
|
349
|
-
/***/ }
|
|
351
|
+
/***/ },
|
|
350
352
|
|
|
351
|
-
/***/ 73421
|
|
352
|
-
|
|
353
|
+
/***/ 73421
|
|
354
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
353
355
|
|
|
354
356
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
355
357
|
/* harmony export */ j: () => (/* binding */ useSegmentations)
|
|
@@ -481,10 +483,10 @@ function useSegmentations(options) {
|
|
|
481
483
|
return segmentations;
|
|
482
484
|
}
|
|
483
485
|
|
|
484
|
-
/***/ }
|
|
486
|
+
/***/ },
|
|
485
487
|
|
|
486
|
-
/***/ 10225
|
|
487
|
-
|
|
488
|
+
/***/ 10225
|
|
489
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
488
490
|
|
|
489
491
|
|
|
490
492
|
// EXPORTS
|
|
@@ -496,8 +498,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
496
498
|
var react = __webpack_require__(86326);
|
|
497
499
|
// EXTERNAL MODULE: ../../core/src/index.ts + 69 modules
|
|
498
500
|
var src = __webpack_require__(42356);
|
|
499
|
-
// EXTERNAL MODULE: ../../ui-next/src/index.ts +
|
|
500
|
-
var ui_next_src = __webpack_require__(
|
|
501
|
+
// EXTERNAL MODULE: ../../ui-next/src/index.ts + 3075 modules
|
|
502
|
+
var ui_next_src = __webpack_require__(12517);
|
|
501
503
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
502
504
|
var esm = __webpack_require__(15327);
|
|
503
505
|
;// ../../../extensions/cornerstone/src/components/ViewportDataOverlaySettingMenu/utils.ts
|
|
@@ -803,10 +805,10 @@ function useViewportDisplaySets(viewportId, options) {
|
|
|
803
805
|
return result;
|
|
804
806
|
}
|
|
805
807
|
|
|
806
|
-
/***/ }
|
|
808
|
+
/***/ },
|
|
807
809
|
|
|
808
|
-
/***/ 47488
|
|
809
|
-
|
|
810
|
+
/***/ 47488
|
|
811
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
810
812
|
|
|
811
813
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
812
814
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
@@ -1471,10 +1473,10 @@ function getCustomizationData(customizationService) {
|
|
|
1471
1473
|
};
|
|
1472
1474
|
}
|
|
1473
1475
|
|
|
1474
|
-
/***/ }
|
|
1476
|
+
/***/ },
|
|
1475
1477
|
|
|
1476
|
-
/***/ 79063
|
|
1477
|
-
|
|
1478
|
+
/***/ 79063
|
|
1479
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1478
1480
|
|
|
1479
1481
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1480
1482
|
/* harmony export */ L: () => (/* binding */ useViewportSegmentations)
|
|
@@ -1655,74 +1657,36 @@ function useViewportSegmentations({
|
|
|
1655
1657
|
return segmentationsWithRepresentations;
|
|
1656
1658
|
}
|
|
1657
1659
|
|
|
1658
|
-
/***/ }
|
|
1660
|
+
/***/ },
|
|
1659
1661
|
|
|
1660
|
-
/***/
|
|
1661
|
-
|
|
1662
|
+
/***/ 63081
|
|
1663
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1662
1664
|
|
|
1663
|
-
// ESM COMPAT FLAG
|
|
1664
|
-
__webpack_require__.r(__webpack_exports__);
|
|
1665
1665
|
|
|
1666
1666
|
// EXPORTS
|
|
1667
1667
|
__webpack_require__.d(__webpack_exports__, {
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
MeasurementsOrAdditionalFindings: () => (/* reexport */ MeasurementsOrAdditionalFindings),
|
|
1680
|
-
OHIFCornerstoneViewport: () => (/* binding */ OHIFCornerstoneViewport),
|
|
1681
|
-
PanelMeasurement: () => (/* reexport */ PanelMeasurement),
|
|
1682
|
-
PanelSegmentation: () => (/* reexport */ PanelSegmentation),
|
|
1683
|
-
PlanarFreehandROI: () => (/* reexport */ measurementServiceMappings_PlanarFreehandROI),
|
|
1684
|
-
RectangleROI: () => (/* reexport */ measurementServiceMappings_RectangleROI),
|
|
1685
|
-
SeriesMeasurementTrigger: () => (/* reexport */ SeriesMeasurementTrigger),
|
|
1686
|
-
SeriesMeasurements: () => (/* reexport */ SeriesMeasurements),
|
|
1687
|
-
StudyMeasurements: () => (/* reexport */ StudyMeasurements),
|
|
1688
|
-
StudyMeasurementsActions: () => (/* reexport */ StudyMeasurementsActions),
|
|
1689
|
-
StudySummaryFromMetadata: () => (/* reexport */ StudySummaryFromMetadata),
|
|
1690
|
-
Types: () => (/* reexport */ types_namespaceObject),
|
|
1691
|
-
VOLUME_LOADER_SCHEME: () => (/* reexport */ VOLUME_LOADER_SCHEME),
|
|
1692
|
-
VolumeLighting: () => (/* reexport */ VolumeLighting),
|
|
1693
|
-
VolumeRenderingOptions: () => (/* reexport */ VolumeRenderingOptions),
|
|
1694
|
-
VolumeRenderingPresets: () => (/* reexport */ VolumeRenderingPresets),
|
|
1695
|
-
VolumeRenderingQuality: () => (/* reexport */ VolumeRenderingQuality),
|
|
1696
|
-
VolumeShade: () => (/* reexport */ VolumeShade),
|
|
1697
|
-
VolumeShift: () => (/* reexport */ VolumeShift),
|
|
1698
|
-
WindowLevel: () => (/* reexport */ WindowLevel),
|
|
1699
|
-
WindowLevelActionMenu: () => (/* reexport */ WindowLevelActionMenu),
|
|
1700
|
-
WindowLevelActionMenuContent: () => (/* reexport */ WindowLevelActionMenuContent),
|
|
1701
|
-
WindowLevelActionMenuWrapper: () => (/* reexport */ WindowLevelActionMenuWrapper),
|
|
1668
|
+
_I: () => (/* reexport */ AccordionGroup),
|
|
1669
|
+
fX: () => (/* reexport */ enums),
|
|
1670
|
+
CP: () => (/* reexport */ MeasurementsOrAdditionalFindings),
|
|
1671
|
+
R9: () => (/* binding */ OHIFCornerstoneViewport),
|
|
1672
|
+
re: () => (/* reexport */ PanelMeasurement),
|
|
1673
|
+
rE: () => (/* reexport */ PanelSegmentation),
|
|
1674
|
+
V: () => (/* reexport */ SeriesMeasurements),
|
|
1675
|
+
B9: () => (/* reexport */ StudyMeasurements),
|
|
1676
|
+
_9: () => (/* reexport */ StudyMeasurementsActions),
|
|
1677
|
+
x3: () => (/* reexport */ StudySummaryFromMetadata),
|
|
1678
|
+
Rj: () => (/* reexport */ VOLUME_LOADER_SCHEME),
|
|
1702
1679
|
"default": () => (/* binding */ cornerstone_src),
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
groupByNamedSets: () => (/* reexport */ groupByNamedSets),
|
|
1710
|
-
groupByStudy: () => (/* reexport */ groupByStudy),
|
|
1711
|
-
measurementMappingUtils: () => (/* reexport */ utils_namespaceObject),
|
|
1712
|
-
setEnabledElement: () => (/* reexport */ state/* setEnabledElement */.ye),
|
|
1713
|
-
toolNames: () => (/* reexport */ toolNames),
|
|
1714
|
-
useActiveViewportSegmentationRepresentations: () => (/* reexport */ useActiveViewportSegmentationRepresentations/* useActiveViewportSegmentationRepresentations */.c),
|
|
1715
|
-
useLutPresentationStore: () => (/* reexport */ useLutPresentationStore/* useLutPresentationStore */.I),
|
|
1716
|
-
useMeasurementTracking: () => (/* reexport */ useMeasurementTracking/* useMeasurementTracking */.R),
|
|
1717
|
-
useMeasurements: () => (/* reexport */ useMeasurements/* useMeasurements */.d),
|
|
1718
|
-
usePositionPresentationStore: () => (/* reexport */ usePositionPresentationStore/* usePositionPresentationStore */.q),
|
|
1719
|
-
useSegmentationPresentationStore: () => (/* reexport */ useSegmentationPresentationStore/* useSegmentationPresentationStore */.v),
|
|
1720
|
-
useSegmentations: () => (/* reexport */ useSegmentations/* useSegmentations */.j),
|
|
1721
|
-
useSelectedSegmentationsForViewportStore: () => (/* reexport */ useSelectedSegmentationsForViewportStore),
|
|
1722
|
-
useSynchronizersStore: () => (/* reexport */ useSynchronizersStore/* useSynchronizersStore */.U),
|
|
1723
|
-
utils: () => (/* reexport */ src_utils)
|
|
1680
|
+
HA: () => (/* reexport */ utils_dicomLoaderService),
|
|
1681
|
+
J4: () => (/* reexport */ getSOPInstanceAttributes),
|
|
1682
|
+
c3: () => (/* reexport */ useActiveViewportSegmentationRepresentations/* useActiveViewportSegmentationRepresentations */.c),
|
|
1683
|
+
qu: () => (/* reexport */ usePositionPresentationStore/* usePositionPresentationStore */.q),
|
|
1684
|
+
jo: () => (/* reexport */ useSegmentations/* useSegmentations */.j),
|
|
1685
|
+
Wp: () => (/* reexport */ src_utils)
|
|
1724
1686
|
});
|
|
1725
1687
|
|
|
1688
|
+
// UNUSED EXPORTS: CloneChildren, Colorbar, Colormap, CornerstoneViewportDownloadForm, DYNAMIC_VOLUME_LOADER_SCHEME, DicomUpload, ImageOverlayViewerTool, MeasumentsMenu, MeasurementOrAdditionalFindingSets, PlanarFreehandROI, RectangleROI, SeriesMeasurementTrigger, Types, VolumeLighting, VolumeRenderingOptions, VolumeRenderingPresets, VolumeRenderingQuality, VolumeShade, VolumeShift, WindowLevel, WindowLevelActionMenu, WindowLevelActionMenuContent, WindowLevelActionMenuWrapper, findNearbyToolData, getActiveViewportEnabledElement, getEnabledElement, groupByDisplaySet, groupByNamedSets, groupByStudy, measurementMappingUtils, setEnabledElement, toolNames, useLutPresentationStore, useMeasurementTracking, useMeasurements, useSegmentationPresentationStore, useSelectedSegmentationsForViewportStore, useSynchronizersStore
|
|
1689
|
+
|
|
1726
1690
|
// NAMESPACE OBJECT: ../../../extensions/cornerstone/src/enums.ts
|
|
1727
1691
|
var enums_namespaceObject = {};
|
|
1728
1692
|
__webpack_require__.r(enums_namespaceObject);
|
|
@@ -1732,22 +1696,6 @@ __webpack_require__.d(enums_namespaceObject, {
|
|
|
1732
1696
|
Ay: () => (enums)
|
|
1733
1697
|
});
|
|
1734
1698
|
|
|
1735
|
-
// NAMESPACE OBJECT: ../../../extensions/cornerstone/src/utils/measurementServiceMappings/utils/index.ts
|
|
1736
|
-
var utils_namespaceObject = {};
|
|
1737
|
-
__webpack_require__.r(utils_namespaceObject);
|
|
1738
|
-
__webpack_require__.d(utils_namespaceObject, {
|
|
1739
|
-
getDisplayUnit: () => (utils_getDisplayUnit),
|
|
1740
|
-
getFirstAnnotationSelected: () => (getFirstAnnotationSelected),
|
|
1741
|
-
getHandlesFromPoints: () => (getHandlesFromPoints),
|
|
1742
|
-
getSOPInstanceAttributes: () => (getSOPInstanceAttributes),
|
|
1743
|
-
isAnnotationSelected: () => (isAnnotationSelected),
|
|
1744
|
-
setAnnotationSelected: () => (setAnnotationSelected)
|
|
1745
|
-
});
|
|
1746
|
-
|
|
1747
|
-
// NAMESPACE OBJECT: ../../../extensions/cornerstone/src/types/index.ts
|
|
1748
|
-
var types_namespaceObject = {};
|
|
1749
|
-
__webpack_require__.r(types_namespaceObject);
|
|
1750
|
-
|
|
1751
1699
|
// EXTERNAL MODULE: ../../../node_modules/react/index.js
|
|
1752
1700
|
var react = __webpack_require__(86326);
|
|
1753
1701
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
@@ -1808,8 +1756,8 @@ function destroy() {
|
|
|
1808
1756
|
var ai_dist_esm = __webpack_require__(75165);
|
|
1809
1757
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/polymorphic-segmentation/dist/esm/index.js + 14 modules
|
|
1810
1758
|
var polymorphic_segmentation_dist_esm = __webpack_require__(56983);
|
|
1811
|
-
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts +
|
|
1812
|
-
var default_src = __webpack_require__(
|
|
1759
|
+
// EXTERNAL MODULE: ../../../extensions/default/src/index.ts + 140 modules
|
|
1760
|
+
var default_src = __webpack_require__(62851);
|
|
1813
1761
|
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/state.ts
|
|
1814
1762
|
var state = __webpack_require__(71353);
|
|
1815
1763
|
;// ../../../extensions/cornerstone/src/utils/getViewportEnabledElement.ts
|
|
@@ -1911,7 +1859,7 @@ function onCompletedCalibrationLine(servicesManager, csToolsEvent) {
|
|
|
1911
1859
|
reject('UIDialogService is not initiated');
|
|
1912
1860
|
return;
|
|
1913
1861
|
}
|
|
1914
|
-
(0,default_src
|
|
1862
|
+
(0,default_src/* callInputDialog */.l5)({
|
|
1915
1863
|
uiDialogService,
|
|
1916
1864
|
title: 'Calibration',
|
|
1917
1865
|
placeholder: 'Actual Physical distance (mm)',
|
|
@@ -2612,6 +2560,7 @@ function getHandlesFromPoints(points) {
|
|
|
2612
2560
|
}), {});
|
|
2613
2561
|
}
|
|
2614
2562
|
;// ../../../extensions/cornerstone/src/utils/measurementServiceMappings/utils/selection.ts
|
|
2563
|
+
/* unused harmony import specifier */ var cs3dToolAnnotationUtils;
|
|
2615
2564
|
|
|
2616
2565
|
|
|
2617
2566
|
/**
|
|
@@ -2620,7 +2569,7 @@ function getHandlesFromPoints(points) {
|
|
|
2620
2569
|
* @returns boolean
|
|
2621
2570
|
*/
|
|
2622
2571
|
function isAnnotationSelected(annotationUID) {
|
|
2623
|
-
return
|
|
2572
|
+
return cs3dToolAnnotationUtils.selection.isAnnotationSelected(annotationUID);
|
|
2624
2573
|
}
|
|
2625
2574
|
|
|
2626
2575
|
/**
|
|
@@ -2632,7 +2581,7 @@ function setAnnotationSelected(annotationUID, selected) {
|
|
|
2632
2581
|
const isCurrentSelected = isAnnotationSelected(annotationUID);
|
|
2633
2582
|
// branch cut, avoid invoking imaging library unnecessarily.
|
|
2634
2583
|
if (isCurrentSelected !== selected) {
|
|
2635
|
-
|
|
2584
|
+
cs3dToolAnnotationUtils.selection.setAnnotationSelected(annotationUID, selected);
|
|
2636
2585
|
}
|
|
2637
2586
|
}
|
|
2638
2587
|
function getFirstAnnotationSelected(element) {
|
|
@@ -6985,8 +6934,8 @@ var useLutPresentationStore = __webpack_require__(10182);
|
|
|
6985
6934
|
var usePositionPresentationStore = __webpack_require__(44646);
|
|
6986
6935
|
// EXTERNAL MODULE: ../../../extensions/cornerstone/src/stores/useSegmentationPresentationStore.ts + 1 modules
|
|
6987
6936
|
var useSegmentationPresentationStore = __webpack_require__(2847);
|
|
6988
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js +
|
|
6989
|
-
var esm_utilities = __webpack_require__(
|
|
6937
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/utilities/index.js + 47 modules
|
|
6938
|
+
var esm_utilities = __webpack_require__(85343);
|
|
6990
6939
|
;// ../../../extensions/cornerstone/src/utils/initWebWorkerProgressHandler.ts
|
|
6991
6940
|
|
|
6992
6941
|
|
|
@@ -7471,8 +7420,8 @@ function _showCPURenderingModal(uiModalService, hangingProtocolService) {
|
|
|
7471
7420
|
inheritsFrom: 'ohif.overlayItem.instanceNumber'
|
|
7472
7421
|
}]
|
|
7473
7422
|
});
|
|
7474
|
-
// EXTERNAL MODULE: ../../ui-next/src/index.ts +
|
|
7475
|
-
var ui_next_src = __webpack_require__(
|
|
7423
|
+
// EXTERNAL MODULE: ../../ui-next/src/index.ts + 3075 modules
|
|
7424
|
+
var ui_next_src = __webpack_require__(12517);
|
|
7476
7425
|
// EXTERNAL MODULE: ../../../node_modules/react-i18next/dist/es/index.js + 15 modules
|
|
7477
7426
|
var es = __webpack_require__(99993);
|
|
7478
7427
|
;// ../../../extensions/cornerstone/src/components/ExportSegmentationSubMenuItem.tsx
|
|
@@ -7488,7 +7437,7 @@ const ExportSegmentationSubMenuItem = ({
|
|
|
7488
7437
|
}) => {
|
|
7489
7438
|
const {
|
|
7490
7439
|
t
|
|
7491
|
-
} = (0,es/* useTranslation */.Bd)('
|
|
7440
|
+
} = (0,es/* useTranslation */.Bd)('SegmentationPanel');
|
|
7492
7441
|
return /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuSub */.lvB, null, /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuSubTrigger */.nVd, {
|
|
7493
7442
|
className: "pl-1"
|
|
7494
7443
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Export, {
|
|
@@ -7555,7 +7504,7 @@ const CustomDropdownMenuContent = () => {
|
|
|
7555
7504
|
} = (0,src/* useSystem */.Jg)();
|
|
7556
7505
|
const {
|
|
7557
7506
|
t
|
|
7558
|
-
} = (0,es/* useTranslation */.Bd)('
|
|
7507
|
+
} = (0,es/* useTranslation */.Bd)('SegmentationPanel');
|
|
7559
7508
|
const {
|
|
7560
7509
|
onSegmentationAdd,
|
|
7561
7510
|
onSegmentationRemoveFromViewport,
|
|
@@ -7564,7 +7513,7 @@ const CustomDropdownMenuContent = () => {
|
|
|
7564
7513
|
exportOptions,
|
|
7565
7514
|
activeSegmentation,
|
|
7566
7515
|
activeSegmentationId,
|
|
7567
|
-
|
|
7516
|
+
segmentationRepresentationTypes,
|
|
7568
7517
|
disableEditing
|
|
7569
7518
|
} = (0,ui_next_src/* useSegmentationTableContext */.dQ$)('CustomDropdownMenu');
|
|
7570
7519
|
|
|
@@ -7623,7 +7572,7 @@ const CustomDropdownMenuContent = () => {
|
|
|
7623
7572
|
}, !disableEditing && /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuItem */._26, {
|
|
7624
7573
|
onClick: () => onSegmentationAdd({
|
|
7625
7574
|
segmentationId,
|
|
7626
|
-
segmentationRepresentationType
|
|
7575
|
+
segmentationRepresentationType: segmentationRepresentationTypes?.[0]
|
|
7627
7576
|
})
|
|
7628
7577
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Add, {
|
|
7629
7578
|
className: "text-foreground"
|
|
@@ -7643,7 +7592,7 @@ const CustomDropdownMenuContent = () => {
|
|
|
7643
7592
|
className: "pl-2"
|
|
7644
7593
|
}, t('Rename'))), /*#__PURE__*/react.createElement(ExportSegmentationSubMenuItem, {
|
|
7645
7594
|
segmentationId: segmentationId,
|
|
7646
|
-
segmentationRepresentationType:
|
|
7595
|
+
segmentationRepresentationType: segmentationRepresentationTypes?.[0],
|
|
7647
7596
|
allowExport: allowExport,
|
|
7648
7597
|
actions: actions
|
|
7649
7598
|
}), /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuSeparator */.mBJ, null), /*#__PURE__*/react.createElement(ui_next_src/* DropdownMenuItem */._26, {
|
|
@@ -7677,7 +7626,7 @@ const CustomSegmentStatisticsHeader = ({
|
|
|
7677
7626
|
} = servicesManager.services;
|
|
7678
7627
|
const {
|
|
7679
7628
|
t
|
|
7680
|
-
} = (0,es/* useTranslation */.Bd)('
|
|
7629
|
+
} = (0,es/* useTranslation */.Bd)('SegmentationPanel');
|
|
7681
7630
|
const segmentation = segmentationService.getSegmentation(segmentationId);
|
|
7682
7631
|
const segment = segmentation.segments[segmentIndex];
|
|
7683
7632
|
const cachedStats = segment.cachedStats;
|
|
@@ -7770,10 +7719,14 @@ const CustomSegmentStatisticsHeader = ({
|
|
|
7770
7719
|
|
|
7771
7720
|
|
|
7772
7721
|
|
|
7722
|
+
|
|
7773
7723
|
function SegmentationToolConfig() {
|
|
7774
7724
|
const {
|
|
7775
7725
|
commandsManager
|
|
7776
7726
|
} = (0,src/* useSystem */.Jg)();
|
|
7727
|
+
const {
|
|
7728
|
+
t
|
|
7729
|
+
} = (0,es/* useTranslation */.Bd)('SegmentationPanel');
|
|
7777
7730
|
|
|
7778
7731
|
// Get initial states based on current configuration
|
|
7779
7732
|
const [previewEdits, setPreviewEdits] = (0,react.useState)(false);
|
|
@@ -7813,28 +7766,28 @@ function SegmentationToolConfig() {
|
|
|
7813
7766
|
onCheckedChange: handlePreviewEditsChange
|
|
7814
7767
|
}), /*#__PURE__*/react.createElement("span", {
|
|
7815
7768
|
className: "text-foreground text-base"
|
|
7816
|
-
},
|
|
7769
|
+
}, t('Preview edits before creating'))), /*#__PURE__*/react.createElement("div", {
|
|
7817
7770
|
className: "flex items-center gap-2"
|
|
7818
7771
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
|
|
7819
7772
|
checked: useCenterAsSegmentIndex,
|
|
7820
7773
|
onCheckedChange: handleUseCenterAsSegmentIndexChange
|
|
7821
7774
|
}), /*#__PURE__*/react.createElement("span", {
|
|
7822
7775
|
className: "text-foreground text-base"
|
|
7823
|
-
},
|
|
7776
|
+
}, t('Use center as segment index'))), /*#__PURE__*/react.createElement("div", {
|
|
7824
7777
|
className: "flex items-center gap-2"
|
|
7825
7778
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
|
|
7826
7779
|
checked: toggleSegmentEnabled,
|
|
7827
7780
|
onCheckedChange: handleToggleSegmentEnabledChange
|
|
7828
7781
|
}), /*#__PURE__*/react.createElement("span", {
|
|
7829
7782
|
className: "text-foreground text-base"
|
|
7830
|
-
},
|
|
7783
|
+
}, t('Hover on segment border to activate'))), /*#__PURE__*/react.createElement("div", {
|
|
7831
7784
|
className: "flex items-center gap-2"
|
|
7832
7785
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
|
|
7833
7786
|
checked: segmentLabelEnabled,
|
|
7834
7787
|
onCheckedChange: handleSegmentLabelEnabledChange
|
|
7835
7788
|
}), /*#__PURE__*/react.createElement("span", {
|
|
7836
7789
|
className: "text-foreground text-base"
|
|
7837
|
-
},
|
|
7790
|
+
}, t('Show segment name on hover'))));
|
|
7838
7791
|
}
|
|
7839
7792
|
;// ../../../extensions/cornerstone/src/customizations/segmentationPanelCustomization.tsx
|
|
7840
7793
|
|
|
@@ -9100,6 +9053,10 @@ function ViewportDownloadFormNew({
|
|
|
9100
9053
|
})), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.jiK.ImageSize, {
|
|
9101
9054
|
width: dimensions.width.toString(),
|
|
9102
9055
|
height: dimensions.height.toString(),
|
|
9056
|
+
widthLabel: t('Width'),
|
|
9057
|
+
heightLabel: t('Height'),
|
|
9058
|
+
widthPlaceholder: t('Width'),
|
|
9059
|
+
heightPlaceholder: t('Height'),
|
|
9103
9060
|
onWidthChange: e => {
|
|
9104
9061
|
onDimensionsChange({
|
|
9105
9062
|
...dimensions,
|
|
@@ -9114,9 +9071,7 @@ function ViewportDownloadFormNew({
|
|
|
9114
9071
|
},
|
|
9115
9072
|
maxWidth: MAX_TEXTURE_SIZE.toString(),
|
|
9116
9073
|
maxHeight: MAX_TEXTURE_SIZE.toString()
|
|
9117
|
-
}, t('Image size'),
|
|
9118
|
-
className: "text-muted-foreground"
|
|
9119
|
-
}, "px")), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.jiK.SwitchOption, {
|
|
9074
|
+
}, t('Image size in pixels')), /*#__PURE__*/react.createElement(ui_next_src/* ImageModal */.jiK.SwitchOption, {
|
|
9120
9075
|
defaultChecked: showAnnotations,
|
|
9121
9076
|
checked: showAnnotations,
|
|
9122
9077
|
onCheckedChange: onAnnotationsChange
|
|
@@ -9505,9 +9460,14 @@ const CornerstoneViewportDownloadForm = ({
|
|
|
9505
9460
|
mode,
|
|
9506
9461
|
bindings
|
|
9507
9462
|
} = toolModeAndBindings[toolName];
|
|
9508
|
-
|
|
9509
|
-
|
|
9510
|
-
|
|
9463
|
+
try {
|
|
9464
|
+
toolGroup.setToolMode(toolName, mode, {
|
|
9465
|
+
bindings
|
|
9466
|
+
});
|
|
9467
|
+
} catch (error) {
|
|
9468
|
+
// Handle errors when restoring tool mode during cleanup (e.g., when tool state is undefined)
|
|
9469
|
+
console.debug('Error restoring tool mode during cleanup:', toolName, error);
|
|
9470
|
+
}
|
|
9511
9471
|
});
|
|
9512
9472
|
};
|
|
9513
9473
|
}, []);
|
|
@@ -9557,7 +9517,7 @@ const CornerstoneViewportDownloadForm = ({
|
|
|
9557
9517
|
volumeId: volumeIds[0]
|
|
9558
9518
|
}]);
|
|
9559
9519
|
}
|
|
9560
|
-
if (segmentationRepresentations
|
|
9520
|
+
if (segmentationRepresentations?.length) {
|
|
9561
9521
|
segmentationRepresentations.forEach(segRepresentation => {
|
|
9562
9522
|
const {
|
|
9563
9523
|
segmentationId,
|
|
@@ -9638,14 +9598,17 @@ const CornerstoneViewportDownloadForm = ({
|
|
|
9638
9598
|
}, 100);
|
|
9639
9599
|
}
|
|
9640
9600
|
}, [viewportDimensions, showAnnotations]);
|
|
9641
|
-
const handleDownload = async (
|
|
9601
|
+
const handleDownload = async (baseFilename, fileType) => {
|
|
9642
9602
|
const divForDownloadViewport = document.querySelector(`div[data-viewport-uid="${VIEWPORT_ID}"]`);
|
|
9643
9603
|
if (!divForDownloadViewport) {
|
|
9644
9604
|
console.debug('No viewport found for download');
|
|
9645
9605
|
return;
|
|
9646
9606
|
}
|
|
9607
|
+
const filename = `${baseFilename}.${fileType}`;
|
|
9647
9608
|
const canvas = await (0,html2canvas_esm/* default */.A)(divForDownloadViewport);
|
|
9648
|
-
downloadUrl(canvas.toDataURL(`image/${fileType}`, 1.0)
|
|
9609
|
+
downloadUrl(canvas.toDataURL(`image/${fileType}`, 1.0), {
|
|
9610
|
+
filename
|
|
9611
|
+
});
|
|
9649
9612
|
};
|
|
9650
9613
|
const ViewportDownloadFormNew = customizationService.getCustomization('ohif.captureViewportModal');
|
|
9651
9614
|
return /*#__PURE__*/react.createElement(ViewportDownloadFormNew, {
|
|
@@ -9707,6 +9670,11 @@ async function updateSegmentationStats({
|
|
|
9707
9670
|
// Loop through each segment's stats
|
|
9708
9671
|
Object.entries(stats).forEach(([segmentIndex, segmentStats]) => {
|
|
9709
9672
|
const index = parseInt(segmentIndex);
|
|
9673
|
+
if (!updatedSegmentation.segments[index]) {
|
|
9674
|
+
// This happens when a segment is being restored
|
|
9675
|
+
console.warn('Segment not found to update cached stats:', index);
|
|
9676
|
+
return;
|
|
9677
|
+
}
|
|
9710
9678
|
if (!updatedSegmentation.segments[index].cachedStats) {
|
|
9711
9679
|
updatedSegmentation.segments[index].cachedStats = {};
|
|
9712
9680
|
hasUpdates = true;
|
|
@@ -10317,8 +10285,8 @@ let EasingFunctionEnum = /*#__PURE__*/function (EasingFunctionEnum) {
|
|
|
10317
10285
|
return EasingFunctionEnum;
|
|
10318
10286
|
}({});
|
|
10319
10287
|
const EasingFunctionMap = new Map([[EasingFunctionEnum.EASE, ease], [EasingFunctionEnum.EASE_IN, easeIn], [EasingFunctionEnum.EASE_OUT, easeOut], [EasingFunctionEnum.EASE_IN_OUT, easeInOut], [EasingFunctionEnum.LINEAR, linear]]);
|
|
10320
|
-
// EXTERNAL MODULE: ../../i18n/src/index.js +
|
|
10321
|
-
var i18n_src = __webpack_require__(
|
|
10288
|
+
// EXTERNAL MODULE: ../../i18n/src/index.js + 286 modules
|
|
10289
|
+
var i18n_src = __webpack_require__(89010);
|
|
10322
10290
|
;// ../../../extensions/cornerstone/src/utils/createSegmentationForViewport.ts
|
|
10323
10291
|
|
|
10324
10292
|
|
|
@@ -10523,6 +10491,42 @@ function commandsModule({
|
|
|
10523
10491
|
}
|
|
10524
10492
|
}
|
|
10525
10493
|
}
|
|
10494
|
+
|
|
10495
|
+
/**
|
|
10496
|
+
* Creates a command function that sets a style property for segmentation types.
|
|
10497
|
+
* If type is provided, sets the property for that type only.
|
|
10498
|
+
* If type is not provided, sets the property for both Labelmap and Contour types.
|
|
10499
|
+
* @param propertyName - The name of the style property to set
|
|
10500
|
+
* @returns A command function that takes { type, value }
|
|
10501
|
+
*/
|
|
10502
|
+
const createSetStyleCommand = propertyName => {
|
|
10503
|
+
return ({
|
|
10504
|
+
type,
|
|
10505
|
+
value
|
|
10506
|
+
}) => {
|
|
10507
|
+
const {
|
|
10508
|
+
segmentationService
|
|
10509
|
+
} = servicesManager.services;
|
|
10510
|
+
if (type) {
|
|
10511
|
+
segmentationService.setStyle({
|
|
10512
|
+
type
|
|
10513
|
+
}, {
|
|
10514
|
+
[propertyName]: value
|
|
10515
|
+
});
|
|
10516
|
+
} else {
|
|
10517
|
+
segmentationService.setStyle({
|
|
10518
|
+
type: esm_enums.SegmentationRepresentations.Labelmap
|
|
10519
|
+
}, {
|
|
10520
|
+
[propertyName]: value
|
|
10521
|
+
});
|
|
10522
|
+
segmentationService.setStyle({
|
|
10523
|
+
type: esm_enums.SegmentationRepresentations.Contour
|
|
10524
|
+
}, {
|
|
10525
|
+
[propertyName]: value
|
|
10526
|
+
});
|
|
10527
|
+
}
|
|
10528
|
+
};
|
|
10529
|
+
};
|
|
10526
10530
|
const actions = {
|
|
10527
10531
|
jumpToMeasurementViewport: ({
|
|
10528
10532
|
annotationUID,
|
|
@@ -10901,7 +10905,7 @@ function commandsModule({
|
|
|
10901
10905
|
return;
|
|
10902
10906
|
}
|
|
10903
10907
|
if (!labelConfig) {
|
|
10904
|
-
const label = await (0,default_src
|
|
10908
|
+
const label = await (0,default_src/* callInputDialog */.l5)({
|
|
10905
10909
|
uiDialogService,
|
|
10906
10910
|
title: i18n_src/* default */.A.t('Tools:Edit Measurement Label'),
|
|
10907
10911
|
placeholder: measurement.label || i18n_src/* default */.A.t('Tools:Enter new label'),
|
|
@@ -10915,7 +10919,7 @@ function commandsModule({
|
|
|
10915
10919
|
}
|
|
10916
10920
|
return;
|
|
10917
10921
|
}
|
|
10918
|
-
const val = await (0,default_src
|
|
10922
|
+
const val = await (0,default_src/* callInputDialogAutoComplete */.fq)({
|
|
10919
10923
|
measurement,
|
|
10920
10924
|
uiDialogService,
|
|
10921
10925
|
labelConfig,
|
|
@@ -11135,7 +11139,7 @@ function commandsModule({
|
|
|
11135
11139
|
const labelConfig = customizationService.getCustomization('measurementLabels');
|
|
11136
11140
|
const renderContent = customizationService.getCustomization('ui.labellingComponent');
|
|
11137
11141
|
if (!labelConfig) {
|
|
11138
|
-
const label = await (0,default_src
|
|
11142
|
+
const label = await (0,default_src/* callInputDialog */.l5)({
|
|
11139
11143
|
uiDialogService,
|
|
11140
11144
|
title: i18n_src/* default */.A.t('Tools:Edit Arrow Text'),
|
|
11141
11145
|
placeholder: data?.data?.label || i18n_src/* default */.A.t('Tools:Enter new text'),
|
|
@@ -11144,7 +11148,7 @@ function commandsModule({
|
|
|
11144
11148
|
callback?.(label);
|
|
11145
11149
|
return;
|
|
11146
11150
|
}
|
|
11147
|
-
const value = await (0,default_src
|
|
11151
|
+
const value = await (0,default_src/* callInputDialogAutoComplete */.fq)({
|
|
11148
11152
|
uiDialogService,
|
|
11149
11153
|
labelConfig,
|
|
11150
11154
|
renderContent
|
|
@@ -11965,7 +11969,7 @@ function commandsModule({
|
|
|
11965
11969
|
animationFunctionType
|
|
11966
11970
|
} = customizationService.getCustomization('panelSegmentation.jumpToSegmentHighlightAnimationConfig') ?? {};
|
|
11967
11971
|
const validAnimationFunctionType = Object.values(EasingFunctionEnum).includes(animationFunctionType) ? animationFunctionType : undefined;
|
|
11968
|
-
segmentationService.
|
|
11972
|
+
segmentationService.jumpToSegmentNext(segmentationId, segmentIndex, undefined, highlightAlpha, highlightSegment, animationLength, undefined, validAnimationFunctionType);
|
|
11969
11973
|
},
|
|
11970
11974
|
/**
|
|
11971
11975
|
* Toggles the visibility of a segment
|
|
@@ -12040,7 +12044,7 @@ function commandsModule({
|
|
|
12040
12044
|
segmentationService,
|
|
12041
12045
|
viewportGridService
|
|
12042
12046
|
} = servicesManager.services;
|
|
12043
|
-
const displaySetInstanceUIDs = await (0,default_src
|
|
12047
|
+
const displaySetInstanceUIDs = await (0,default_src/* createReportAsync */.Vy)({
|
|
12044
12048
|
servicesManager,
|
|
12045
12049
|
getReport: () => commandsManager.runCommand('storeSegmentation', args),
|
|
12046
12050
|
reportType: 'Segmentation'
|
|
@@ -12139,146 +12143,6 @@ function commandsModule({
|
|
|
12139
12143
|
const renderInactive = segmentationService.getRenderInactiveSegmentations(viewportId);
|
|
12140
12144
|
segmentationService.setRenderInactiveSegmentations(viewportId, !renderInactive);
|
|
12141
12145
|
},
|
|
12142
|
-
/**
|
|
12143
|
-
* Sets the fill alpha value for a segmentation type
|
|
12144
|
-
* @param props.type - The type of segmentation
|
|
12145
|
-
* @param props.value - The alpha value to set
|
|
12146
|
-
*/
|
|
12147
|
-
setFillAlphaCommand: ({
|
|
12148
|
-
type,
|
|
12149
|
-
value
|
|
12150
|
-
}) => {
|
|
12151
|
-
const {
|
|
12152
|
-
segmentationService
|
|
12153
|
-
} = servicesManager.services;
|
|
12154
|
-
segmentationService.setStyle({
|
|
12155
|
-
type
|
|
12156
|
-
}, {
|
|
12157
|
-
fillAlpha: value
|
|
12158
|
-
});
|
|
12159
|
-
},
|
|
12160
|
-
/**
|
|
12161
|
-
* Sets the outline width for a segmentation type
|
|
12162
|
-
* @param props.type - The type of segmentation
|
|
12163
|
-
* @param props.value - The width value to set
|
|
12164
|
-
*/
|
|
12165
|
-
setOutlineWidthCommand: ({
|
|
12166
|
-
type,
|
|
12167
|
-
value
|
|
12168
|
-
}) => {
|
|
12169
|
-
const {
|
|
12170
|
-
segmentationService
|
|
12171
|
-
} = servicesManager.services;
|
|
12172
|
-
segmentationService.setStyle({
|
|
12173
|
-
type
|
|
12174
|
-
}, {
|
|
12175
|
-
outlineWidth: value
|
|
12176
|
-
});
|
|
12177
|
-
},
|
|
12178
|
-
/**
|
|
12179
|
-
* Sets whether to render fill for a segmentation type
|
|
12180
|
-
* @param props.type - The type of segmentation
|
|
12181
|
-
* @param props.value - Whether to render fill
|
|
12182
|
-
*/
|
|
12183
|
-
setRenderFillCommand: ({
|
|
12184
|
-
type,
|
|
12185
|
-
value
|
|
12186
|
-
}) => {
|
|
12187
|
-
const {
|
|
12188
|
-
segmentationService
|
|
12189
|
-
} = servicesManager.services;
|
|
12190
|
-
segmentationService.setStyle({
|
|
12191
|
-
type
|
|
12192
|
-
}, {
|
|
12193
|
-
renderFill: value
|
|
12194
|
-
});
|
|
12195
|
-
},
|
|
12196
|
-
/**
|
|
12197
|
-
* Sets whether to render fill for inactive segmentations of a segmentation type
|
|
12198
|
-
* @param props.type - The type of segmentation
|
|
12199
|
-
* @param props.value - Whether to render fill for inactive segmentations
|
|
12200
|
-
*/
|
|
12201
|
-
setRenderFillInactiveCommand: ({
|
|
12202
|
-
type,
|
|
12203
|
-
value
|
|
12204
|
-
}) => {
|
|
12205
|
-
const {
|
|
12206
|
-
segmentationService
|
|
12207
|
-
} = servicesManager.services;
|
|
12208
|
-
segmentationService.setStyle({
|
|
12209
|
-
type
|
|
12210
|
-
}, {
|
|
12211
|
-
renderFillInactive: value
|
|
12212
|
-
});
|
|
12213
|
-
},
|
|
12214
|
-
/**
|
|
12215
|
-
* Sets whether to render outline for a segmentation type
|
|
12216
|
-
* @param props.type - The type of segmentation
|
|
12217
|
-
* @param props.value - Whether to render outline
|
|
12218
|
-
*/
|
|
12219
|
-
setRenderOutlineCommand: ({
|
|
12220
|
-
type,
|
|
12221
|
-
value
|
|
12222
|
-
}) => {
|
|
12223
|
-
const {
|
|
12224
|
-
segmentationService
|
|
12225
|
-
} = servicesManager.services;
|
|
12226
|
-
segmentationService.setStyle({
|
|
12227
|
-
type
|
|
12228
|
-
}, {
|
|
12229
|
-
renderOutline: value
|
|
12230
|
-
});
|
|
12231
|
-
},
|
|
12232
|
-
/**
|
|
12233
|
-
* Sets whether to render outline for inactive segmentations of a segmentation type
|
|
12234
|
-
* @param props.type - The type of segmentation
|
|
12235
|
-
* @param props.value - Whether to render outline for inactive segmentations
|
|
12236
|
-
*/
|
|
12237
|
-
setRenderOutlineInactiveCommand: ({
|
|
12238
|
-
type,
|
|
12239
|
-
value
|
|
12240
|
-
}) => {
|
|
12241
|
-
const {
|
|
12242
|
-
segmentationService
|
|
12243
|
-
} = servicesManager.services;
|
|
12244
|
-
segmentationService.setStyle({
|
|
12245
|
-
type
|
|
12246
|
-
}, {
|
|
12247
|
-
renderOutlineInactive: value
|
|
12248
|
-
});
|
|
12249
|
-
},
|
|
12250
|
-
/**
|
|
12251
|
-
* Sets the fill alpha for inactive segmentations.
|
|
12252
|
-
* If no type is provided, the fill alpha for all types will be set.
|
|
12253
|
-
* @param props.type - The type of segmentation
|
|
12254
|
-
* @param props.value - The alpha value to set
|
|
12255
|
-
*/
|
|
12256
|
-
setFillAlphaInactiveCommand: ({
|
|
12257
|
-
type,
|
|
12258
|
-
value
|
|
12259
|
-
}) => {
|
|
12260
|
-
const {
|
|
12261
|
-
segmentationService
|
|
12262
|
-
} = servicesManager.services;
|
|
12263
|
-
if (type) {
|
|
12264
|
-
segmentationService.setStyle({
|
|
12265
|
-
type
|
|
12266
|
-
}, {
|
|
12267
|
-
fillAlphaInactive: value
|
|
12268
|
-
});
|
|
12269
|
-
} else {
|
|
12270
|
-
segmentationService.setStyle({
|
|
12271
|
-
type: esm_enums.SegmentationRepresentations.Labelmap
|
|
12272
|
-
}, {
|
|
12273
|
-
fillAlphaInactive: value
|
|
12274
|
-
});
|
|
12275
|
-
segmentationService.setStyle({
|
|
12276
|
-
type: esm_enums.SegmentationRepresentations.Contour
|
|
12277
|
-
}, {
|
|
12278
|
-
fillAlphaInactive: value
|
|
12279
|
-
});
|
|
12280
|
-
}
|
|
12281
|
-
},
|
|
12282
12146
|
editSegmentLabel: async ({
|
|
12283
12147
|
segmentationId,
|
|
12284
12148
|
segmentIndex
|
|
@@ -12292,7 +12156,7 @@ function commandsModule({
|
|
|
12292
12156
|
return;
|
|
12293
12157
|
}
|
|
12294
12158
|
const segment = segmentation.segments[segmentIndex];
|
|
12295
|
-
(0,default_src
|
|
12159
|
+
(0,default_src/* callInputDialog */.l5)({
|
|
12296
12160
|
uiDialogService,
|
|
12297
12161
|
title: i18n_src/* default */.A.t('Tools:Edit Segment Label'),
|
|
12298
12162
|
placeholder: i18n_src/* default */.A.t('Tools:Enter new label'),
|
|
@@ -12315,7 +12179,7 @@ function commandsModule({
|
|
|
12315
12179
|
const {
|
|
12316
12180
|
label
|
|
12317
12181
|
} = segmentation;
|
|
12318
|
-
(0,default_src
|
|
12182
|
+
(0,default_src/* callInputDialog */.l5)({
|
|
12319
12183
|
uiDialogService,
|
|
12320
12184
|
title: i18n_src/* default */.A.t('Tools:Edit Segmentation Label'),
|
|
12321
12185
|
placeholder: i18n_src/* default */.A.t('Tools:Enter new label'),
|
|
@@ -12345,7 +12209,7 @@ function commandsModule({
|
|
|
12345
12209
|
a: color[3] / 255.0
|
|
12346
12210
|
};
|
|
12347
12211
|
uiDialogService.show({
|
|
12348
|
-
content: default_src
|
|
12212
|
+
content: default_src/* colorPickerDialog */.wS,
|
|
12349
12213
|
title: i18n_src/* default */.A.t('Tools:Segment Color'),
|
|
12350
12214
|
contentProps: {
|
|
12351
12215
|
value: rgbaColor,
|
|
@@ -13230,25 +13094,25 @@ function commandsModule({
|
|
|
13230
13094
|
commandFn: actions.toggleRenderInactiveSegmentationsCommand
|
|
13231
13095
|
},
|
|
13232
13096
|
setFillAlpha: {
|
|
13233
|
-
commandFn:
|
|
13097
|
+
commandFn: createSetStyleCommand('fillAlpha')
|
|
13234
13098
|
},
|
|
13235
13099
|
setOutlineWidth: {
|
|
13236
|
-
commandFn:
|
|
13100
|
+
commandFn: createSetStyleCommand('outlineWidth')
|
|
13237
13101
|
},
|
|
13238
13102
|
setRenderFill: {
|
|
13239
|
-
commandFn:
|
|
13103
|
+
commandFn: createSetStyleCommand('renderFill')
|
|
13240
13104
|
},
|
|
13241
13105
|
setRenderFillInactive: {
|
|
13242
|
-
commandFn:
|
|
13106
|
+
commandFn: createSetStyleCommand('renderFillInactive')
|
|
13243
13107
|
},
|
|
13244
13108
|
setRenderOutline: {
|
|
13245
|
-
commandFn:
|
|
13109
|
+
commandFn: createSetStyleCommand('renderOutline')
|
|
13246
13110
|
},
|
|
13247
13111
|
setRenderOutlineInactive: {
|
|
13248
|
-
commandFn:
|
|
13112
|
+
commandFn: createSetStyleCommand('renderOutlineInactive')
|
|
13249
13113
|
},
|
|
13250
13114
|
setFillAlphaInactive: {
|
|
13251
|
-
commandFn:
|
|
13115
|
+
commandFn: createSetStyleCommand('fillAlphaInactive')
|
|
13252
13116
|
},
|
|
13253
13117
|
editSegmentLabel: {
|
|
13254
13118
|
commandFn: actions.editSegmentLabel
|
|
@@ -15391,6 +15255,7 @@ var hooks = __webpack_require__(38007);
|
|
|
15391
15255
|
|
|
15392
15256
|
|
|
15393
15257
|
|
|
15258
|
+
|
|
15394
15259
|
function ViewportDataOverlayMenu({
|
|
15395
15260
|
viewportId
|
|
15396
15261
|
}) {
|
|
@@ -15398,6 +15263,9 @@ function ViewportDataOverlayMenu({
|
|
|
15398
15263
|
commandsManager,
|
|
15399
15264
|
servicesManager
|
|
15400
15265
|
} = (0,src/* useSystem */.Jg)();
|
|
15266
|
+
const {
|
|
15267
|
+
t
|
|
15268
|
+
} = (0,es/* useTranslation */.Bd)();
|
|
15401
15269
|
const [pendingForegrounds, setPendingForegrounds] = (0,react.useState)([]);
|
|
15402
15270
|
const [pendingSegmentations, setPendingSegmentations] = (0,react.useState)([]);
|
|
15403
15271
|
const {
|
|
@@ -15555,7 +15423,7 @@ function ViewportDataOverlayMenu({
|
|
|
15555
15423
|
disabled: potentialForegroundDisplaySets.length === 0
|
|
15556
15424
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Plus, {
|
|
15557
15425
|
className: "h-4 w-4"
|
|
15558
|
-
}),
|
|
15426
|
+
}), t('Common:Foreground')), /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
|
|
15559
15427
|
variant: "ghost",
|
|
15560
15428
|
className: "text-primary ml-2 flex items-center",
|
|
15561
15429
|
disabled: potentialOverlayDisplaySets.length === 0,
|
|
@@ -15565,7 +15433,7 @@ function ViewportDataOverlayMenu({
|
|
|
15565
15433
|
dataCY: `AddSegmentationDataOverlay-${viewportId}`
|
|
15566
15434
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Plus, {
|
|
15567
15435
|
className: "h-4 w-4"
|
|
15568
|
-
}),
|
|
15436
|
+
}), t('Tools:Segmentation'))), /*#__PURE__*/react.createElement("div", {
|
|
15569
15437
|
className: ""
|
|
15570
15438
|
}, /*#__PURE__*/react.createElement("div", {
|
|
15571
15439
|
className: "my-2 ml-1"
|
|
@@ -15618,7 +15486,7 @@ function ViewportDataOverlayMenu({
|
|
|
15618
15486
|
}, /*#__PURE__*/react.createElement(ui_next_src/* SelectTrigger */.bqE, {
|
|
15619
15487
|
className: "flex-1"
|
|
15620
15488
|
}, /*#__PURE__*/react.createElement(ui_next_src/* SelectValue */.yvm, {
|
|
15621
|
-
placeholder:
|
|
15489
|
+
placeholder: t('Common:SELECT A SEGMENTATION')
|
|
15622
15490
|
})), /*#__PURE__*/react.createElement(ui_next_src/* SelectContent */.gCo, null, potentialOverlayDisplaySets.map(item => /*#__PURE__*/react.createElement(ui_next_src/* SelectItem */.ebT, {
|
|
15623
15491
|
key: item.displaySetInstanceUID,
|
|
15624
15492
|
value: item.displaySetInstanceUID,
|
|
@@ -15688,7 +15556,7 @@ function ViewportDataOverlayMenu({
|
|
|
15688
15556
|
}, /*#__PURE__*/react.createElement(ui_next_src/* SelectTrigger */.bqE, {
|
|
15689
15557
|
className: "flex-1"
|
|
15690
15558
|
}, /*#__PURE__*/react.createElement(ui_next_src/* SelectValue */.yvm, {
|
|
15691
|
-
placeholder:
|
|
15559
|
+
placeholder: t('Common:SELECT A FOREGROUND')
|
|
15692
15560
|
})), /*#__PURE__*/react.createElement(ui_next_src/* SelectContent */.gCo, null, potentialForegroundDisplaySets.map(item => /*#__PURE__*/react.createElement(ui_next_src/* SelectItem */.ebT, {
|
|
15693
15561
|
key: item.displaySetInstanceUID,
|
|
15694
15562
|
value: item.displaySetInstanceUID,
|
|
@@ -16131,7 +15999,9 @@ function Colormap({
|
|
|
16131
15999
|
className: "p-1"
|
|
16132
16000
|
}, colormaps.map((colormap, index) => /*#__PURE__*/react.createElement(ui_next_src/* AllInOneMenu */.se.Item, {
|
|
16133
16001
|
key: index,
|
|
16134
|
-
label: colormap.
|
|
16002
|
+
label: t(`Colormaps:${colormap.Name}`, {
|
|
16003
|
+
defaultValue: colormap.Name
|
|
16004
|
+
}),
|
|
16135
16005
|
useIconSpace: false,
|
|
16136
16006
|
onClick: () => {
|
|
16137
16007
|
setCurrentColormap(colormap);
|
|
@@ -16188,9 +16058,13 @@ function Colorbar({
|
|
|
16188
16058
|
|
|
16189
16059
|
|
|
16190
16060
|
|
|
16061
|
+
|
|
16191
16062
|
function WindowLevel({
|
|
16192
16063
|
viewportId
|
|
16193
16064
|
} = {}) {
|
|
16065
|
+
const {
|
|
16066
|
+
t
|
|
16067
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16194
16068
|
const {
|
|
16195
16069
|
viewportDisplaySets
|
|
16196
16070
|
} = (0,useViewportRendering/* useViewportRendering */.e)(viewportId);
|
|
@@ -16242,7 +16116,7 @@ function WindowLevel({
|
|
|
16242
16116
|
onClick: () => setShowPreview(!showPreview)
|
|
16243
16117
|
}, /*#__PURE__*/react.createElement("span", {
|
|
16244
16118
|
className: "flex-shrink-0"
|
|
16245
|
-
},
|
|
16119
|
+
}, t('Preview in viewport')), /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
|
|
16246
16120
|
className: "ml-auto flex-shrink-0",
|
|
16247
16121
|
checked: showPreview,
|
|
16248
16122
|
onCheckedChange: checked => {
|
|
@@ -16261,7 +16135,7 @@ function WindowLevel({
|
|
|
16261
16135
|
className: "p-1"
|
|
16262
16136
|
}, windowLevelPresets.map((preset, index) => /*#__PURE__*/react.createElement(ui_next_src/* AllInOneMenu */.se.Item, {
|
|
16263
16137
|
key: index,
|
|
16264
|
-
label: preset.description,
|
|
16138
|
+
label: t(preset.description),
|
|
16265
16139
|
secondaryLabel: `${preset.window} / ${preset.level}`,
|
|
16266
16140
|
useIconSpace: false,
|
|
16267
16141
|
onClick: () => {
|
|
@@ -16289,6 +16163,7 @@ function WindowLevel({
|
|
|
16289
16163
|
|
|
16290
16164
|
|
|
16291
16165
|
|
|
16166
|
+
|
|
16292
16167
|
function VolumeRenderingPresetsContent({
|
|
16293
16168
|
presets,
|
|
16294
16169
|
viewportId,
|
|
@@ -16299,6 +16174,9 @@ function VolumeRenderingPresetsContent({
|
|
|
16299
16174
|
} = (0,src/* useSystem */.Jg)();
|
|
16300
16175
|
const [searchValue, setSearchValue] = (0,react.useState)('');
|
|
16301
16176
|
const [selectedPreset, setSelectedPreset] = (0,react.useState)(null);
|
|
16177
|
+
const {
|
|
16178
|
+
t
|
|
16179
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16302
16180
|
const handleSearchChange = (0,react.useCallback)(event => {
|
|
16303
16181
|
setSearchValue(event.target.value);
|
|
16304
16182
|
}, []);
|
|
@@ -16316,7 +16194,7 @@ function VolumeRenderingPresetsContent({
|
|
|
16316
16194
|
}, /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MUF.PresetBody, null, /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MUF.PresetFilter, null, /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MUF.PresetSearch, {
|
|
16317
16195
|
value: searchValue,
|
|
16318
16196
|
onChange: handleSearchChange,
|
|
16319
|
-
placeholder:
|
|
16197
|
+
placeholder: t('Search all', 'Search all')
|
|
16320
16198
|
})), /*#__PURE__*/react.createElement(ui_next_src/* PresetDialog */.MUF.PresetGrid, null, filteredPresets.map((preset, index) => /*#__PURE__*/react.createElement("div", {
|
|
16321
16199
|
key: index,
|
|
16322
16200
|
className: "flex cursor-pointer flex-col items-start",
|
|
@@ -16336,7 +16214,7 @@ function VolumeRenderingPresetsContent({
|
|
|
16336
16214
|
className: "mt-4 flex-shrink-0"
|
|
16337
16215
|
}, /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.esu.Right, null, /*#__PURE__*/react.createElement(ui_next_src/* FooterAction */.esu.Secondary, {
|
|
16338
16216
|
onClick: hide
|
|
16339
|
-
},
|
|
16217
|
+
}, t('Common:Cancel')))));
|
|
16340
16218
|
}
|
|
16341
16219
|
;// ../../../extensions/cornerstone/src/components/WindowLevelActionMenu/VolumeRenderingPresets.tsx
|
|
16342
16220
|
|
|
@@ -16345,6 +16223,7 @@ function VolumeRenderingPresetsContent({
|
|
|
16345
16223
|
|
|
16346
16224
|
|
|
16347
16225
|
|
|
16226
|
+
|
|
16348
16227
|
function VolumeRenderingPresets({
|
|
16349
16228
|
viewportId
|
|
16350
16229
|
} = {}) {
|
|
@@ -16357,11 +16236,14 @@ function VolumeRenderingPresets({
|
|
|
16357
16236
|
const {
|
|
16358
16237
|
uiDialogService
|
|
16359
16238
|
} = servicesManager.services;
|
|
16239
|
+
const {
|
|
16240
|
+
t
|
|
16241
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16360
16242
|
const onClickPresets = () => {
|
|
16361
16243
|
uiDialogService.show({
|
|
16362
16244
|
id: 'volume-rendering-presets',
|
|
16363
16245
|
content: VolumeRenderingPresetsContent,
|
|
16364
|
-
title: 'Rendering Presets',
|
|
16246
|
+
title: t('Rendering Presets'),
|
|
16365
16247
|
isDraggable: true,
|
|
16366
16248
|
contentProps: {
|
|
16367
16249
|
presets: volumeRenderingPresets,
|
|
@@ -16370,7 +16252,7 @@ function VolumeRenderingPresets({
|
|
|
16370
16252
|
});
|
|
16371
16253
|
};
|
|
16372
16254
|
return /*#__PURE__*/react.createElement(ui_next_src/* AllInOneMenu */.se.Item, {
|
|
16373
|
-
label:
|
|
16255
|
+
label: t('Rendering Presets'),
|
|
16374
16256
|
icon: /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.VolumeRendering, null),
|
|
16375
16257
|
rightIcon: /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.ByName, {
|
|
16376
16258
|
name: "action-new-dialog"
|
|
@@ -16382,6 +16264,7 @@ function VolumeRenderingPresets({
|
|
|
16382
16264
|
|
|
16383
16265
|
|
|
16384
16266
|
|
|
16267
|
+
|
|
16385
16268
|
function VolumeRenderingQuality({
|
|
16386
16269
|
volumeRenderingQualityRange,
|
|
16387
16270
|
viewportId
|
|
@@ -16399,6 +16282,9 @@ function VolumeRenderingQuality({
|
|
|
16399
16282
|
step
|
|
16400
16283
|
} = volumeRenderingQualityRange;
|
|
16401
16284
|
const [quality, setQuality] = (0,react.useState)(null);
|
|
16285
|
+
const {
|
|
16286
|
+
t
|
|
16287
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16402
16288
|
const onChange = (0,react.useCallback)(value => {
|
|
16403
16289
|
commandsManager.runCommand('setVolumeRenderingQulaity', {
|
|
16404
16290
|
viewportId,
|
|
@@ -16437,7 +16323,7 @@ function VolumeRenderingQuality({
|
|
|
16437
16323
|
className: "flex flex-row items-center"
|
|
16438
16324
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Numeric */.ewR.Label, {
|
|
16439
16325
|
className: "w-16"
|
|
16440
|
-
},
|
|
16326
|
+
}, t('Quality')), /*#__PURE__*/react.createElement(ui_next_src/* Numeric */.ewR.SingleRange, {
|
|
16441
16327
|
sliderClassName: "mx-2 flex-grow"
|
|
16442
16328
|
})))));
|
|
16443
16329
|
}
|
|
@@ -16445,6 +16331,7 @@ function VolumeRenderingQuality({
|
|
|
16445
16331
|
|
|
16446
16332
|
|
|
16447
16333
|
|
|
16334
|
+
|
|
16448
16335
|
function VolumeShift({
|
|
16449
16336
|
viewportId
|
|
16450
16337
|
}) {
|
|
@@ -16466,6 +16353,9 @@ function VolumeShift({
|
|
|
16466
16353
|
actor
|
|
16467
16354
|
} = viewport.getActors()[0];
|
|
16468
16355
|
const ofun = actor.getProperty().getScalarOpacity(0);
|
|
16356
|
+
const {
|
|
16357
|
+
t
|
|
16358
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16469
16359
|
(0,react.useEffect)(() => {
|
|
16470
16360
|
if (isBlocking) {
|
|
16471
16361
|
return;
|
|
@@ -16505,7 +16395,7 @@ function VolumeShift({
|
|
|
16505
16395
|
className: "flex flex-row items-center"
|
|
16506
16396
|
}, /*#__PURE__*/react.createElement(ui_next_src/* Numeric */.ewR.Label, {
|
|
16507
16397
|
className: "w-16"
|
|
16508
|
-
},
|
|
16398
|
+
}, t('Shift')), /*#__PURE__*/react.createElement(ui_next_src/* Numeric */.ewR.SingleRange, {
|
|
16509
16399
|
sliderClassName: "mx-2 flex-grow"
|
|
16510
16400
|
})))));
|
|
16511
16401
|
}
|
|
@@ -16513,6 +16403,7 @@ function VolumeShift({
|
|
|
16513
16403
|
|
|
16514
16404
|
|
|
16515
16405
|
|
|
16406
|
+
|
|
16516
16407
|
function VolumeLighting({
|
|
16517
16408
|
viewportId,
|
|
16518
16409
|
hasShade
|
|
@@ -16529,6 +16420,9 @@ function VolumeLighting({
|
|
|
16529
16420
|
diffuse: null,
|
|
16530
16421
|
specular: null
|
|
16531
16422
|
});
|
|
16423
|
+
const {
|
|
16424
|
+
t
|
|
16425
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16532
16426
|
|
|
16533
16427
|
// Single callback to handle all lighting property changes
|
|
16534
16428
|
const onLightingChange = (0,react.useCallback)((property, value) => {
|
|
@@ -16561,13 +16455,13 @@ function VolumeLighting({
|
|
|
16561
16455
|
// Configuration for our lighting properties
|
|
16562
16456
|
const lightingProperties = [{
|
|
16563
16457
|
key: 'ambient',
|
|
16564
|
-
label: 'Ambient'
|
|
16458
|
+
label: t('Ambient')
|
|
16565
16459
|
}, {
|
|
16566
16460
|
key: 'diffuse',
|
|
16567
|
-
label: 'Diffuse'
|
|
16461
|
+
label: t('Diffuse')
|
|
16568
16462
|
}, {
|
|
16569
16463
|
key: 'specular',
|
|
16570
|
-
label: 'Specular'
|
|
16464
|
+
label: t('Specular')
|
|
16571
16465
|
}];
|
|
16572
16466
|
return /*#__PURE__*/react.createElement("div", {
|
|
16573
16467
|
className: "my-1 mt-2 flex flex-col space-y-2"
|
|
@@ -16596,10 +16490,14 @@ function VolumeLighting({
|
|
|
16596
16490
|
|
|
16597
16491
|
|
|
16598
16492
|
|
|
16493
|
+
|
|
16599
16494
|
function VolumeShade({
|
|
16600
16495
|
viewportId,
|
|
16601
16496
|
onClickShade = bool => {}
|
|
16602
16497
|
}) {
|
|
16498
|
+
const {
|
|
16499
|
+
t
|
|
16500
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16603
16501
|
const {
|
|
16604
16502
|
servicesManager,
|
|
16605
16503
|
commandsManager
|
|
@@ -16629,7 +16527,7 @@ function VolumeShade({
|
|
|
16629
16527
|
}, [viewportId, cornerstoneViewportService]);
|
|
16630
16528
|
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement("span", {
|
|
16631
16529
|
className: "flex-grow"
|
|
16632
|
-
},
|
|
16530
|
+
}, t('Shade')), /*#__PURE__*/react.createElement(ui_next_src/* Switch */.dOG, {
|
|
16633
16531
|
className: "ml-2 flex-shrink-0",
|
|
16634
16532
|
key: key,
|
|
16635
16533
|
checked: shade,
|
|
@@ -16648,6 +16546,7 @@ function VolumeShade({
|
|
|
16648
16546
|
|
|
16649
16547
|
|
|
16650
16548
|
|
|
16549
|
+
|
|
16651
16550
|
function VolumeRenderingOptions({
|
|
16652
16551
|
viewportId
|
|
16653
16552
|
} = {}) {
|
|
@@ -16655,6 +16554,9 @@ function VolumeRenderingOptions({
|
|
|
16655
16554
|
volumeRenderingQualityRange
|
|
16656
16555
|
} = (0,useViewportRendering/* useViewportRendering */.e)(viewportId);
|
|
16657
16556
|
const [hasShade, setShade] = (0,react.useState)(false);
|
|
16557
|
+
const {
|
|
16558
|
+
t
|
|
16559
|
+
} = (0,es/* useTranslation */.Bd)('WindowLevelActionMenu');
|
|
16658
16560
|
return /*#__PURE__*/react.createElement(ui_next_src/* AllInOneMenu */.se.ItemPanel, null, /*#__PURE__*/react.createElement(VolumeRenderingQuality, {
|
|
16659
16561
|
viewportId: viewportId,
|
|
16660
16562
|
volumeRenderingQualityRange: volumeRenderingQualityRange
|
|
@@ -16664,7 +16566,7 @@ function VolumeRenderingOptions({
|
|
|
16664
16566
|
className: "mt-2 flex h-8 !h-[20px] w-full flex-shrink-0 items-center justify-start px-2 text-base"
|
|
16665
16567
|
}, /*#__PURE__*/react.createElement("div", {
|
|
16666
16568
|
className: "text-muted-foreground text-sm"
|
|
16667
|
-
},
|
|
16569
|
+
}, t('Lighting'))), /*#__PURE__*/react.createElement("div", {
|
|
16668
16570
|
className: "bg-background mt-1 mb-1 h-px w-full"
|
|
16669
16571
|
}), /*#__PURE__*/react.createElement("div", {
|
|
16670
16572
|
className: "hover:bg-accent flex h-8 w-full flex-shrink-0 items-center px-2 text-base hover:rounded"
|
|
@@ -16689,20 +16591,22 @@ function VolumeRenderingOptions({
|
|
|
16689
16591
|
|
|
16690
16592
|
function WindowLevelActionMenu({
|
|
16691
16593
|
viewportId,
|
|
16692
|
-
element,
|
|
16693
16594
|
align,
|
|
16694
|
-
side
|
|
16595
|
+
side,
|
|
16596
|
+
onVisibilityChange
|
|
16695
16597
|
}) {
|
|
16696
16598
|
return /*#__PURE__*/react.createElement(WindowLevelActionMenuContent, {
|
|
16697
16599
|
viewportId: viewportId,
|
|
16698
16600
|
align: align,
|
|
16699
|
-
side: side
|
|
16601
|
+
side: side,
|
|
16602
|
+
onVisibilityChange: onVisibilityChange
|
|
16700
16603
|
});
|
|
16701
16604
|
}
|
|
16702
16605
|
function WindowLevelActionMenuContent({
|
|
16703
16606
|
viewportId,
|
|
16704
16607
|
align,
|
|
16705
|
-
side
|
|
16608
|
+
side,
|
|
16609
|
+
onVisibilityChange
|
|
16706
16610
|
}) {
|
|
16707
16611
|
const {
|
|
16708
16612
|
t
|
|
@@ -16723,7 +16627,8 @@ function WindowLevelActionMenuContent({
|
|
|
16723
16627
|
isVisible: true,
|
|
16724
16628
|
align: align,
|
|
16725
16629
|
side: side,
|
|
16726
|
-
backLabel: i18next/* default */.A.t('WindowLevelActionMenu:Back to Display Options')
|
|
16630
|
+
backLabel: i18next/* default */.A.t('WindowLevelActionMenu:Back to Display Options'),
|
|
16631
|
+
onVisibilityChange: onVisibilityChange
|
|
16727
16632
|
}, /*#__PURE__*/react.createElement(ui_next_src/* AllInOneMenu */.se.ItemPanel, null, !is3DVolume && /*#__PURE__*/react.createElement(Colorbar, {
|
|
16728
16633
|
viewportId: viewportId
|
|
16729
16634
|
}), colorbarProperties?.colormaps && !is3DVolume && /*#__PURE__*/react.createElement(ui_next_src/* AllInOneMenu */.se.SubMenu, {
|
|
@@ -16758,7 +16663,6 @@ function WindowLevelActionMenuWrapper_extends() { return WindowLevelActionMenuWr
|
|
|
16758
16663
|
function WindowLevelActionMenuWrapper(props) {
|
|
16759
16664
|
const {
|
|
16760
16665
|
viewportId,
|
|
16761
|
-
element,
|
|
16762
16666
|
location,
|
|
16763
16667
|
isOpen = false,
|
|
16764
16668
|
onOpen,
|
|
@@ -16839,9 +16743,9 @@ function WindowLevelActionMenuWrapper(props) {
|
|
|
16839
16743
|
sideOffset: 5
|
|
16840
16744
|
}, /*#__PURE__*/react.createElement(WindowLevelActionMenu, {
|
|
16841
16745
|
viewportId: viewportIdToUse,
|
|
16842
|
-
element: element,
|
|
16843
16746
|
align: align,
|
|
16844
|
-
side: side
|
|
16747
|
+
side: side,
|
|
16748
|
+
onVisibilityChange: handleOpenChange
|
|
16845
16749
|
})));
|
|
16846
16750
|
}
|
|
16847
16751
|
;// ../../../extensions/cornerstone/src/components/VOIManualControlMenu/VOIManualControlMenu.tsx
|
|
@@ -17481,6 +17385,7 @@ function ModalityLoadBadge({
|
|
|
17481
17385
|
|
|
17482
17386
|
|
|
17483
17387
|
|
|
17388
|
+
|
|
17484
17389
|
/**
|
|
17485
17390
|
* NavigationComponent provides navigation controls for viewports containing
|
|
17486
17391
|
* special displaySets (SR, SEG, RTSTRUCT) to navigate between segments or measurements
|
|
@@ -17517,7 +17422,7 @@ function NavigationComponent({
|
|
|
17517
17422
|
} = (0,hooks/* useViewportSegmentations */.Lt)({
|
|
17518
17423
|
viewportId
|
|
17519
17424
|
});
|
|
17520
|
-
const hasSegmentations = segmentationsWithRepresentations.length > 0;
|
|
17425
|
+
const hasSegmentations = segmentationsWithRepresentations.length > 0 && segmentationsWithRepresentations.some(segmentation => segmentation?.representation?.type !== esm_enums.SegmentationRepresentations.Surface);
|
|
17521
17426
|
|
|
17522
17427
|
// prefer segment navigation if available
|
|
17523
17428
|
const navigationMode = hasSegmentations ? 'segment' : isSRDisplaySet ? 'measurement' : isTracked ? 'measurement' : null;
|
|
@@ -17546,7 +17451,8 @@ function NavigationComponent({
|
|
|
17546
17451
|
if (!segmentationsWithRepresentations.length) {
|
|
17547
17452
|
return;
|
|
17548
17453
|
}
|
|
17549
|
-
const
|
|
17454
|
+
const activeSegmentationWithRepresentation = segmentationsWithRepresentations.find(segmentation => segmentation?.representation?.active);
|
|
17455
|
+
const segmentationId = activeSegmentationWithRepresentation.segmentation.segmentationId;
|
|
17550
17456
|
src_utils.handleSegmentChange({
|
|
17551
17457
|
direction,
|
|
17552
17458
|
segmentationId,
|
|
@@ -18014,9 +17920,10 @@ function AdvancedRenderingControls({
|
|
|
18014
17920
|
|
|
18015
17921
|
|
|
18016
17922
|
|
|
17923
|
+
|
|
18017
17924
|
const getDisabledState = disabledText => ({
|
|
18018
17925
|
disabled: true,
|
|
18019
|
-
disabledText: disabledText ?? 'Not available on the current viewport'
|
|
17926
|
+
disabledText: disabledText ?? i18n_src/* default */.A.t('Buttons:Not available on the current viewport')
|
|
18020
17927
|
});
|
|
18021
17928
|
function getToolbarModule({
|
|
18022
17929
|
servicesManager,
|
|
@@ -18349,7 +18256,7 @@ function getToolbarModule({
|
|
|
18349
18256
|
if (supportedModalities?.length) {
|
|
18350
18257
|
const hasAnySupportedModality = displaySets.some(displaySet => supportedModalities.includes(displaySet?.Modality));
|
|
18351
18258
|
if (!hasAnySupportedModality) {
|
|
18352
|
-
return getDisabledState(disabledText || 'Tool not available for this modality');
|
|
18259
|
+
return getDisabledState(disabledText || i18n_src/* default */.A.t('Buttons:Tool not available for this modality'));
|
|
18353
18260
|
}
|
|
18354
18261
|
}
|
|
18355
18262
|
}
|
|
@@ -18792,9 +18699,26 @@ ToolGroupService.REGISTRATION = {
|
|
|
18792
18699
|
;// ../../../extensions/cornerstone/src/services/ToolGroupService/index.js
|
|
18793
18700
|
|
|
18794
18701
|
/* harmony default export */ const services_ToolGroupService = (ToolGroupService);
|
|
18702
|
+
;// ../../../extensions/cornerstone/src/utils/isAnyDisplaySetCommon.ts
|
|
18703
|
+
/**
|
|
18704
|
+
* Checks whether two viewports share at least one common display set.
|
|
18705
|
+
*
|
|
18706
|
+
* This method checks to see if the source and target share a display set.
|
|
18707
|
+
* It performs an O(n * m) comparison between the display sets of each viewport.
|
|
18708
|
+
* Since each viewport typically contains only a small number of display sets (≤ 5),
|
|
18709
|
+
* the computational cost is negligible.
|
|
18710
|
+
*
|
|
18711
|
+
* @param sourceDisplaySetUIDs - Array of displaySetInstanceUID from the source viewport.
|
|
18712
|
+
* @param targetDisplaySetUIDs - Array of displaySetInstanceUID from the target viewport.
|
|
18713
|
+
* @returns true if at least one display set is common; false otherwise.
|
|
18714
|
+
*/
|
|
18715
|
+
function isAnyDisplaySetCommon(sourceDisplaySetUIDs, targetDisplaySetUIDs) {
|
|
18716
|
+
return sourceDisplaySetUIDs.some(uid => targetDisplaySetUIDs.includes(uid));
|
|
18717
|
+
}
|
|
18795
18718
|
;// ../../../extensions/cornerstone/src/services/SyncGroupService/createHydrateSegmentationSynchronizer.ts
|
|
18796
18719
|
|
|
18797
18720
|
|
|
18721
|
+
|
|
18798
18722
|
const {
|
|
18799
18723
|
createSynchronizer
|
|
18800
18724
|
} = dist_esm.SynchronizerManager;
|
|
@@ -18818,6 +18742,13 @@ function createHydrateSegmentationSynchronizer(synchronizerName, {
|
|
|
18818
18742
|
});
|
|
18819
18743
|
return stackImageSynchronizer;
|
|
18820
18744
|
}
|
|
18745
|
+
|
|
18746
|
+
/**
|
|
18747
|
+
* This method will add the segmentation representation to any target viewports having:
|
|
18748
|
+
*
|
|
18749
|
+
* 1. the same FrameOfReferenceUID (FOR) as the segmentation representation, or
|
|
18750
|
+
* 2. a shared DisplaySet with the source viewport when no FOR is present.
|
|
18751
|
+
*/
|
|
18821
18752
|
const segmentationRepresentationModifiedCallback = async (synchronizerInstance, sourceViewport, targetViewport, sourceEvent, {
|
|
18822
18753
|
servicesManager,
|
|
18823
18754
|
options
|
|
@@ -18828,14 +18759,20 @@ const segmentationRepresentationModifiedCallback = async (synchronizerInstance,
|
|
|
18828
18759
|
type: segmentationRepresentationType
|
|
18829
18760
|
} = event.detail;
|
|
18830
18761
|
const {
|
|
18831
|
-
segmentationService
|
|
18762
|
+
segmentationService,
|
|
18763
|
+
cornerstoneViewportService
|
|
18832
18764
|
} = servicesManager.services;
|
|
18833
18765
|
const targetViewportId = targetViewport.viewportId;
|
|
18766
|
+
const sourceViewportId = sourceViewport.viewportId;
|
|
18834
18767
|
const {
|
|
18835
18768
|
viewport
|
|
18836
18769
|
} = (0,esm.getEnabledElementByViewportId)(targetViewportId);
|
|
18837
|
-
const
|
|
18838
|
-
|
|
18770
|
+
const sourceViewportInfo = cornerstoneViewportService.getViewportInfo(sourceViewportId);
|
|
18771
|
+
const targetViewportInfo = cornerstoneViewportService.getViewportInfo(targetViewportId);
|
|
18772
|
+
const sourceDisplaySetUIDs = extractDisplaySetUIDs(sourceViewportInfo);
|
|
18773
|
+
const targetDisplaySetUIDs = extractDisplaySetUIDs(targetViewportInfo);
|
|
18774
|
+
const sharedDisplaySetExists = isAnyDisplaySetCommon(sourceDisplaySetUIDs, targetDisplaySetUIDs);
|
|
18775
|
+
if (!sharedDisplaySetExists && !viewport.getFrameOfReferenceUID()) {
|
|
18839
18776
|
return;
|
|
18840
18777
|
}
|
|
18841
18778
|
const targetViewportRepresentation = segmentationService.getSegmentationRepresentations(targetViewportId, {
|
|
@@ -18851,10 +18788,17 @@ const segmentationRepresentationModifiedCallback = async (synchronizerInstance,
|
|
|
18851
18788
|
segmentationId,
|
|
18852
18789
|
type,
|
|
18853
18790
|
config: {
|
|
18854
|
-
blendMode: viewport
|
|
18791
|
+
blendMode: viewport?.getBlendMode?.() === 1 ? BlendModes.LABELMAP_EDGE_PROJECTION_BLEND : undefined
|
|
18855
18792
|
}
|
|
18856
18793
|
});
|
|
18857
18794
|
};
|
|
18795
|
+
|
|
18796
|
+
/**
|
|
18797
|
+
* Extracts the displaySetInstanceUIDs from a viewportInfo.
|
|
18798
|
+
*/
|
|
18799
|
+
function extractDisplaySetUIDs(viewportInfo) {
|
|
18800
|
+
return viewportInfo.getViewportData().data.map(ds => ds.displaySetInstanceUID);
|
|
18801
|
+
}
|
|
18858
18802
|
;// ../../../extensions/cornerstone/src/services/SyncGroupService/SyncGroupService.ts
|
|
18859
18803
|
var _SyncGroupService;
|
|
18860
18804
|
|
|
@@ -19138,6 +19082,9 @@ var _SegmentationService;
|
|
|
19138
19082
|
|
|
19139
19083
|
|
|
19140
19084
|
|
|
19085
|
+
const {
|
|
19086
|
+
DefaultHistoryMemo: SegmentationService_DefaultHistoryMemo
|
|
19087
|
+
} = esm.utilities.HistoryMemo;
|
|
19141
19088
|
const {
|
|
19142
19089
|
Labelmap: LABELMAP,
|
|
19143
19090
|
Contour: CONTOUR,
|
|
@@ -19898,11 +19845,69 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
19898
19845
|
});
|
|
19899
19846
|
}
|
|
19900
19847
|
|
|
19848
|
+
/**
|
|
19849
|
+
* Creates a memo that records the current state of a segment (segmentationId/segmentIndex)
|
|
19850
|
+
* so that undo can restore it via addSegment and redo can call removeSegment again
|
|
19851
|
+
* without recording history.
|
|
19852
|
+
*
|
|
19853
|
+
* @param segmentationId - The ID of the segmentation.
|
|
19854
|
+
* @param segmentIndex - The index of the segment (must still exist when called).
|
|
19855
|
+
* @param _options - Reserved (e.g. deleting) for future use.
|
|
19856
|
+
* @returns A Memo with restoreMemo(undo): undo => addSegment, redo => removeSegment (skipRecordingHistory).
|
|
19857
|
+
*/
|
|
19858
|
+
createSegmentIndexMemo(segmentationId, segmentIndex, _options) {
|
|
19859
|
+
const csSegmentation = this.getCornerstoneSegmentation(segmentationId);
|
|
19860
|
+
const segment = csSegmentation?.segments?.[segmentIndex];
|
|
19861
|
+
if (!segment) {
|
|
19862
|
+
return null;
|
|
19863
|
+
}
|
|
19864
|
+
let color;
|
|
19865
|
+
let visibility;
|
|
19866
|
+
const viewportIds = this.getViewportIdsWithSegmentation(segmentationId);
|
|
19867
|
+
if (viewportIds.length > 0) {
|
|
19868
|
+
const firstViewportId = viewportIds[0];
|
|
19869
|
+
const representations = this.getSegmentationRepresentations(firstViewportId, {
|
|
19870
|
+
segmentationId
|
|
19871
|
+
});
|
|
19872
|
+
const repType = representations[0]?.type ?? LABELMAP;
|
|
19873
|
+
color = this.getSegmentColor(firstViewportId, segmentationId, segmentIndex);
|
|
19874
|
+
visibility = dist_esm.segmentation.config.visibility.getSegmentIndexVisibility(firstViewportId, {
|
|
19875
|
+
segmentationId,
|
|
19876
|
+
type: repType
|
|
19877
|
+
}, segmentIndex);
|
|
19878
|
+
}
|
|
19879
|
+
const segmentState = {
|
|
19880
|
+
segmentIndex,
|
|
19881
|
+
label: segment.label,
|
|
19882
|
+
isLocked: segment.locked,
|
|
19883
|
+
active: segment.active,
|
|
19884
|
+
color,
|
|
19885
|
+
visibility
|
|
19886
|
+
};
|
|
19887
|
+
const service = this;
|
|
19888
|
+
const memo = {
|
|
19889
|
+
id: esm.utilities.uuidv4(),
|
|
19890
|
+
operationType: 'segmentIndex',
|
|
19891
|
+
restoreMemo(undo) {
|
|
19892
|
+
if (undo === true) {
|
|
19893
|
+
service.addSegment(segmentationId, segmentState);
|
|
19894
|
+
} else {
|
|
19895
|
+
// Redo: remove the segment via cornerstone without recording history
|
|
19896
|
+
dist_esm.segmentation.removeSegment(segmentationId, segmentIndex, {
|
|
19897
|
+
recordHistory: false
|
|
19898
|
+
});
|
|
19899
|
+
}
|
|
19900
|
+
}
|
|
19901
|
+
};
|
|
19902
|
+
return memo;
|
|
19903
|
+
}
|
|
19904
|
+
|
|
19901
19905
|
/**
|
|
19902
19906
|
* Removes a segment from a segmentation and updates the active segment index if necessary.
|
|
19903
19907
|
*
|
|
19904
19908
|
* @param segmentationId - The ID of the segmentation containing the segment to remove.
|
|
19905
19909
|
* @param segmentIndex - The index of the segment to remove.
|
|
19910
|
+
* @param options - Optional. skipRecordingHistory: if true, do not push undo memo (used when redoing).
|
|
19906
19911
|
*
|
|
19907
19912
|
* @remarks
|
|
19908
19913
|
* This method performs the following actions:
|
|
@@ -19911,8 +19916,23 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
19911
19916
|
* 3. If the removed segment was the active segment, it updates the active segment index.
|
|
19912
19917
|
*
|
|
19913
19918
|
*/
|
|
19914
|
-
removeSegment(segmentationId, segmentIndex) {
|
|
19915
|
-
|
|
19919
|
+
removeSegment(segmentationId, segmentIndex, options) {
|
|
19920
|
+
let memo;
|
|
19921
|
+
if (!options?.skipRecordingHistory) {
|
|
19922
|
+
memo = this.createSegmentIndexMemo(segmentationId, segmentIndex, {
|
|
19923
|
+
deleting: true
|
|
19924
|
+
});
|
|
19925
|
+
SegmentationService_DefaultHistoryMemo.startGroupRecording();
|
|
19926
|
+
dist_esm.segmentation.removeSegment(segmentationId, segmentIndex, {
|
|
19927
|
+
recordHistory: true
|
|
19928
|
+
});
|
|
19929
|
+
SegmentationService_DefaultHistoryMemo.push(memo);
|
|
19930
|
+
SegmentationService_DefaultHistoryMemo.endGroupRecording();
|
|
19931
|
+
} else {
|
|
19932
|
+
dist_esm.segmentation.removeSegment(segmentationId, segmentIndex, {
|
|
19933
|
+
recordHistory: false
|
|
19934
|
+
});
|
|
19935
|
+
}
|
|
19916
19936
|
}
|
|
19917
19937
|
setSegmentVisibility(viewportId, segmentationId, segmentIndex, isVisible, type) {
|
|
19918
19938
|
this._setSegmentVisibility(viewportId, segmentationId, segmentIndex, isVisible, type);
|
|
@@ -20128,15 +20148,111 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
20128
20148
|
removeSegmentationRepresentations(viewportId, specifier = {}) {
|
|
20129
20149
|
dist_esm.segmentation.removeSegmentationRepresentations(viewportId, specifier);
|
|
20130
20150
|
}
|
|
20131
|
-
|
|
20132
|
-
|
|
20133
|
-
|
|
20151
|
+
|
|
20152
|
+
/**
|
|
20153
|
+
* Jumps to the next slice that contains the specified segment in the viewport.
|
|
20154
|
+
* For labelmaps, it jumps to the segment center. For contours, it cycles through
|
|
20155
|
+
* all slices that contain contour data for the segment.
|
|
20156
|
+
*
|
|
20157
|
+
* @param segmentationId - The ID of the segmentation
|
|
20158
|
+
* @param segmentIndex - The index of the segment to jump to
|
|
20159
|
+
* @param viewportId - Optional viewport ID. If not provided, applies to all viewports with this segmentation
|
|
20160
|
+
* @param highlightAlpha - Alpha value for highlighting (0-1)
|
|
20161
|
+
* @param highlightSegment - Whether to highlight the segment after jumping
|
|
20162
|
+
* @param animationLength - Length of highlight animation in milliseconds
|
|
20163
|
+
* @param highlightHideOthers - Whether to hide other segments during highlight
|
|
20164
|
+
* @param animationFunctionType - The easing function to use for animation
|
|
20165
|
+
*/
|
|
20166
|
+
jumpToSegmentNext(segmentationId, segmentIndex, forViewportId, direction = 1, highlightAlpha = 0.9, highlightSegment = true, animationLength = 750, highlightHideOthers = false, animationFunctionType = EasingFunctionEnum.EASE_IN_OUT) {
|
|
20167
|
+
const viewportIds = forViewportId ? [forViewportId] : this.getViewportIdsWithSegmentation(segmentationId);
|
|
20168
|
+
viewportIds.forEach(viewportId => {
|
|
20169
|
+
const representations = this.getSegmentationRepresentations(viewportId, {
|
|
20170
|
+
segmentationId
|
|
20171
|
+
});
|
|
20172
|
+
if (!representations || representations.length === 0) {
|
|
20173
|
+
return;
|
|
20174
|
+
}
|
|
20175
|
+
const representation = representations[0];
|
|
20176
|
+
const {
|
|
20177
|
+
type
|
|
20178
|
+
} = representation;
|
|
20179
|
+
|
|
20180
|
+
// For contours, check if we have a segment center.
|
|
20181
|
+
const center = type === CONTOUR ? this._getSegmentCenter(segmentationId, segmentIndex) : undefined;
|
|
20182
|
+
const canUseSegmentCenter = type !== CONTOUR || !!center;
|
|
20183
|
+
if (canUseSegmentCenter) {
|
|
20184
|
+
this.jumpToSegmentCenter(segmentationId, segmentIndex, viewportId, highlightAlpha, highlightSegment, animationLength, highlightHideOthers, animationFunctionType, center);
|
|
20185
|
+
return;
|
|
20186
|
+
}
|
|
20187
|
+
const {
|
|
20188
|
+
viewport
|
|
20189
|
+
} = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
20190
|
+
if (!viewport) {
|
|
20191
|
+
return;
|
|
20192
|
+
}
|
|
20193
|
+
const viewRefs = this._getContourViewReferences(segmentationId, viewport, segmentIndex);
|
|
20194
|
+
if (!viewRefs) {
|
|
20195
|
+
return;
|
|
20196
|
+
}
|
|
20197
|
+
|
|
20198
|
+
// Get the current slice index
|
|
20199
|
+
const currentSliceIndex = viewport.getCurrentImageIdIndex();
|
|
20200
|
+
let nearestSliceIndex = null;
|
|
20201
|
+
let loopSliceIndex = null;
|
|
20202
|
+
for (const [sliceIndex] of viewRefs.entries()) {
|
|
20203
|
+
// Track loop index for wraparound (smallest for forward, largest for backward)
|
|
20204
|
+
if (direction > 0) {
|
|
20205
|
+
if (loopSliceIndex === null || sliceIndex < loopSliceIndex) {
|
|
20206
|
+
loopSliceIndex = sliceIndex;
|
|
20207
|
+
}
|
|
20208
|
+
} else {
|
|
20209
|
+
if (loopSliceIndex === null || sliceIndex > loopSliceIndex) {
|
|
20210
|
+
loopSliceIndex = sliceIndex;
|
|
20211
|
+
}
|
|
20212
|
+
}
|
|
20213
|
+
if (direction > 0) {
|
|
20214
|
+
// Forward direction: find nearest slice after current
|
|
20215
|
+
if (sliceIndex <= currentSliceIndex) {
|
|
20216
|
+
continue;
|
|
20217
|
+
}
|
|
20218
|
+
if (nearestSliceIndex === null || sliceIndex < nearestSliceIndex) {
|
|
20219
|
+
nearestSliceIndex = sliceIndex;
|
|
20220
|
+
}
|
|
20221
|
+
} else {
|
|
20222
|
+
// Backward direction: find nearest slice before current
|
|
20223
|
+
if (sliceIndex >= currentSliceIndex) {
|
|
20224
|
+
continue;
|
|
20225
|
+
}
|
|
20226
|
+
if (nearestSliceIndex === null || sliceIndex > nearestSliceIndex) {
|
|
20227
|
+
nearestSliceIndex = sliceIndex;
|
|
20228
|
+
}
|
|
20229
|
+
}
|
|
20230
|
+
}
|
|
20231
|
+
|
|
20232
|
+
// Wraparound: if no slice found in direction, use loop index
|
|
20233
|
+
nearestSliceIndex = nearestSliceIndex ?? loopSliceIndex;
|
|
20234
|
+
if (nearestSliceIndex === null) {
|
|
20235
|
+
return;
|
|
20236
|
+
}
|
|
20237
|
+
const viewRef = viewRefs.get(nearestSliceIndex);
|
|
20238
|
+
viewport.setViewReference(viewRef);
|
|
20239
|
+
viewport.render();
|
|
20240
|
+
});
|
|
20241
|
+
}
|
|
20242
|
+
|
|
20243
|
+
/**
|
|
20244
|
+
* Jumps the viewport to the center of hte given segment.
|
|
20245
|
+
* Only works for labelmaps, and may result in not showing any contours.
|
|
20246
|
+
*/
|
|
20247
|
+
jumpToSegmentCenter(segmentationId, segmentIndex, viewportId, highlightAlpha = 0.9, highlightSegment = true, animationLength = 750, highlightHideOthers = false, animationFunctionType = EasingFunctionEnum.EASE_IN_OUT, center) {
|
|
20248
|
+
const resolvedCenter = center ?? this._getSegmentCenter(segmentationId, segmentIndex);
|
|
20249
|
+
if (!resolvedCenter) {
|
|
20134
20250
|
console.warn('No center found for segmentation', segmentationId, segmentIndex);
|
|
20135
20251
|
return;
|
|
20136
20252
|
}
|
|
20137
20253
|
const {
|
|
20138
20254
|
world
|
|
20139
|
-
} =
|
|
20255
|
+
} = resolvedCenter;
|
|
20140
20256
|
|
|
20141
20257
|
// need to find which viewports are displaying the segmentation
|
|
20142
20258
|
const viewportIds = viewportId ? [viewportId] : this.getViewportIdsWithSegmentation(segmentationId);
|
|
@@ -20144,6 +20260,9 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
20144
20260
|
const {
|
|
20145
20261
|
viewport
|
|
20146
20262
|
} = (0,esm.getEnabledElementByViewportId)(viewportId);
|
|
20263
|
+
if (!viewport?.jumpToWorld) {
|
|
20264
|
+
return;
|
|
20265
|
+
}
|
|
20147
20266
|
viewport.jumpToWorld(world);
|
|
20148
20267
|
highlightSegment && this.highlightSegment(segmentationId, segmentIndex, viewportId, highlightAlpha, animationLength, highlightHideOthers, animationFunctionType);
|
|
20149
20268
|
});
|
|
@@ -20530,6 +20649,54 @@ class SegmentationService extends src/* PubSubService */.Rc {
|
|
|
20530
20649
|
}
|
|
20531
20650
|
}]);
|
|
20532
20651
|
}
|
|
20652
|
+
/**
|
|
20653
|
+
* Gets slice indices for contour segmentations by checking view references from annotation metadata
|
|
20654
|
+
* @private
|
|
20655
|
+
*/
|
|
20656
|
+
_getContourViewReferences(segmentationId, viewport, segmentIndex) {
|
|
20657
|
+
const segmentation = dist_esm.segmentation.state.getSegmentation(segmentationId);
|
|
20658
|
+
const contourData = segmentation.representationData[CONTOUR];
|
|
20659
|
+
if (!contourData || !contourData.annotationUIDsMap) {
|
|
20660
|
+
return;
|
|
20661
|
+
}
|
|
20662
|
+
const viewReferences = new Map();
|
|
20663
|
+
// Iterate through the annotationUIDsMap
|
|
20664
|
+
contourData.annotationUIDsMap.forEach((annotationUIDs, currentSegmentIndex) => {
|
|
20665
|
+
// Filter by segment index if specified
|
|
20666
|
+
if (segmentIndex !== undefined && currentSegmentIndex !== segmentIndex) {
|
|
20667
|
+
return;
|
|
20668
|
+
}
|
|
20669
|
+
// Process each annotation UID
|
|
20670
|
+
annotationUIDs.forEach(annotationUID => {
|
|
20671
|
+
const annotation = dist_esm.annotation.state.getAnnotation(annotationUID);
|
|
20672
|
+
if (!annotation?.metadata) {
|
|
20673
|
+
return;
|
|
20674
|
+
}
|
|
20675
|
+
const {
|
|
20676
|
+
metadata
|
|
20677
|
+
} = annotation;
|
|
20678
|
+
// Check if the viewport can view this annotation's view reference with navigation
|
|
20679
|
+
const isViewable = viewport.isReferenceViewable(metadata, {
|
|
20680
|
+
withNavigation: true
|
|
20681
|
+
});
|
|
20682
|
+
if (!isViewable) {
|
|
20683
|
+
return;
|
|
20684
|
+
}
|
|
20685
|
+
const {
|
|
20686
|
+
sliceIndex
|
|
20687
|
+
} = metadata;
|
|
20688
|
+
if (sliceIndex === undefined) {
|
|
20689
|
+
console.warn("Can't find slice index:", metadata);
|
|
20690
|
+
return;
|
|
20691
|
+
}
|
|
20692
|
+
viewReferences.set(sliceIndex, metadata);
|
|
20693
|
+
});
|
|
20694
|
+
});
|
|
20695
|
+
if (viewReferences.size === 0) {
|
|
20696
|
+
return;
|
|
20697
|
+
}
|
|
20698
|
+
return viewReferences;
|
|
20699
|
+
}
|
|
20533
20700
|
}
|
|
20534
20701
|
_SegmentationService = SegmentationService;
|
|
20535
20702
|
SegmentationService.REGISTRATION = {
|
|
@@ -21153,6 +21320,8 @@ var _CornerstoneViewportService;
|
|
|
21153
21320
|
|
|
21154
21321
|
|
|
21155
21322
|
|
|
21323
|
+
|
|
21324
|
+
|
|
21156
21325
|
const CornerstoneViewportService_EVENTS = {
|
|
21157
21326
|
VIEWPORT_DATA_CHANGED: 'event::cornerstoneViewportService:viewportDataChanged',
|
|
21158
21327
|
VIEWPORT_VOLUMES_CHANGED: 'event::cornerstoneViewportService:viewportVolumesChanged'
|
|
@@ -21596,8 +21765,7 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21596
21765
|
* viewport to display the image in where it matches, in order:
|
|
21597
21766
|
* * Active viewport that can be navigated to the given image without orientation change
|
|
21598
21767
|
* * Other viewport that can be navigated to the given image without orientation change
|
|
21599
|
-
* *
|
|
21600
|
-
* * Other viewport that can change orientation to display the image
|
|
21768
|
+
* * Best-aligned viewport that can display the image with an orientation change
|
|
21601
21769
|
*
|
|
21602
21770
|
* It returns `null` otherwise, indicating that a viewport needs display set/type
|
|
21603
21771
|
* changes in order to display the image.
|
|
@@ -21620,9 +21788,7 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21620
21788
|
if (!activeViewport) {
|
|
21621
21789
|
console.warn('No active viewport found for', activeViewportId);
|
|
21622
21790
|
}
|
|
21623
|
-
if (activeViewport?.isReferenceViewable(metadata, {
|
|
21624
|
-
withNavigation: true
|
|
21625
|
-
})) {
|
|
21791
|
+
if (activeViewport?.isReferenceViewable(metadata, WITH_NAVIGATION)) {
|
|
21626
21792
|
return activeViewportId;
|
|
21627
21793
|
}
|
|
21628
21794
|
|
|
@@ -21630,29 +21796,21 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21630
21796
|
// without considering orientation changes.
|
|
21631
21797
|
for (const id of this.viewportsById.keys()) {
|
|
21632
21798
|
const viewport = this.getCornerstoneViewport(id);
|
|
21633
|
-
if (viewport?.isReferenceViewable(metadata, {
|
|
21634
|
-
withNavigation: true
|
|
21635
|
-
})) {
|
|
21799
|
+
if (viewport?.isReferenceViewable(metadata, WITH_NAVIGATION)) {
|
|
21636
21800
|
return id;
|
|
21637
21801
|
}
|
|
21638
21802
|
}
|
|
21639
21803
|
|
|
21640
|
-
//
|
|
21641
|
-
// the
|
|
21642
|
-
|
|
21643
|
-
withNavigation: true,
|
|
21644
|
-
withOrientation: true
|
|
21645
|
-
})) {
|
|
21646
|
-
return activeViewportId;
|
|
21647
|
-
}
|
|
21804
|
+
// Compute view-plane alignment scores for all viewports to prefer the one
|
|
21805
|
+
// requiring the least orientation change when navigation-only is not possible.
|
|
21806
|
+
const viewportAlignmentData = this.getViewportAlignmentData(metadata);
|
|
21648
21807
|
|
|
21649
21808
|
// See if any viewport could show this with an orientation change
|
|
21650
|
-
for (const
|
|
21809
|
+
for (const {
|
|
21810
|
+
viewportId: id
|
|
21811
|
+
} of viewportAlignmentData) {
|
|
21651
21812
|
const viewport = this.getCornerstoneViewport(id);
|
|
21652
|
-
if (viewport?.isReferenceViewable(metadata, {
|
|
21653
|
-
withNavigation: true,
|
|
21654
|
-
withOrientation: true
|
|
21655
|
-
})) {
|
|
21813
|
+
if (viewport?.isReferenceViewable(metadata, WITH_ORIENTATION)) {
|
|
21656
21814
|
return id;
|
|
21657
21815
|
}
|
|
21658
21816
|
}
|
|
@@ -21662,24 +21820,51 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21662
21820
|
}
|
|
21663
21821
|
|
|
21664
21822
|
/**
|
|
21665
|
-
*
|
|
21666
|
-
*
|
|
21667
|
-
* the display set, but in the wrong orientation.
|
|
21668
|
-
*
|
|
21669
|
-
* The viewport will need to update the viewport type and/or display set to
|
|
21670
|
-
* display the resulting data.
|
|
21671
|
-
*
|
|
21672
|
-
* The first choice will be a viewport already showing the correct display set,
|
|
21673
|
-
* but showing it as a stack.
|
|
21823
|
+
* Given a metadata instance containing a planeRestriction, returns the
|
|
21824
|
+
* ordered list of best orientation match viewport ids.
|
|
21674
21825
|
*
|
|
21675
|
-
*
|
|
21676
|
-
*
|
|
21677
|
-
*
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21826
|
+
* This uses the planeRestriction preferentially as that one is more reliably
|
|
21827
|
+
* filled than the viewport normal since it is created from data points on
|
|
21828
|
+
* rehydration.
|
|
21829
|
+
*/
|
|
21830
|
+
getViewportAlignmentData(metadata) {
|
|
21831
|
+
const viewportAlignmentData = [];
|
|
21832
|
+
const {
|
|
21833
|
+
viewPlaneNormal: refViewPlaneNormal,
|
|
21834
|
+
planeRestriction
|
|
21835
|
+
} = metadata;
|
|
21836
|
+
const inPlaneVector1 = planeRestriction?.inPlaneVector1;
|
|
21837
|
+
const inPlaneVector2 = planeRestriction?.inPlaneVector2;
|
|
21838
|
+
for (const id of this.viewportsById.keys()) {
|
|
21839
|
+
const viewport = this.getCornerstoneViewport(id);
|
|
21840
|
+
const {
|
|
21841
|
+
viewPlaneNormal
|
|
21842
|
+
} = viewport.getCamera();
|
|
21843
|
+
if (!viewPlaneNormal) {
|
|
21844
|
+
continue;
|
|
21845
|
+
}
|
|
21846
|
+
let alignmentScore = 0;
|
|
21847
|
+
if (inPlaneVector1 || inPlaneVector2) {
|
|
21848
|
+
const inPlane1Score = inPlaneVector1 ? -Math.abs(gl_matrix_esm/* vec3.dot */.eR.dot(viewPlaneNormal, inPlaneVector1)) : 0;
|
|
21849
|
+
const inPlane2Score = inPlaneVector2 ? -Math.abs(gl_matrix_esm/* vec3.dot */.eR.dot(viewPlaneNormal, inPlaneVector2)) : 0;
|
|
21850
|
+
alignmentScore = inPlane1Score + inPlane2Score;
|
|
21851
|
+
} else if (refViewPlaneNormal) {
|
|
21852
|
+
alignmentScore = Math.abs(gl_matrix_esm/* vec3.dot */.eR.dot(viewPlaneNormal, refViewPlaneNormal));
|
|
21853
|
+
}
|
|
21854
|
+
viewportAlignmentData.push({
|
|
21855
|
+
viewportId: id,
|
|
21856
|
+
alignmentScore
|
|
21857
|
+
});
|
|
21858
|
+
}
|
|
21859
|
+
|
|
21860
|
+
// Try best-aligned viewports first
|
|
21861
|
+
viewportAlignmentData.sort((a, b) => b.alignmentScore - a.alignmentScore);
|
|
21862
|
+
return viewportAlignmentData;
|
|
21863
|
+
}
|
|
21864
|
+
|
|
21865
|
+
/**
|
|
21866
|
+
* Figures out which viewport to update when the viewport type needs to change.
|
|
21867
|
+
* Orchestrates the search strategies in order of preference.
|
|
21683
21868
|
*/
|
|
21684
21869
|
findUpdateableViewportConfiguration(activeViewportId, measurement) {
|
|
21685
21870
|
const {
|
|
@@ -21687,47 +21872,98 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21687
21872
|
displaySetInstanceUID
|
|
21688
21873
|
} = measurement;
|
|
21689
21874
|
const {
|
|
21690
|
-
|
|
21691
|
-
referencedImageId
|
|
21692
|
-
} = metadata;
|
|
21693
|
-
const {
|
|
21694
|
-
displaySetService,
|
|
21695
|
-
viewportGridService
|
|
21875
|
+
displaySetService
|
|
21696
21876
|
} = this.servicesManager.services;
|
|
21697
21877
|
const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID);
|
|
21878
|
+
|
|
21879
|
+
// 1. Determine the target Viewport Type (Stack vs Volume)
|
|
21880
|
+
const viewportType = this.determineTargetViewportType(displaySet, metadata);
|
|
21881
|
+
|
|
21882
|
+
// 2. Strategy: Find viewport already showing this volume
|
|
21883
|
+
const volumeMatch = this.findViewportShowingVolume(metadata, displaySetInstanceUID, viewportType);
|
|
21884
|
+
if (volumeMatch) {
|
|
21885
|
+
return volumeMatch;
|
|
21886
|
+
}
|
|
21887
|
+
|
|
21888
|
+
// 3. Strategy: Find viewport with compatible orientation (even if different display set)
|
|
21889
|
+
const compatibleMatch = this.findViewportConvertibleToVolume(metadata, displaySetInstanceUID, viewportType);
|
|
21890
|
+
if (compatibleMatch) {
|
|
21891
|
+
return compatibleMatch;
|
|
21892
|
+
}
|
|
21893
|
+
|
|
21894
|
+
// 4. Strategy: Find viewport with matching orientation via IOP
|
|
21895
|
+
const orientationMatch = this.findViewportWithMatchingOrientation(metadata, displaySetInstanceUID, viewportType);
|
|
21896
|
+
if (orientationMatch) {
|
|
21897
|
+
return orientationMatch;
|
|
21898
|
+
}
|
|
21899
|
+
|
|
21900
|
+
// 5. Fallback: Use the active viewport
|
|
21901
|
+
return {
|
|
21902
|
+
viewportId: activeViewportId,
|
|
21903
|
+
displaySetInstanceUID,
|
|
21904
|
+
viewportOptions: {
|
|
21905
|
+
viewportType
|
|
21906
|
+
}
|
|
21907
|
+
};
|
|
21908
|
+
}
|
|
21909
|
+
|
|
21910
|
+
/**
|
|
21911
|
+
* Determines if the viewport should be what is specified in
|
|
21912
|
+
* the viewportType of the display set, or stack if the display
|
|
21913
|
+
* set isn't reconstructable and there is a referenced image id, otherwise
|
|
21914
|
+
* volume.
|
|
21915
|
+
*
|
|
21916
|
+
* Expect there to be more rules in the future for different types of annotations/settings
|
|
21917
|
+
* such as 3d annotations.
|
|
21918
|
+
*/
|
|
21919
|
+
determineTargetViewportType(displaySet, metadata) {
|
|
21698
21920
|
let {
|
|
21699
21921
|
viewportType
|
|
21700
21922
|
} = displaySet;
|
|
21701
21923
|
if (!viewportType) {
|
|
21702
|
-
if (referencedImageId && !displaySet.isReconstructable) {
|
|
21924
|
+
if (metadata.referencedImageId && !displaySet.isReconstructable) {
|
|
21703
21925
|
viewportType = esm.Enums.ViewportType.STACK;
|
|
21704
|
-
} else if (volumeId) {
|
|
21926
|
+
} else if (metadata.volumeId) {
|
|
21705
21927
|
viewportType = 'volume';
|
|
21706
21928
|
}
|
|
21707
21929
|
}
|
|
21930
|
+
return viewportType;
|
|
21931
|
+
}
|
|
21708
21932
|
|
|
21709
|
-
|
|
21710
|
-
|
|
21711
|
-
|
|
21712
|
-
|
|
21713
|
-
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
|
|
21723
|
-
|
|
21724
|
-
|
|
21725
|
-
|
|
21933
|
+
/**
|
|
21934
|
+
* Find viewports that could be updated to be volumes to show this view.
|
|
21935
|
+
* Prefers a viewport already showing the right display set.
|
|
21936
|
+
*/
|
|
21937
|
+
findViewportShowingVolume(metadata, displaySetInstanceUID, viewportType) {
|
|
21938
|
+
if (!metadata.volumeId) {
|
|
21939
|
+
return null;
|
|
21940
|
+
}
|
|
21941
|
+
for (const id of this.viewportsById.keys()) {
|
|
21942
|
+
const viewport = this.getCornerstoneViewport(id);
|
|
21943
|
+
if (viewport?.isReferenceViewable(metadata, {
|
|
21944
|
+
asVolume: true,
|
|
21945
|
+
withNavigation: true
|
|
21946
|
+
})) {
|
|
21947
|
+
return {
|
|
21948
|
+
viewportId: id,
|
|
21949
|
+
displaySetInstanceUID,
|
|
21950
|
+
viewportOptions: {
|
|
21951
|
+
viewportType
|
|
21952
|
+
}
|
|
21953
|
+
};
|
|
21726
21954
|
}
|
|
21727
21955
|
}
|
|
21956
|
+
return null;
|
|
21957
|
+
}
|
|
21728
21958
|
|
|
21729
|
-
|
|
21730
|
-
|
|
21959
|
+
/**
|
|
21960
|
+
* Find a viewport that could be converted to a volume to show this annotation,
|
|
21961
|
+
* already showing the right display set.
|
|
21962
|
+
*/
|
|
21963
|
+
findViewportConvertibleToVolume(metadata, displaySetInstanceUID, viewportType) {
|
|
21964
|
+
const {
|
|
21965
|
+
viewportGridService
|
|
21966
|
+
} = this.servicesManager.services;
|
|
21731
21967
|
const altMetadata = {
|
|
21732
21968
|
...metadata,
|
|
21733
21969
|
volumeId: null,
|
|
@@ -21739,7 +21975,7 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21739
21975
|
if (!viewportDisplaySetUID || !viewport) {
|
|
21740
21976
|
continue;
|
|
21741
21977
|
}
|
|
21742
|
-
if (volumeId) {
|
|
21978
|
+
if (metadata.volumeId) {
|
|
21743
21979
|
altMetadata.volumeId = viewportDisplaySetUID;
|
|
21744
21980
|
}
|
|
21745
21981
|
altMetadata.FrameOfReferenceUID = this._getFrameOfReferenceUID(viewportDisplaySetUID);
|
|
@@ -21756,15 +21992,24 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
21756
21992
|
};
|
|
21757
21993
|
}
|
|
21758
21994
|
}
|
|
21995
|
+
return null;
|
|
21996
|
+
}
|
|
21759
21997
|
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21764
|
-
|
|
21765
|
-
|
|
21766
|
-
|
|
21767
|
-
|
|
21998
|
+
/**
|
|
21999
|
+
* Find a viewport with the closest orientation but on a different display set.
|
|
22000
|
+
*/
|
|
22001
|
+
findViewportWithMatchingOrientation(metadata, displaySetInstanceUID, viewportType) {
|
|
22002
|
+
const viewportAlignmentData = this.getViewportAlignmentData(metadata);
|
|
22003
|
+
if (viewportAlignmentData?.length) {
|
|
22004
|
+
return {
|
|
22005
|
+
...viewportAlignmentData[0],
|
|
22006
|
+
displaySetInstanceUID,
|
|
22007
|
+
viewportOptions: {
|
|
22008
|
+
viewportType
|
|
22009
|
+
}
|
|
22010
|
+
};
|
|
22011
|
+
}
|
|
22012
|
+
return null;
|
|
21768
22013
|
}
|
|
21769
22014
|
|
|
21770
22015
|
/**
|
|
@@ -22161,7 +22406,10 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
22161
22406
|
segmentationService.addSegmentationRepresentation(viewport.id, {
|
|
22162
22407
|
segmentationId,
|
|
22163
22408
|
predecessorImageId,
|
|
22164
|
-
type: representationType
|
|
22409
|
+
type: representationType,
|
|
22410
|
+
config: {
|
|
22411
|
+
blendMode: viewport?.getBlendMode?.() === 1 ? dist_esm_enums.BlendModes.LABELMAP_EDGE_PROJECTION_BLEND : undefined
|
|
22412
|
+
}
|
|
22165
22413
|
});
|
|
22166
22414
|
|
|
22167
22415
|
// store the segmentation presentation id in the viewport info
|
|
@@ -22390,7 +22638,10 @@ class CornerstoneViewportService extends src/* PubSubService */.Rc {
|
|
|
22390
22638
|
if (hydrated) {
|
|
22391
22639
|
segmentationService.addSegmentationRepresentation(viewport.id, {
|
|
22392
22640
|
segmentationId,
|
|
22393
|
-
type: representationType
|
|
22641
|
+
type: representationType,
|
|
22642
|
+
config: {
|
|
22643
|
+
blendMode: viewport?.getBlendMode?.() === 1 ? dist_esm_enums.BlendModes.LABELMAP_EDGE_PROJECTION_BLEND : undefined
|
|
22644
|
+
}
|
|
22394
22645
|
});
|
|
22395
22646
|
}
|
|
22396
22647
|
});
|
|
@@ -22957,9 +23208,9 @@ const {
|
|
|
22957
23208
|
denaturalizeDataset
|
|
22958
23209
|
} = dcmjs_es/* default.data */.Ay.data.DicomMetaDictionary;
|
|
22959
23210
|
const {
|
|
22960
|
-
transferDenaturalizedDataset,
|
|
22961
|
-
fixMultiValueKeys
|
|
22962
|
-
} = default_src
|
|
23211
|
+
/* transferDenaturalizedDataset */ "If": transferDenaturalizedDataset,
|
|
23212
|
+
/* fixMultiValueKeys */ "Uk": fixMultiValueKeys
|
|
23213
|
+
} = default_src/* dicomWebUtils */.CA;
|
|
22963
23214
|
const SOP_CLASS_UIDS = {
|
|
22964
23215
|
VL_WHOLE_SLIDE_MICROSCOPY_IMAGE_STORAGE: '1.2.840.10008.5.1.4.1.1.77.1.6'
|
|
22965
23216
|
};
|
|
@@ -23116,7 +23367,7 @@ function SegmentationUtilityButton(props) {
|
|
|
23116
23367
|
isActive,
|
|
23117
23368
|
id
|
|
23118
23369
|
} = props;
|
|
23119
|
-
const activeSegmentationUtility = (0,default_src
|
|
23370
|
+
const activeSegmentationUtility = (0,default_src/* useUIStateStore */.FS)(store => store.uiState.activeSegmentationUtility);
|
|
23120
23371
|
const toolButtonClassName = (0,ui_next_src.cn)('w-7 h-7 text-primary hover:text-primary hover:!bg-primary/30', className, isActive && 'bg-primary/30');
|
|
23121
23372
|
const handleMouseDownCapture = (0,react.useCallback)(event => {
|
|
23122
23373
|
if (activeSegmentationUtility === id) {
|
|
@@ -23215,7 +23466,7 @@ const hasExportableContourData = contour => {
|
|
|
23215
23466
|
|
|
23216
23467
|
function PanelSegmentation({
|
|
23217
23468
|
children,
|
|
23218
|
-
|
|
23469
|
+
segmentationRepresentationTypes
|
|
23219
23470
|
}) {
|
|
23220
23471
|
const {
|
|
23221
23472
|
commandsManager,
|
|
@@ -23236,8 +23487,8 @@ function PanelSegmentation({
|
|
|
23236
23487
|
[esm_enums.SegmentationRepresentations.Contour]: toolbarService.sections.contourSegmentationUtilities
|
|
23237
23488
|
};
|
|
23238
23489
|
const selectedSegmentationsForViewportMap = useSelectedSegmentationsForViewportStore(store => store.selectedSegmentationsForViewport[activeViewportId]);
|
|
23239
|
-
const selectedSegmentationIdForType =
|
|
23240
|
-
const buttonSection = utilitiesSectionMap[
|
|
23490
|
+
const selectedSegmentationIdForType = segmentationRepresentationTypes ? segmentationRepresentationTypes.reduce((selectedSegmentation, type) => selectedSegmentation || (selectedSegmentationsForViewportMap?.has(type) ? selectedSegmentationsForViewportMap?.get(type) : undefined), undefined) : segmentationService?.getActiveSegmentation(activeViewportId)?.segmentationId;
|
|
23491
|
+
const buttonSection = segmentationRepresentationTypes?.[0] ? utilitiesSectionMap[segmentationRepresentationTypes[0]] : undefined;
|
|
23241
23492
|
const {
|
|
23242
23493
|
activeToolOptions: activeUtilityOptions
|
|
23243
23494
|
} = (0,src/* useActiveToolOptions */.KP)({
|
|
@@ -23247,7 +23498,7 @@ function PanelSegmentation({
|
|
|
23247
23498
|
segmentationsWithRepresentations,
|
|
23248
23499
|
disabled
|
|
23249
23500
|
} = (0,useActiveViewportSegmentationRepresentations/* useActiveViewportSegmentationRepresentations */.c)();
|
|
23250
|
-
const setUIState = (0,default_src
|
|
23501
|
+
const setUIState = (0,default_src/* useUIStateStore */.FS)(store => store.setUIState);
|
|
23251
23502
|
|
|
23252
23503
|
// useEffect for handling clicks on any of the non-active viewports.
|
|
23253
23504
|
// The ViewportGrid stops the propagation of pointer/mouse events
|
|
@@ -23326,7 +23577,7 @@ function PanelSegmentation({
|
|
|
23326
23577
|
segmentIndex
|
|
23327
23578
|
});
|
|
23328
23579
|
},
|
|
23329
|
-
onSegmentCopy:
|
|
23580
|
+
onSegmentCopy: segmentationRepresentationTypes?.[0] === esm_enums.SegmentationRepresentations.Contour ? (segmentationId, segmentIndex) => {
|
|
23330
23581
|
commandsManager.run('copyContourSegment', {
|
|
23331
23582
|
sourceSegmentInfo: {
|
|
23332
23583
|
segmentationId,
|
|
@@ -23489,13 +23740,13 @@ function PanelSegmentation({
|
|
|
23489
23740
|
disabled,
|
|
23490
23741
|
data: segmentationsWithRepresentations,
|
|
23491
23742
|
mode: segmentationTableMode,
|
|
23492
|
-
title: `${
|
|
23743
|
+
title: `${segmentationRepresentationTypes?.[0] ? `${segmentationRepresentationTypes[0]} ` : ''}Segmentations`,
|
|
23493
23744
|
exportOptions,
|
|
23494
23745
|
disableEditing,
|
|
23495
23746
|
onSegmentationAdd,
|
|
23496
23747
|
showAddSegment,
|
|
23497
23748
|
renderInactiveSegmentations: handlers.getRenderInactiveSegmentations(),
|
|
23498
|
-
|
|
23749
|
+
segmentationRepresentationTypes,
|
|
23499
23750
|
selectedSegmentationIdForType,
|
|
23500
23751
|
...handlers
|
|
23501
23752
|
};
|
|
@@ -23508,7 +23759,7 @@ function PanelSegmentation({
|
|
|
23508
23759
|
IconContainer: components_SegmentationUtilityButton
|
|
23509
23760
|
}, /*#__PURE__*/react.createElement("div", {
|
|
23510
23761
|
className: "flex flex-wrap gap-[3px] bg-transparent pb-[2px] pl-[8px] pt-[6px]"
|
|
23511
|
-
}, /*#__PURE__*/react.createElement(default_src
|
|
23762
|
+
}, /*#__PURE__*/react.createElement(default_src/* Toolbar */.M7, {
|
|
23512
23763
|
buttonSection: buttonSection
|
|
23513
23764
|
})));
|
|
23514
23765
|
};
|
|
@@ -23556,16 +23807,17 @@ const workerFn = () => {
|
|
|
23556
23807
|
name: 'histogram-worker' // name used by the browser to name the worker
|
|
23557
23808
|
});
|
|
23558
23809
|
};
|
|
23810
|
+
|
|
23811
|
+
// Register worker once at module load time
|
|
23812
|
+
workerManager.registerWorker('histogram-worker', workerFn, WorkerOptions);
|
|
23559
23813
|
const getViewportVolumeHistogram = async (viewport, volume, options) => {
|
|
23560
|
-
workerManager.registerWorker('histogram-worker', workerFn, WorkerOptions);
|
|
23561
23814
|
const volumeImageData = viewport.getImageData(volume.volumeId);
|
|
23562
23815
|
if (!volumeImageData) {
|
|
23563
23816
|
return undefined;
|
|
23564
23817
|
}
|
|
23565
23818
|
let scalarData = volume.scalarData;
|
|
23566
23819
|
if (volume.numTimePoints > 1) {
|
|
23567
|
-
|
|
23568
|
-
scalarData = volume.voxelManager.getTimePointScalarData(targetTimePoint);
|
|
23820
|
+
scalarData = volume.voxelManager.getDimensionGroupScalarData(volume.numTimePoints);
|
|
23569
23821
|
} else {
|
|
23570
23822
|
scalarData = volume.voxelManager.getCompleteScalarDataArray();
|
|
23571
23823
|
}
|
|
@@ -23614,6 +23866,9 @@ const getViewportVolumeHistogram = async (viewport, volume, options) => {
|
|
|
23614
23866
|
* Gets node opacity from volume actor
|
|
23615
23867
|
*/
|
|
23616
23868
|
const getNodeOpacity = (volumeActor, nodeIndex) => {
|
|
23869
|
+
if (!volumeActor) {
|
|
23870
|
+
return undefined;
|
|
23871
|
+
}
|
|
23617
23872
|
const volumeOpacity = volumeActor.getProperty().getScalarOpacity(0);
|
|
23618
23873
|
const nodeValue = [];
|
|
23619
23874
|
volumeOpacity.getNodeValue(nodeIndex, nodeValue);
|
|
@@ -23624,6 +23879,9 @@ const getNodeOpacity = (volumeActor, nodeIndex) => {
|
|
|
23624
23879
|
* Checks if the opacity applied to the PET volume follows a specific pattern
|
|
23625
23880
|
*/
|
|
23626
23881
|
const isPetVolumeWithDefaultOpacity = (volumeId, volumeActor) => {
|
|
23882
|
+
if (!volumeActor) {
|
|
23883
|
+
return false;
|
|
23884
|
+
}
|
|
23627
23885
|
const volume = esm.cache.getVolume(volumeId);
|
|
23628
23886
|
if (!volume || volume.metadata.Modality !== 'PT') {
|
|
23629
23887
|
return false;
|
|
@@ -23655,6 +23913,9 @@ const isPetVolumeWithDefaultOpacity = (volumeId, volumeActor) => {
|
|
|
23655
23913
|
* Checks if volume has constant opacity
|
|
23656
23914
|
*/
|
|
23657
23915
|
const isVolumeWithConstantOpacity = volumeActor => {
|
|
23916
|
+
if (!volumeActor) {
|
|
23917
|
+
return false;
|
|
23918
|
+
}
|
|
23658
23919
|
const volumeOpacity = volumeActor.getProperty().getScalarOpacity(0);
|
|
23659
23920
|
const opacitySize = volumeOpacity.getSize();
|
|
23660
23921
|
const firstNodeValue = [];
|
|
@@ -23681,7 +23942,7 @@ const getWindowLevelsData = async (viewport, viewportInfo, getVolumeOpacity) =>
|
|
|
23681
23942
|
const viewportProperties = viewport.getProperties();
|
|
23682
23943
|
const {
|
|
23683
23944
|
voiRange
|
|
23684
|
-
} = viewportProperties;
|
|
23945
|
+
} = viewportProperties || {};
|
|
23685
23946
|
const viewportVoi = voiRange ? {
|
|
23686
23947
|
windowWidth: voiRange.upper - voiRange.lower,
|
|
23687
23948
|
windowCenter: voiRange.lower + (voiRange.upper - voiRange.lower) / 2
|
|
@@ -24280,6 +24541,7 @@ function StudySummaryFromMetadata(props) {
|
|
|
24280
24541
|
|
|
24281
24542
|
|
|
24282
24543
|
|
|
24544
|
+
|
|
24283
24545
|
function StudyMeasurementsActions({
|
|
24284
24546
|
items,
|
|
24285
24547
|
StudyInstanceUID,
|
|
@@ -24289,6 +24551,9 @@ function StudyMeasurementsActions({
|
|
|
24289
24551
|
const {
|
|
24290
24552
|
commandsManager
|
|
24291
24553
|
} = (0,src/* useSystem */.Jg)();
|
|
24554
|
+
const {
|
|
24555
|
+
t
|
|
24556
|
+
} = (0,es/* useTranslation */.Bd)('MeasurementTable');
|
|
24292
24557
|
const disabled = !items?.length;
|
|
24293
24558
|
if (disabled) {
|
|
24294
24559
|
return null;
|
|
@@ -24329,7 +24594,7 @@ function StudyMeasurementsActions({
|
|
|
24329
24594
|
measurementFilter
|
|
24330
24595
|
});
|
|
24331
24596
|
}
|
|
24332
|
-
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Add, null),
|
|
24597
|
+
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Add, null), t('Create SR')), /*#__PURE__*/react.createElement(ui_next_src/* Button */.$nd, {
|
|
24333
24598
|
size: "sm",
|
|
24334
24599
|
variant: "ghost",
|
|
24335
24600
|
className: "pl-0.5",
|
|
@@ -24343,7 +24608,7 @@ function StudyMeasurementsActions({
|
|
|
24343
24608
|
measurementFilter
|
|
24344
24609
|
});
|
|
24345
24610
|
}
|
|
24346
|
-
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Delete, null),
|
|
24611
|
+
}, /*#__PURE__*/react.createElement(ui_next_src/* Icons */.FI1.Delete, null), t('Delete'))));
|
|
24347
24612
|
}
|
|
24348
24613
|
/* harmony default export */ const components_StudyMeasurementsActions = (StudyMeasurementsActions);
|
|
24349
24614
|
;// ../../../extensions/cornerstone/src/components/StudySummaryWithActions.tsx
|
|
@@ -24549,7 +24814,7 @@ const getPanelModule = ({
|
|
|
24549
24814
|
configuration: {
|
|
24550
24815
|
...props?.configuration
|
|
24551
24816
|
},
|
|
24552
|
-
|
|
24817
|
+
segmentationRepresentationTypes: props?.segmentationRepresentationTypes
|
|
24553
24818
|
});
|
|
24554
24819
|
};
|
|
24555
24820
|
const wrappedPanelSegmentationNoHeader = props => {
|
|
@@ -24560,17 +24825,17 @@ const getPanelModule = ({
|
|
|
24560
24825
|
configuration: {
|
|
24561
24826
|
...props?.configuration
|
|
24562
24827
|
},
|
|
24563
|
-
|
|
24828
|
+
segmentationRepresentationTypes: props?.segmentationRepresentationTypes
|
|
24564
24829
|
});
|
|
24565
24830
|
};
|
|
24566
24831
|
const wrappedPanelSegmentationWithTools = props => {
|
|
24567
24832
|
const {
|
|
24568
24833
|
t
|
|
24569
|
-
} = (0,es/* useTranslation */.Bd)('
|
|
24570
|
-
const tKey = `${props.
|
|
24834
|
+
} = (0,es/* useTranslation */.Bd)('SegmentationPanel');
|
|
24835
|
+
const tKey = `${props.segmentationRepresentationTypes?.[0] ?? 'Segmentation'} tools`;
|
|
24571
24836
|
const tValue = t(tKey);
|
|
24572
|
-
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(default_src
|
|
24573
|
-
buttonSectionId: toolSectionMap[props.
|
|
24837
|
+
return /*#__PURE__*/react.createElement(react.Fragment, null, /*#__PURE__*/react.createElement(default_src/* Toolbox */.OO, {
|
|
24838
|
+
buttonSectionId: toolSectionMap[props.segmentationRepresentationTypes?.[0]],
|
|
24574
24839
|
title: tValue
|
|
24575
24840
|
}), /*#__PURE__*/react.createElement(PanelSegmentation, {
|
|
24576
24841
|
commandsManager: commandsManager,
|
|
@@ -24579,7 +24844,7 @@ const getPanelModule = ({
|
|
|
24579
24844
|
configuration: {
|
|
24580
24845
|
...props?.configuration
|
|
24581
24846
|
},
|
|
24582
|
-
|
|
24847
|
+
segmentationRepresentationTypes: props?.segmentationRepresentationTypes
|
|
24583
24848
|
}));
|
|
24584
24849
|
};
|
|
24585
24850
|
return [{
|
|
@@ -24611,19 +24876,19 @@ const getPanelModule = ({
|
|
|
24611
24876
|
name: 'panelSegmentationWithToolsLabelMap',
|
|
24612
24877
|
iconName: 'tab-segmentation',
|
|
24613
24878
|
iconLabel: 'Segmentation',
|
|
24614
|
-
label: i18n_src/* default */.A.t('
|
|
24879
|
+
label: i18n_src/* default */.A.t('SegmentationPanel:Labelmap'),
|
|
24615
24880
|
component: props => wrappedPanelSegmentationWithTools({
|
|
24616
24881
|
...props,
|
|
24617
|
-
|
|
24882
|
+
segmentationRepresentationTypes: [esm_enums.SegmentationRepresentations.Labelmap, esm_enums.SegmentationRepresentations.Surface]
|
|
24618
24883
|
})
|
|
24619
24884
|
}, {
|
|
24620
24885
|
name: 'panelSegmentationWithToolsContour',
|
|
24621
24886
|
iconName: 'tab-contours',
|
|
24622
24887
|
iconLabel: 'Segmentation',
|
|
24623
|
-
label: i18n_src/* default */.A.t('
|
|
24888
|
+
label: i18n_src/* default */.A.t('SegmentationPanel:Contour'),
|
|
24624
24889
|
component: props => wrappedPanelSegmentationWithTools({
|
|
24625
24890
|
...props,
|
|
24626
|
-
|
|
24891
|
+
segmentationRepresentationTypes: [esm_enums.SegmentationRepresentations.Contour]
|
|
24627
24892
|
})
|
|
24628
24893
|
}];
|
|
24629
24894
|
};
|
|
@@ -24663,7 +24928,7 @@ const handleSegmentChange = ({
|
|
|
24663
24928
|
// Functions below use the segmentIndex object attribute so we have to do the conversion
|
|
24664
24929
|
const segmentIndex = Object.values(segments)[newSelectedSegmentIndex]?.segmentIndex;
|
|
24665
24930
|
segmentationService.setActiveSegment(segmentationId, segmentIndex);
|
|
24666
|
-
segmentationService.
|
|
24931
|
+
segmentationService.jumpToSegmentNext(segmentationId, segmentIndex, undefined, direction);
|
|
24667
24932
|
selectedSegmentObjectIndex = newSelectedSegmentIndex;
|
|
24668
24933
|
};
|
|
24669
24934
|
;// ../../../extensions/cornerstone/src/utils/isReferenceViewable.ts
|
|
@@ -25120,15 +25385,22 @@ const setUpAnnotationEventHandlers = () => {
|
|
|
25120
25385
|
};
|
|
25121
25386
|
return [annotationInterpolationProcessCompletedUnsubscribe];
|
|
25122
25387
|
};
|
|
25388
|
+
// EXTERNAL MODULE: ../../../node_modules/immutability-helper/index.js
|
|
25389
|
+
var immutability_helper = __webpack_require__(1752);
|
|
25390
|
+
var immutability_helper_default = /*#__PURE__*/__webpack_require__.n(immutability_helper);
|
|
25123
25391
|
;// ../../../extensions/cornerstone/src/components/MeasurementsMenu.tsx
|
|
25124
25392
|
|
|
25125
25393
|
|
|
25126
25394
|
|
|
25395
|
+
|
|
25127
25396
|
function MeasumentsMenu(props) {
|
|
25128
25397
|
const {
|
|
25129
25398
|
group,
|
|
25130
25399
|
classNames
|
|
25131
25400
|
} = props;
|
|
25401
|
+
const {
|
|
25402
|
+
t
|
|
25403
|
+
} = (0,es/* useTranslation */.Bd)('MeasurementTable');
|
|
25132
25404
|
if (!group.items?.length) {
|
|
25133
25405
|
console.log('No items to iterate', group.items);
|
|
25134
25406
|
return null;
|
|
@@ -25160,7 +25432,7 @@ function MeasumentsMenu(props) {
|
|
|
25160
25432
|
size: "icon",
|
|
25161
25433
|
variant: "ghost",
|
|
25162
25434
|
className: `h-6 w-6 transition-opacity ${isSelected || !isVisible ? 'opacity-100' : 'opacity-50 group-hover:opacity-100'}`,
|
|
25163
|
-
"aria-label": isVisible ? 'Hide' : 'Show',
|
|
25435
|
+
"aria-label": isVisible ? t('Hide') : t('Show'),
|
|
25164
25436
|
onClick: e => {
|
|
25165
25437
|
e.stopPropagation();
|
|
25166
25438
|
onAction(e, ['jumpToMeasurement', 'toggleVisibilityMeasurement']);
|
|
@@ -25189,7 +25461,7 @@ function MeasumentsMenu(props) {
|
|
|
25189
25461
|
className: "text-foreground"
|
|
25190
25462
|
}), /*#__PURE__*/react.createElement("span", {
|
|
25191
25463
|
className: "pl-2"
|
|
25192
|
-
},
|
|
25464
|
+
}, t('Delete'))))));
|
|
25193
25465
|
}
|
|
25194
25466
|
/* harmony default export */ const MeasurementsMenu = (MeasumentsMenu);
|
|
25195
25467
|
;// ../../../extensions/cornerstone/src/components/PanelAccordionTrigger.tsx
|
|
@@ -25480,6 +25752,7 @@ function src_extends() { return src_extends = Object.assign ? Object.assign.bind
|
|
|
25480
25752
|
|
|
25481
25753
|
|
|
25482
25754
|
|
|
25755
|
+
|
|
25483
25756
|
|
|
25484
25757
|
|
|
25485
25758
|
const {
|
|
@@ -25493,7 +25766,7 @@ const OHIFCornerstoneViewport = props => {
|
|
|
25493
25766
|
fallback: /*#__PURE__*/react.createElement("div", null, "Loading...")
|
|
25494
25767
|
}, /*#__PURE__*/react.createElement(Component, props));
|
|
25495
25768
|
};
|
|
25496
|
-
const
|
|
25769
|
+
const DEFAULT_STACK_RETRIEVE_OPTIONS = {
|
|
25497
25770
|
retrieveOptions: {
|
|
25498
25771
|
single: {
|
|
25499
25772
|
streaming: true,
|
|
@@ -25501,6 +25774,11 @@ const stackRetrieveOptions = {
|
|
|
25501
25774
|
}
|
|
25502
25775
|
}
|
|
25503
25776
|
};
|
|
25777
|
+
|
|
25778
|
+
/** Normalize to immutability-helper spec: plain object → $merge, otherwise use as-is. */
|
|
25779
|
+
const toUpdateSpec = obj => obj != null && typeof obj === 'object' && Object.keys(obj).some(k => k.startsWith('$')) ? obj : {
|
|
25780
|
+
$merge: obj ?? {}
|
|
25781
|
+
};
|
|
25504
25782
|
const unsubscriptions = [];
|
|
25505
25783
|
/**
|
|
25506
25784
|
*
|
|
@@ -25512,7 +25790,8 @@ const cornerstoneExtension = {
|
|
|
25512
25790
|
id: id,
|
|
25513
25791
|
onModeEnter: ({
|
|
25514
25792
|
servicesManager,
|
|
25515
|
-
commandsManager
|
|
25793
|
+
commandsManager,
|
|
25794
|
+
extensionManager
|
|
25516
25795
|
}) => {
|
|
25517
25796
|
const {
|
|
25518
25797
|
cornerstoneViewportService,
|
|
@@ -25539,10 +25818,17 @@ const cornerstoneExtension = {
|
|
|
25539
25818
|
// This interleaves images and replicates them for low-resolution depth volume
|
|
25540
25819
|
// reconstruction, which progressively improves
|
|
25541
25820
|
imageRetrieveMetadataProvider.add('volume', esm.ProgressiveRetrieveImages.interleavedRetrieveStages);
|
|
25542
|
-
|
|
25543
|
-
|
|
25544
|
-
|
|
25545
|
-
|
|
25821
|
+
|
|
25822
|
+
/**
|
|
25823
|
+
* Stack retrieve options: read from active data source configuration.
|
|
25824
|
+
* Pass an immutability-helper spec (e.g. { $merge: {...} } or { $set: {...} }) in
|
|
25825
|
+
* stackRetrieveOptions to customize. Plain object is treated as $merge for backward compat.
|
|
25826
|
+
* Set streaming: false for uncompressed DICOM that requires full file before decode.
|
|
25827
|
+
*/
|
|
25828
|
+
const sourceConfig = extensionManager?.getActiveDataSource?.()?.[0]?.getConfig?.() ?? {};
|
|
25829
|
+
const config = sourceConfig.stackRetrieveOptions ?? {};
|
|
25830
|
+
const stackOptions = immutability_helper_default()(DEFAULT_STACK_RETRIEVE_OPTIONS, toUpdateSpec(config));
|
|
25831
|
+
imageRetrieveMetadataProvider.add('stack', stackOptions);
|
|
25546
25832
|
},
|
|
25547
25833
|
getPanelModule: src_getPanelModule,
|
|
25548
25834
|
onModeExit: ({
|
|
@@ -25566,7 +25852,7 @@ const cornerstoneExtension = {
|
|
|
25566
25852
|
useLutPresentationStore/* useLutPresentationStore */.I.getState().clearLutPresentationStore();
|
|
25567
25853
|
usePositionPresentationStore/* usePositionPresentationStore */.q.getState().clearPositionPresentationStore();
|
|
25568
25854
|
useSynchronizersStore/* useSynchronizersStore */.U.getState().clearSynchronizersStore();
|
|
25569
|
-
default_src
|
|
25855
|
+
default_src/* useToggleOneUpViewportGridStore */.Yd.getState().clearToggleOneUpViewportGridStore();
|
|
25570
25856
|
useSegmentationPresentationStore/* useSegmentationPresentationStore */.v.getState().clearSegmentationPresentationStore();
|
|
25571
25857
|
useSelectedSegmentationsForViewportStore.getState().clearSelectedSegmentationsForViewportStore();
|
|
25572
25858
|
segmentationService.removeAllSegmentations();
|
|
@@ -25657,10 +25943,10 @@ const cornerstoneExtension = {
|
|
|
25657
25943
|
|
|
25658
25944
|
/* harmony default export */ const cornerstone_src = (cornerstoneExtension);
|
|
25659
25945
|
|
|
25660
|
-
/***/ }
|
|
25946
|
+
/***/ },
|
|
25661
25947
|
|
|
25662
|
-
/***/ 71353
|
|
25663
|
-
|
|
25948
|
+
/***/ 71353
|
|
25949
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
25664
25950
|
|
|
25665
25951
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25666
25952
|
/* harmony export */ cL: () => (/* binding */ reset),
|
|
@@ -25699,10 +25985,10 @@ const reset = () => {
|
|
|
25699
25985
|
};
|
|
25700
25986
|
|
|
25701
25987
|
|
|
25702
|
-
/***/ }
|
|
25988
|
+
/***/ },
|
|
25703
25989
|
|
|
25704
|
-
/***/ 46026
|
|
25705
|
-
|
|
25990
|
+
/***/ 46026
|
|
25991
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
25706
25992
|
|
|
25707
25993
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25708
25994
|
/* harmony export */ FG: () => (/* binding */ JOIN_STR),
|
|
@@ -25742,10 +26028,10 @@ const addUniqueIndex = (arr, key, viewports, isUpdatingSameViewport) => {
|
|
|
25742
26028
|
};
|
|
25743
26029
|
|
|
25744
26030
|
|
|
25745
|
-
/***/ }
|
|
26031
|
+
/***/ },
|
|
25746
26032
|
|
|
25747
|
-
/***/ 10182
|
|
25748
|
-
|
|
26033
|
+
/***/ 10182
|
|
26034
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
25749
26035
|
|
|
25750
26036
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25751
26037
|
/* harmony export */ I: () => (/* binding */ useLutPresentationStore)
|
|
@@ -25857,10 +26143,10 @@ const useLutPresentationStore = (0,zustand__WEBPACK_IMPORTED_MODULE_0__/* .creat
|
|
|
25857
26143
|
name: 'LutPresentationStore'
|
|
25858
26144
|
}) : createLutPresentationStore);
|
|
25859
26145
|
|
|
25860
|
-
/***/ }
|
|
26146
|
+
/***/ },
|
|
25861
26147
|
|
|
25862
|
-
/***/ 44646
|
|
25863
|
-
|
|
26148
|
+
/***/ 44646
|
|
26149
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
25864
26150
|
|
|
25865
26151
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25866
26152
|
/* harmony export */ q: () => (/* binding */ usePositionPresentationStore)
|
|
@@ -25968,10 +26254,10 @@ const usePositionPresentationStore = (0,zustand__WEBPACK_IMPORTED_MODULE_0__/* .
|
|
|
25968
26254
|
name: 'PositionPresentationStore'
|
|
25969
26255
|
}) : createPositionPresentationStore);
|
|
25970
26256
|
|
|
25971
|
-
/***/ }
|
|
26257
|
+
/***/ },
|
|
25972
26258
|
|
|
25973
|
-
/***/ 2847
|
|
25974
|
-
|
|
26259
|
+
/***/ 2847
|
|
26260
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
25975
26261
|
|
|
25976
26262
|
|
|
25977
26263
|
// EXPORTS
|
|
@@ -26177,10 +26463,10 @@ const useSegmentationPresentationStore = (0,esm/* create */.vt)()(DEBUG_STORE ?
|
|
|
26177
26463
|
name: 'Segmentation Presentation Store'
|
|
26178
26464
|
}) : createSegmentationPresentationStore);
|
|
26179
26465
|
|
|
26180
|
-
/***/ }
|
|
26466
|
+
/***/ },
|
|
26181
26467
|
|
|
26182
|
-
/***/ 68578
|
|
26183
|
-
|
|
26468
|
+
/***/ 68578
|
|
26469
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
26184
26470
|
|
|
26185
26471
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
26186
26472
|
/* harmony export */ U: () => (/* binding */ useSynchronizersStore)
|
|
@@ -26241,6 +26527,6 @@ const useSynchronizersStore = (0,zustand__WEBPACK_IMPORTED_MODULE_0__/* .create
|
|
|
26241
26527
|
name: 'SynchronizersStore'
|
|
26242
26528
|
}) : createSynchronizersStore);
|
|
26243
26529
|
|
|
26244
|
-
/***/ }
|
|
26530
|
+
/***/ }
|
|
26245
26531
|
|
|
26246
26532
|
}]);
|