@ohif/app 3.10.0 → 3.10.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/{2932.bundle.e69c37b969d1844a01d3.js → 2932.bundle.038f79dbbfdd9d1f387b.js} +2 -2
- package/dist/{3984.bundle.340254f70eefe76b8133.js → 3984.bundle.592161af4b618c9dd56f.js} +7 -7
- package/dist/{6029.bundle.c5d0baf943c367e7bcb8.js → 6029.bundle.43e04238ac01880fa66c.js} +165 -12
- package/dist/{9464.bundle.bc0e50f8b60edfdcb9d4.js → 6066.bundle.345453ace06e86bc481c.js} +137 -5
- package/dist/app.bundle.css +2 -2
- package/dist/{app.bundle.c8d19c9902cb9ea1bb55.js → app.bundle.d09601053966ecdcfe4b.js} +33 -36
- package/dist/index.html +1 -1
- package/dist/{polySeg.bundle.707e6d9b0342d06ffa49.js → polySeg.bundle.7445d00e1e9ef623d0f1.js} +3 -3
- package/dist/sw.js +1 -1
- package/package.json +19 -19
- /package/dist/{1459.bundle.b2f3d51daf0583cbcf0b.js → 1459.bundle.4b6682c8673e199edf64.js} +0 -0
- /package/dist/{1807.bundle.a22cda201e86b973c886.js → 1807.bundle.e8c6890ca68e62f46990.js} +0 -0
- /package/dist/{1919.bundle.fad7cb115701d2afd06f.js → 1919.bundle.6f7de53921f3710a1d54.js} +0 -0
- /package/dist/{213.bundle.36febd3a2c038128c92e.js → 213.bundle.d8495e69f1d1405d0356.js} +0 -0
- /package/dist/{2424.bundle.8e789b3206f967d42032.js → 2424.bundle.ef98022039ea6e87cfd9.js} +0 -0
- /package/dist/{3166.bundle.0f97235b970e279a4707.js → 3166.bundle.40162f1d9f9f5fc16b16.js} +0 -0
- /package/dist/{3658.bundle.d8fd1c155e97829ce8ee.js → 3658.bundle.04fdfe11b9d38cd5f3c6.js} +0 -0
- /package/dist/{4113.bundle.49f82d38be003e19e515.js → 4113.bundle.7ec6da0eb1ab98e1b791.js} +0 -0
- /package/dist/{4759.bundle.a31dcfd4c3054e2ea980.js → 4759.bundle.d1fdc8e827d54c0f40c9.js} +0 -0
- /package/dist/{4991.bundle.f72a01fd158167a94ae8.js → 4991.bundle.8578c7880edc0fbef374.js} +0 -0
- /package/dist/{5674.bundle.b9c6a5039c2113262ae5.js → 5674.bundle.49f5a714f733cf20d560.js} +0 -0
- /package/dist/{6027.bundle.9f8dfb6fed029717ef3a.js → 6027.bundle.155cbff7fa97c7ede627.js} +0 -0
- /package/dist/{6201.bundle.83db906635608599520a.js → 6201.bundle.e0d8d1c967a9daed4662.js} +0 -0
- /package/dist/{7197.bundle.e5fa41fa6bfd9a88c7ad.js → 7197.bundle.a9c6429f2859a8feeded.js} +0 -0
- /package/dist/{7241.bundle.3ec18bc9a5464d5c5c67.js → 7241.bundle.7097a0cd314605d766f5.js} +0 -0
- /package/dist/{7639.bundle.a24b3a7b0abb6178e9bd.js → 7639.bundle.a659acbf2ab7f3f2e8f4.js} +0 -0
- /package/dist/{810.bundle.4e580dc32bbcd921ff41.js → 810.bundle.86ba4f6f1311ccc28d41.js} +0 -0
- /package/dist/{8185.bundle.0dde37bbed6dbbf102d3.js → 8185.bundle.b2252d9ff14ce760df9c.js} +0 -0
- /package/dist/{85.bundle.31ab810e6a6779ff067c.js → 85.bundle.e65ed829e1a136e33576.js} +0 -0
- /package/dist/{8558.bundle.51f082f0c68b3aedf54a.js → 8558.bundle.5b67110ba3e66f5525ae.js} +0 -0
- /package/dist/{8815.bundle.7db9450eac27c6ad9054.js → 8815.bundle.c8a97b220635e9b15109.js} +0 -0
- /package/dist/{9026.bundle.37f3be98189966cc21e4.js → 9026.bundle.eb2ae9e2311a6a620751.js} +0 -0
- /package/dist/{934.bundle.33cc4ef2fdfd34987c87.js → 934.bundle.c446dfb396152899756f.js} +0 -0
- /package/dist/{963.bundle.abae2bcc3d87b9260e6a.js → 963.bundle.88152346007c0f5049a3.js} +0 -0
- /package/dist/{9862.bundle.ccb787865a82b9696113.js → 9862.bundle.87d8249a9cf1d8cf579d.js} +0 -0
|
@@ -1370,7 +1370,7 @@ function PanelMeasurementTableTracking(props) {
|
|
|
1370
1370
|
}, /*#__PURE__*/react.createElement(cornerstone_src.StudySummaryFromMetadata, _extends({}, props, {
|
|
1371
1371
|
actions: actions
|
|
1372
1372
|
}))));
|
|
1373
|
-
return /*#__PURE__*/react.createElement("div", {
|
|
1373
|
+
return /*#__PURE__*/react.createElement(ui_next_src/* ScrollArea */.FKN, null, /*#__PURE__*/react.createElement("div", {
|
|
1374
1374
|
"data-cy": "trackedMeasurements-panel"
|
|
1375
1375
|
}, /*#__PURE__*/react.createElement(cornerstone_src.PanelMeasurement, {
|
|
1376
1376
|
measurementFilter: measurementFilter,
|
|
@@ -1389,7 +1389,7 @@ function PanelMeasurementTableTracking(props) {
|
|
|
1389
1389
|
customHeader: cornerstone_src.StudyMeasurementsActions,
|
|
1390
1390
|
measurementFilter: measurementFilter,
|
|
1391
1391
|
actions: actions
|
|
1392
|
-
}))));
|
|
1392
|
+
})))));
|
|
1393
1393
|
}
|
|
1394
1394
|
/* harmony default export */ const panels_PanelMeasurementTableTracking = (PanelMeasurementTableTracking);
|
|
1395
1395
|
;// CONCATENATED MODULE: ../../../extensions/measurement-tracking/src/panels/index.js
|
|
@@ -7607,7 +7607,7 @@ async function promptSaveReport({
|
|
|
7607
7607
|
servicesManager
|
|
7608
7608
|
});
|
|
7609
7609
|
if (promptResult.action === PROMPT_RESPONSES/* default */.A.CREATE_REPORT) {
|
|
7610
|
-
const dataSources = extensionManager.getDataSources();
|
|
7610
|
+
const dataSources = extensionManager.getDataSources(promptResult.dataSourceName);
|
|
7611
7611
|
const dataSource = dataSources[0];
|
|
7612
7612
|
const measurementData = measurementService.getMeasurements(measurementFilter);
|
|
7613
7613
|
const SeriesDescription = promptResult.value || defaultSaveTitle;
|
|
@@ -10260,8 +10260,8 @@ function AboutModalDefault() {
|
|
|
10260
10260
|
name
|
|
10261
10261
|
} = (0,browser_detect_es5/* default */.A)();
|
|
10262
10262
|
const browser = `${name[0].toUpperCase()}${name.substr(1)} ${version}`;
|
|
10263
|
-
const versionNumber = "3.10.
|
|
10264
|
-
const commitHash = "
|
|
10263
|
+
const versionNumber = "3.10.1";
|
|
10264
|
+
const commitHash = "aaba8bf1b04be6c00a88f1f5f29cb24133b0c39e";
|
|
10265
10265
|
const [main, beta] = versionNumber.split('-');
|
|
10266
10266
|
return /*#__PURE__*/react.createElement(ui_next_src/* AboutModal */.VTU, {
|
|
10267
10267
|
className: "w-[400px]"
|
|
@@ -10418,18 +10418,18 @@ function ReportDialog({
|
|
|
10418
10418
|
const newReportName = selectedSeries && seriesOption?.description ? seriesOption.description : '';
|
|
10419
10419
|
setReportName(newReportName);
|
|
10420
10420
|
}, [selectedSeries, seriesOptions]);
|
|
10421
|
-
const handleSave = () => {
|
|
10421
|
+
const handleSave = (0,react.useCallback)(() => {
|
|
10422
10422
|
onSave({
|
|
10423
10423
|
reportName,
|
|
10424
10424
|
dataSource: selectedDataSource,
|
|
10425
10425
|
series: selectedSeries
|
|
10426
10426
|
});
|
|
10427
10427
|
hide();
|
|
10428
|
-
};
|
|
10429
|
-
const handleCancel = () => {
|
|
10428
|
+
}, [selectedDataSource, selectedSeries, reportName, hide, onSave]);
|
|
10429
|
+
const handleCancel = (0,react.useCallback)(() => {
|
|
10430
10430
|
onCancel();
|
|
10431
10431
|
hide();
|
|
10432
|
-
};
|
|
10432
|
+
}, [onCancel, hide]);
|
|
10433
10433
|
const showDataSourceSelect = dataSources?.length > 1;
|
|
10434
10434
|
return /*#__PURE__*/react.createElement("div", {
|
|
10435
10435
|
className: "text-foreground flex min-w-[400px] max-w-md flex-col"
|
|
@@ -3647,6 +3647,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3647
3647
|
/* harmony export */ ScaleOverlayTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.FE),
|
|
3648
3648
|
/* harmony export */ SculptorTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.N),
|
|
3649
3649
|
/* harmony export */ SegmentBidirectionalTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.Fz),
|
|
3650
|
+
/* harmony export */ SegmentLabelTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.u9),
|
|
3650
3651
|
/* harmony export */ SegmentSelectTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.IX),
|
|
3651
3652
|
/* harmony export */ SegmentationIntersectionTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.cN),
|
|
3652
3653
|
/* harmony export */ SphereScissorsTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_12__.zH),
|
|
@@ -26165,6 +26166,7 @@ async function render(viewport, representation) {
|
|
|
26165
26166
|
/* harmony export */ qi: () => (/* reexport safe */ _annotation_PlanarFreehandContourSegmentationTool__WEBPACK_IMPORTED_MODULE_32__.A),
|
|
26166
26167
|
/* harmony export */ sR: () => (/* reexport safe */ _annotation_RegionSegmentPlusTool__WEBPACK_IMPORTED_MODULE_42__.A),
|
|
26167
26168
|
/* harmony export */ td: () => (/* reexport safe */ _segmentation_RectangleScissorsTool__WEBPACK_IMPORTED_MODULE_45__.A),
|
|
26169
|
+
/* harmony export */ u9: () => (/* reexport safe */ _segmentation_SegmentLabelTool__WEBPACK_IMPORTED_MODULE_57__.A),
|
|
26168
26170
|
/* harmony export */ uJ: () => (/* reexport safe */ _MIPJumpToClickTool__WEBPACK_IMPORTED_MODULE_8__.A),
|
|
26169
26171
|
/* harmony export */ wR: () => (/* reexport safe */ _annotation_RegionSegmentTool__WEBPACK_IMPORTED_MODULE_41__.A),
|
|
26170
26172
|
/* harmony export */ wh: () => (/* reexport safe */ _base__WEBPACK_IMPORTED_MODULE_0__.wh),
|
|
@@ -26229,6 +26231,8 @@ async function render(viewport, representation) {
|
|
|
26229
26231
|
/* harmony import */ var _segmentation_SegmentSelectTool__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(12905);
|
|
26230
26232
|
/* harmony import */ var _segmentation_SegmentBidirectionalTool__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(38502);
|
|
26231
26233
|
/* harmony import */ var _segmentation_strategies__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(99522);
|
|
26234
|
+
/* harmony import */ var _segmentation_SegmentLabelTool__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(987);
|
|
26235
|
+
|
|
26232
26236
|
|
|
26233
26237
|
|
|
26234
26238
|
|
|
@@ -28878,7 +28882,7 @@ class SegmentBidirectionalTool extends _annotation_BidirectionalTool__WEBPACK_IM
|
|
|
28878
28882
|
|
|
28879
28883
|
/***/ }),
|
|
28880
28884
|
|
|
28881
|
-
/***/
|
|
28885
|
+
/***/ 987:
|
|
28882
28886
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
28883
28887
|
|
|
28884
28888
|
"use strict";
|
|
@@ -28890,12 +28894,161 @@ class SegmentBidirectionalTool extends _annotation_BidirectionalTool__WEBPACK_IM
|
|
|
28890
28894
|
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49906);
|
|
28891
28895
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58640);
|
|
28892
28896
|
/* harmony import */ var _stateManagement_segmentation_activeSegmentation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26228);
|
|
28893
|
-
/* harmony import */ var
|
|
28894
|
-
/* harmony import */ var
|
|
28895
|
-
/* harmony import */ var
|
|
28896
|
-
|
|
28897
|
-
|
|
28897
|
+
/* harmony import */ var _utilities_segmentation__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(93759);
|
|
28898
|
+
/* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(85204);
|
|
28899
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(17328);
|
|
28900
|
+
|
|
28901
|
+
|
|
28902
|
+
|
|
28903
|
+
|
|
28904
|
+
|
|
28905
|
+
|
|
28906
|
+
|
|
28907
|
+
|
|
28908
|
+
class SegmentLabelTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */ .oS {
|
|
28909
|
+
constructor(toolProps = {
|
|
28910
|
+
data: {
|
|
28911
|
+
handles: {
|
|
28912
|
+
textBox: {
|
|
28913
|
+
worldPosition: [0, 0, 0],
|
|
28914
|
+
worldBoundingBox: {
|
|
28915
|
+
topLeft: [0, 0, 0],
|
|
28916
|
+
topRight: [0, 0, 0],
|
|
28917
|
+
bottomLeft: [0, 0, 0],
|
|
28918
|
+
bottomRight: [0, 0, 0],
|
|
28919
|
+
},
|
|
28920
|
+
},
|
|
28921
|
+
},
|
|
28922
|
+
},
|
|
28923
|
+
}, defaultToolProps = {
|
|
28924
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
28925
|
+
configuration: {
|
|
28926
|
+
hoverTimeout: 100,
|
|
28927
|
+
searchRadius: 6,
|
|
28928
|
+
},
|
|
28929
|
+
}) {
|
|
28930
|
+
super(toolProps, defaultToolProps);
|
|
28931
|
+
this.mouseMoveCallback = (evt) => {
|
|
28932
|
+
if (this.hoverTimer) {
|
|
28933
|
+
clearTimeout(this.hoverTimer);
|
|
28934
|
+
}
|
|
28935
|
+
this.hoverTimer = setTimeout(() => {
|
|
28936
|
+
this._setHoveredSegment(evt);
|
|
28937
|
+
this.hoverTimer = null;
|
|
28938
|
+
}, this.configuration.hoverTimeout);
|
|
28939
|
+
return true;
|
|
28940
|
+
};
|
|
28941
|
+
this.onSetToolEnabled = () => {
|
|
28942
|
+
this.onSetToolActive();
|
|
28943
|
+
};
|
|
28944
|
+
this.onSetToolActive = () => {
|
|
28945
|
+
this.hoverTimer = null;
|
|
28946
|
+
};
|
|
28947
|
+
this.onSetToolDisabled = () => {
|
|
28948
|
+
this.hoverTimer = null;
|
|
28949
|
+
};
|
|
28950
|
+
this.data = toolProps.data ?? {
|
|
28951
|
+
handles: {
|
|
28952
|
+
textBox: {
|
|
28953
|
+
worldPosition: [0, 0, 0],
|
|
28954
|
+
worldBoundingBox: {
|
|
28955
|
+
topLeft: [0, 0, 0],
|
|
28956
|
+
topRight: [0, 0, 0],
|
|
28957
|
+
bottomLeft: [0, 0, 0],
|
|
28958
|
+
bottomRight: [0, 0, 0],
|
|
28959
|
+
},
|
|
28960
|
+
},
|
|
28961
|
+
},
|
|
28962
|
+
};
|
|
28963
|
+
this.hoverTimer = null;
|
|
28964
|
+
}
|
|
28965
|
+
_setHoveredSegment(evt = {}) {
|
|
28966
|
+
if (_store_state__WEBPACK_IMPORTED_MODULE_6__/* .state */ .wk.isInteractingWithTool) {
|
|
28967
|
+
return;
|
|
28968
|
+
}
|
|
28969
|
+
const { element, currentPoints } = evt.detail;
|
|
28970
|
+
const worldPoint = currentPoints.world;
|
|
28971
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
28972
|
+
if (!enabledElement) {
|
|
28973
|
+
return;
|
|
28974
|
+
}
|
|
28975
|
+
const { viewport } = enabledElement;
|
|
28976
|
+
const activeSegmentation = (0,_stateManagement_segmentation_activeSegmentation__WEBPACK_IMPORTED_MODULE_4__.getActiveSegmentation)(viewport.id);
|
|
28977
|
+
if (!activeSegmentation) {
|
|
28978
|
+
return;
|
|
28979
|
+
}
|
|
28980
|
+
this._setHoveredSegmentForType(activeSegmentation, worldPoint, viewport);
|
|
28981
|
+
}
|
|
28982
|
+
_setHoveredSegmentForType(activeSegmentation, worldPoint, viewport) {
|
|
28983
|
+
const imageDataInfo = viewport.getImageData();
|
|
28984
|
+
if (!imageDataInfo) {
|
|
28985
|
+
return;
|
|
28986
|
+
}
|
|
28987
|
+
const { segmentationId } = activeSegmentation;
|
|
28988
|
+
const hoveredSegmentIndex = (0,_utilities_segmentation__WEBPACK_IMPORTED_MODULE_5__.getSegmentIndexAtWorldPoint)(segmentationId, worldPoint, {
|
|
28989
|
+
viewport,
|
|
28990
|
+
});
|
|
28991
|
+
const segment = activeSegmentation.segments[hoveredSegmentIndex];
|
|
28992
|
+
const label = segment?.label;
|
|
28993
|
+
const canvasCoordinates = viewport.worldToCanvas(worldPoint);
|
|
28994
|
+
this._editData = {
|
|
28995
|
+
hoveredSegmentIndex,
|
|
28996
|
+
hoveredSegmentLabel: label,
|
|
28997
|
+
canvasCoordinates,
|
|
28998
|
+
worldPoint,
|
|
28999
|
+
};
|
|
29000
|
+
if (!hoveredSegmentIndex || hoveredSegmentIndex === 0) {
|
|
29001
|
+
return;
|
|
29002
|
+
}
|
|
29003
|
+
const renderingEngine = viewport.getRenderingEngine();
|
|
29004
|
+
const viewportIds = renderingEngine.getViewports().map((v) => v.id);
|
|
29005
|
+
(0,_stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__.triggerSegmentationModified)(segmentationId);
|
|
29006
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(viewportIds);
|
|
29007
|
+
}
|
|
29008
|
+
renderAnnotation(enabledElement, svgDrawingHelper) {
|
|
29009
|
+
if (!this._editData) {
|
|
29010
|
+
return;
|
|
29011
|
+
}
|
|
29012
|
+
const { viewport } = enabledElement;
|
|
29013
|
+
const { hoveredSegmentIndex, hoveredSegmentLabel, canvasCoordinates, worldPoint, } = this._editData;
|
|
29014
|
+
if (!hoveredSegmentIndex) {
|
|
29015
|
+
return;
|
|
29016
|
+
}
|
|
29017
|
+
const textBoxPosition = viewport.worldToCanvas(worldPoint);
|
|
29018
|
+
const boundingBox = (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_7__.drawLinkedTextBox)(svgDrawingHelper, 'segmentSelectLabelAnnotation', 'segmentSelectLabelTextBox', [hoveredSegmentLabel ? hoveredSegmentLabel : '(unnamed segment)'], textBoxPosition, [canvasCoordinates], {}, {});
|
|
29019
|
+
const left = canvasCoordinates[0];
|
|
29020
|
+
const top = canvasCoordinates[1];
|
|
29021
|
+
const { width, height } = boundingBox;
|
|
29022
|
+
this.data.handles.textBox.worldBoundingBox = {
|
|
29023
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
29024
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
29025
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
29026
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
29027
|
+
};
|
|
29028
|
+
}
|
|
29029
|
+
}
|
|
29030
|
+
SegmentLabelTool.toolName = 'SegmentLabelTool';
|
|
29031
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SegmentLabelTool);
|
|
29032
|
+
|
|
29033
|
+
|
|
29034
|
+
/***/ }),
|
|
28898
29035
|
|
|
29036
|
+
/***/ 12905:
|
|
29037
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
29038
|
+
|
|
29039
|
+
"use strict";
|
|
29040
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
29041
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
29042
|
+
/* harmony export */ });
|
|
29043
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
29044
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(85817);
|
|
29045
|
+
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49906);
|
|
29046
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(58640);
|
|
29047
|
+
/* harmony import */ var _stateManagement_segmentation_activeSegmentation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(26228);
|
|
29048
|
+
/* harmony import */ var _stateManagement_segmentation_segmentIndex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(70930);
|
|
29049
|
+
/* harmony import */ var _utilities_segmentation__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93759);
|
|
29050
|
+
/* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(85204);
|
|
29051
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(99737);
|
|
28899
29052
|
|
|
28900
29053
|
|
|
28901
29054
|
|
|
@@ -28920,7 +29073,7 @@ class SegmentSelectTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool *
|
|
|
28920
29073
|
}) {
|
|
28921
29074
|
super(toolProps, defaultToolProps);
|
|
28922
29075
|
this.mouseMoveCallback = (evt) => {
|
|
28923
|
-
if (this.mode !==
|
|
29076
|
+
if (this.mode !== _enums__WEBPACK_IMPORTED_MODULE_8__.ToolModes.Active) {
|
|
28924
29077
|
return;
|
|
28925
29078
|
}
|
|
28926
29079
|
if (this.hoverTimer) {
|
|
@@ -28944,7 +29097,7 @@ class SegmentSelectTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool *
|
|
|
28944
29097
|
this.hoverTimer = null;
|
|
28945
29098
|
}
|
|
28946
29099
|
_setActiveSegment(evt = {}) {
|
|
28947
|
-
if (
|
|
29100
|
+
if (_store_state__WEBPACK_IMPORTED_MODULE_7__/* .state */ .wk.isInteractingWithTool) {
|
|
28948
29101
|
return;
|
|
28949
29102
|
}
|
|
28950
29103
|
const { element, currentPoints } = evt.detail;
|
|
@@ -28968,20 +29121,20 @@ class SegmentSelectTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool *
|
|
|
28968
29121
|
const { segmentationId, representationData } = activeSegmentation;
|
|
28969
29122
|
let hoveredSegmentIndex;
|
|
28970
29123
|
if (this.configuration.mode === SegmentSelectTool.SelectMode.Inside) {
|
|
28971
|
-
hoveredSegmentIndex = (0,
|
|
29124
|
+
hoveredSegmentIndex = (0,_utilities_segmentation__WEBPACK_IMPORTED_MODULE_6__.getSegmentIndexAtWorldPoint)(segmentationId, worldPoint, {
|
|
28972
29125
|
viewport,
|
|
28973
29126
|
});
|
|
28974
29127
|
}
|
|
28975
29128
|
else {
|
|
28976
29129
|
if (representationData.Labelmap) {
|
|
28977
|
-
hoveredSegmentIndex = (0,
|
|
29130
|
+
hoveredSegmentIndex = (0,_utilities_segmentation__WEBPACK_IMPORTED_MODULE_6__.getSegmentIndexAtLabelmapBorder)(segmentationId, worldPoint, {
|
|
28978
29131
|
viewport,
|
|
28979
29132
|
searchRadius: this.configuration.searchRadius,
|
|
28980
29133
|
});
|
|
28981
29134
|
}
|
|
28982
29135
|
else if (representationData.Contour) {
|
|
28983
29136
|
hoveredSegmentIndex =
|
|
28984
|
-
(0,
|
|
29137
|
+
(0,_utilities_segmentation__WEBPACK_IMPORTED_MODULE_6__.getHoveredContourSegmentationAnnotation)(segmentationId);
|
|
28985
29138
|
}
|
|
28986
29139
|
else if (representationData.Surface) {
|
|
28987
29140
|
}
|
|
@@ -28989,7 +29142,7 @@ class SegmentSelectTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool *
|
|
|
28989
29142
|
if (!hoveredSegmentIndex || hoveredSegmentIndex === 0) {
|
|
28990
29143
|
return;
|
|
28991
29144
|
}
|
|
28992
|
-
(0,
|
|
29145
|
+
(0,_stateManagement_segmentation_segmentIndex__WEBPACK_IMPORTED_MODULE_5__.setActiveSegmentIndex)(segmentationId, hoveredSegmentIndex);
|
|
28993
29146
|
const renderingEngine = viewport.getRenderingEngine();
|
|
28994
29147
|
const viewportIds = renderingEngine.getViewports().map((v) => v.id);
|
|
28995
29148
|
(0,_stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__.triggerSegmentationModified)(segmentationId);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
1
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[6066,9977],{
|
|
2
2
|
|
|
3
3
|
/***/ 5057:
|
|
4
4
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
@@ -5840,7 +5840,7 @@ function toLowHighRange(windowWidth, windowCenter, voiLUTFunction = _enums_VOILU
|
|
|
5840
5840
|
|
|
5841
5841
|
/***/ }),
|
|
5842
5842
|
|
|
5843
|
-
/***/
|
|
5843
|
+
/***/ 8644:
|
|
5844
5844
|
/***/ ((__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
|
5845
5845
|
|
|
5846
5846
|
"use strict";
|
|
@@ -24655,8 +24655,6 @@ OrientationMarkerTool.toolName = 'OrientationMarker';
|
|
|
24655
24655
|
|
|
24656
24656
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/activeSegmentation.js + 1 modules
|
|
24657
24657
|
var segmentation_activeSegmentation = __webpack_require__(26228);
|
|
24658
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/SegmentationRepresentations.js
|
|
24659
|
-
var SegmentationRepresentations = __webpack_require__(18682);
|
|
24660
24658
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentIndex.js
|
|
24661
24659
|
var segmentIndex = __webpack_require__(70930);
|
|
24662
24660
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/SegmentSelectTool.js
|
|
@@ -24669,7 +24667,6 @@ var segmentIndex = __webpack_require__(70930);
|
|
|
24669
24667
|
|
|
24670
24668
|
|
|
24671
24669
|
|
|
24672
|
-
|
|
24673
24670
|
class SegmentSelectTool extends base/* BaseTool */.oS {
|
|
24674
24671
|
static { this.SelectMode = {
|
|
24675
24672
|
Inside: 'Inside',
|
|
@@ -25031,6 +25028,140 @@ class SegmentBidirectionalTool extends BidirectionalTool/* default */.A {
|
|
|
25031
25028
|
|
|
25032
25029
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/strategies/index.js
|
|
25033
25030
|
var strategies = __webpack_require__(99522);
|
|
25031
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/SegmentLabelTool.js
|
|
25032
|
+
|
|
25033
|
+
|
|
25034
|
+
|
|
25035
|
+
|
|
25036
|
+
|
|
25037
|
+
|
|
25038
|
+
|
|
25039
|
+
|
|
25040
|
+
class SegmentLabelTool extends base/* BaseTool */.oS {
|
|
25041
|
+
constructor(toolProps = {
|
|
25042
|
+
data: {
|
|
25043
|
+
handles: {
|
|
25044
|
+
textBox: {
|
|
25045
|
+
worldPosition: [0, 0, 0],
|
|
25046
|
+
worldBoundingBox: {
|
|
25047
|
+
topLeft: [0, 0, 0],
|
|
25048
|
+
topRight: [0, 0, 0],
|
|
25049
|
+
bottomLeft: [0, 0, 0],
|
|
25050
|
+
bottomRight: [0, 0, 0],
|
|
25051
|
+
},
|
|
25052
|
+
},
|
|
25053
|
+
},
|
|
25054
|
+
},
|
|
25055
|
+
}, defaultToolProps = {
|
|
25056
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
25057
|
+
configuration: {
|
|
25058
|
+
hoverTimeout: 100,
|
|
25059
|
+
searchRadius: 6,
|
|
25060
|
+
},
|
|
25061
|
+
}) {
|
|
25062
|
+
super(toolProps, defaultToolProps);
|
|
25063
|
+
this.mouseMoveCallback = (evt) => {
|
|
25064
|
+
if (this.hoverTimer) {
|
|
25065
|
+
clearTimeout(this.hoverTimer);
|
|
25066
|
+
}
|
|
25067
|
+
this.hoverTimer = setTimeout(() => {
|
|
25068
|
+
this._setHoveredSegment(evt);
|
|
25069
|
+
this.hoverTimer = null;
|
|
25070
|
+
}, this.configuration.hoverTimeout);
|
|
25071
|
+
return true;
|
|
25072
|
+
};
|
|
25073
|
+
this.onSetToolEnabled = () => {
|
|
25074
|
+
this.onSetToolActive();
|
|
25075
|
+
};
|
|
25076
|
+
this.onSetToolActive = () => {
|
|
25077
|
+
this.hoverTimer = null;
|
|
25078
|
+
};
|
|
25079
|
+
this.onSetToolDisabled = () => {
|
|
25080
|
+
this.hoverTimer = null;
|
|
25081
|
+
};
|
|
25082
|
+
this.data = toolProps.data ?? {
|
|
25083
|
+
handles: {
|
|
25084
|
+
textBox: {
|
|
25085
|
+
worldPosition: [0, 0, 0],
|
|
25086
|
+
worldBoundingBox: {
|
|
25087
|
+
topLeft: [0, 0, 0],
|
|
25088
|
+
topRight: [0, 0, 0],
|
|
25089
|
+
bottomLeft: [0, 0, 0],
|
|
25090
|
+
bottomRight: [0, 0, 0],
|
|
25091
|
+
},
|
|
25092
|
+
},
|
|
25093
|
+
},
|
|
25094
|
+
};
|
|
25095
|
+
this.hoverTimer = null;
|
|
25096
|
+
}
|
|
25097
|
+
_setHoveredSegment(evt = {}) {
|
|
25098
|
+
if (store_state/* state */.wk.isInteractingWithTool) {
|
|
25099
|
+
return;
|
|
25100
|
+
}
|
|
25101
|
+
const { element, currentPoints } = evt.detail;
|
|
25102
|
+
const worldPoint = currentPoints.world;
|
|
25103
|
+
const enabledElement = (0,esm.getEnabledElement)(element);
|
|
25104
|
+
if (!enabledElement) {
|
|
25105
|
+
return;
|
|
25106
|
+
}
|
|
25107
|
+
const { viewport } = enabledElement;
|
|
25108
|
+
const activeSegmentation = (0,segmentation_activeSegmentation.getActiveSegmentation)(viewport.id);
|
|
25109
|
+
if (!activeSegmentation) {
|
|
25110
|
+
return;
|
|
25111
|
+
}
|
|
25112
|
+
this._setHoveredSegmentForType(activeSegmentation, worldPoint, viewport);
|
|
25113
|
+
}
|
|
25114
|
+
_setHoveredSegmentForType(activeSegmentation, worldPoint, viewport) {
|
|
25115
|
+
const imageDataInfo = viewport.getImageData();
|
|
25116
|
+
if (!imageDataInfo) {
|
|
25117
|
+
return;
|
|
25118
|
+
}
|
|
25119
|
+
const { segmentationId } = activeSegmentation;
|
|
25120
|
+
const hoveredSegmentIndex = (0,segmentation.getSegmentIndexAtWorldPoint)(segmentationId, worldPoint, {
|
|
25121
|
+
viewport,
|
|
25122
|
+
});
|
|
25123
|
+
const segment = activeSegmentation.segments[hoveredSegmentIndex];
|
|
25124
|
+
const label = segment?.label;
|
|
25125
|
+
const canvasCoordinates = viewport.worldToCanvas(worldPoint);
|
|
25126
|
+
this._editData = {
|
|
25127
|
+
hoveredSegmentIndex,
|
|
25128
|
+
hoveredSegmentLabel: label,
|
|
25129
|
+
canvasCoordinates,
|
|
25130
|
+
worldPoint,
|
|
25131
|
+
};
|
|
25132
|
+
if (!hoveredSegmentIndex || hoveredSegmentIndex === 0) {
|
|
25133
|
+
return;
|
|
25134
|
+
}
|
|
25135
|
+
const renderingEngine = viewport.getRenderingEngine();
|
|
25136
|
+
const viewportIds = renderingEngine.getViewports().map((v) => v.id);
|
|
25137
|
+
(0,triggerSegmentationEvents.triggerSegmentationModified)(segmentationId);
|
|
25138
|
+
(0,triggerAnnotationRenderForViewportIds/* default */.A)(viewportIds);
|
|
25139
|
+
}
|
|
25140
|
+
renderAnnotation(enabledElement, svgDrawingHelper) {
|
|
25141
|
+
if (!this._editData) {
|
|
25142
|
+
return;
|
|
25143
|
+
}
|
|
25144
|
+
const { viewport } = enabledElement;
|
|
25145
|
+
const { hoveredSegmentIndex, hoveredSegmentLabel, canvasCoordinates, worldPoint, } = this._editData;
|
|
25146
|
+
if (!hoveredSegmentIndex) {
|
|
25147
|
+
return;
|
|
25148
|
+
}
|
|
25149
|
+
const textBoxPosition = viewport.worldToCanvas(worldPoint);
|
|
25150
|
+
const boundingBox = (0,drawingSvg.drawLinkedTextBox)(svgDrawingHelper, 'segmentSelectLabelAnnotation', 'segmentSelectLabelTextBox', [hoveredSegmentLabel ? hoveredSegmentLabel : '(unnamed segment)'], textBoxPosition, [canvasCoordinates], {}, {});
|
|
25151
|
+
const left = canvasCoordinates[0];
|
|
25152
|
+
const top = canvasCoordinates[1];
|
|
25153
|
+
const { width, height } = boundingBox;
|
|
25154
|
+
this.data.handles.textBox.worldBoundingBox = {
|
|
25155
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
25156
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
25157
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
25158
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
25159
|
+
};
|
|
25160
|
+
}
|
|
25161
|
+
}
|
|
25162
|
+
SegmentLabelTool.toolName = 'SegmentLabelTool';
|
|
25163
|
+
/* harmony default export */ const segmentation_SegmentLabelTool = ((/* unused pure expression or super */ null && (SegmentLabelTool)));
|
|
25164
|
+
|
|
25034
25165
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/index.js
|
|
25035
25166
|
|
|
25036
25167
|
|
|
@@ -25089,6 +25220,7 @@ var strategies = __webpack_require__(99522);
|
|
|
25089
25220
|
|
|
25090
25221
|
|
|
25091
25222
|
|
|
25223
|
+
|
|
25092
25224
|
|
|
25093
25225
|
|
|
25094
25226
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/rectangle/index.js
|