@ohif/app 3.9.0-beta.57 → 3.9.0-beta.59
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/{29.bundle.976319462f33868497c2.js → 117.bundle.403581eea72534ff9c7e.js} +1765 -582
- package/dist/{169.bundle.483057ed84ca3e92513a.js → 169.bundle.d28df3cf2d600fc3e146.js} +7 -5
- package/dist/{210.bundle.368d53177dc659dc6af0.js → 210.bundle.ea52c75bb27ab002dc4d.js} +2 -2
- package/dist/{281.bundle.49da07d997da7cc01705.js → 281.bundle.719e9e222fecb4e9e9c6.js} +18 -4
- package/dist/{360.bundle.2c117803c05f0bc31424.js → 360.bundle.9a0c682beae1ef7e40b1.js} +5 -5
- package/dist/{372.bundle.d97377781382080306bd.js → 372.bundle.9891a9938b28db4b36ce.js} +5 -4
- package/dist/424.bundle.1caecbb1bbefc271b621.js +663 -0
- package/dist/{497.bundle.ee102d6243f984113f08.js → 497.bundle.bbc07cef12d598653a65.js} +149 -117
- package/dist/{498.bundle.bb47c493dd02451f77ef.js → 498.bundle.e5ccb2bc38e4bfdd564b.js} +1 -1
- package/dist/{516.bundle.d777e4126814a5a47117.js → 516.bundle.e59c26f055d145ce835e.js} +47 -12
- package/dist/{196.bundle.cf8c2311aafb5312bbf7.js → 579.bundle.0b78fc095924efac431d.js} +1705 -493
- package/dist/{552.bundle.85aaefb5e22d6d1bffa9.js → 65.bundle.d15cc84a0b991e182649.js} +15 -680
- package/dist/{129.bundle.3102eccbd5c78524c3dd.js → 650.bundle.a65389abf76ad921aa17.js} +2671 -2975
- package/dist/{793.bundle.c92f52ddff0e3bf506e6.js → 793.bundle.e4c759b5cdfcc3c7494f.js} +2 -2
- package/dist/{818.bundle.cda4e369fdee5459a544.js → 818.bundle.b64fae7e982e16a82ca2.js} +133 -69
- package/dist/{842.bundle.a5533bc77e6f57b0ee30.js → 842.bundle.cccbb7e3611e3d220f07.js} +2 -2
- package/dist/{888.bundle.7ff5dfd3c14072cee2a9.js → 888.bundle.d3b2a82cb17155725342.js} +9 -3
- package/dist/{428.bundle.744fc5865b2d747de88a.js → 904.bundle.008f8a2095669f4eabba.js} +88 -50
- package/dist/{962.bundle.d5f55c85407221bbce7b.js → 962.bundle.868b30361a52b0ffa504.js} +2 -2
- package/dist/{993.bundle.aa31ebda5a5f62c44de5.js → 993.bundle.302a286ebb6e3fc0c35a.js} +1265 -485
- package/dist/{994.bundle.c4709bfb7fd9dcde0551.js → 994.bundle.3b5f396b62cce2990c03.js} +15 -1
- package/dist/{app.bundle.a69624a3e0becd131c65.js → app.bundle.14f126e3ec4491bb1948.js} +1393 -1321
- package/dist/app.bundle.css +2 -2
- package/dist/dicom-microscopy-viewer/dicomMicroscopyViewer.min.js.map +1 -0
- package/dist/{histogram-worker.bundle.e7e9fea2c3236b0e747a.js → histogram-worker.bundle.89729ccb99d170ff2f2f.js} +2 -1
- package/dist/index.html +3 -1
- package/dist/{polySeg.bundle.b25c61224998018d0f79.js → polySeg.bundle.d8943427beee7694621a.js} +3 -22
- package/dist/{suv-peak-worker.bundle.eb11e71db02e52601ecf.js → suv-peak-worker.bundle.15dcb8d1ab8e0528bfd9.js} +3 -22
- package/dist/sw.js +1 -1
- package/package.json +18 -18
- /package/dist/{153.bundle.62dad8e9c7532474e95c.js → 153.bundle.42a66f99ced5972aa0c0.js} +0 -0
- /package/dist/{202.bundle.bb0e8196739bb896dc9e.js → 202.bundle.f6d9ca4b1c16b1aa227f.js} +0 -0
- /package/dist/{246.bundle.27aca95ea22cd5fcd414.js → 246.bundle.912e9f8342cd5d6228e6.js} +0 -0
- /package/dist/{353.bundle.a741604612f3f1d18398.js → 353.bundle.5b11e6b395c5d5cc33bf.js} +0 -0
- /package/dist/{376.bundle.2657056d8bc2b11fb0e8.js → 376.bundle.ac0e23dc830cd982fd18.js} +0 -0
- /package/dist/{552.css → 424.css} +0 -0
- /package/dist/{502.bundle.e7e6c345146aef00a169.js → 502.bundle.823682db96d52df1b8cf.js} +0 -0
- /package/dist/{591.bundle.aa91409b528ae6b601e0.js → 591.bundle.39fa1e6e7285929f2e29.js} +0 -0
- /package/dist/{791.bundle.d614182fa975e92cf4f5.js → 791.bundle.ecf9b1f8892d5f8962a3.js} +0 -0
- /package/dist/{944.bundle.c2bcb49d5077bd6fcc87.js → 944.bundle.93eddec203a43754e826.js} +0 -0
- /package/dist/{978.bundle.cd27543a62e7230557b2.js → 978.bundle.c12902cf44dca926bcb8.js} +0 -0
|
@@ -472,6 +472,13 @@ const CursorSVG = {
|
|
|
472
472
|
y: 24,
|
|
473
473
|
},
|
|
474
474
|
}),
|
|
475
|
+
Height: extend(BASE, {
|
|
476
|
+
iconContent: `<path d="m 6 22 l 8.5 0 v -16 h 8" stroke-width="3" fill="none" stroke="{{color}}" />`,
|
|
477
|
+
viewBox: {
|
|
478
|
+
x: 24,
|
|
479
|
+
y: 24,
|
|
480
|
+
},
|
|
481
|
+
}),
|
|
475
482
|
Probe: extend(BASE, {
|
|
476
483
|
iconContent: `<path fill="{{color}}" d="M1152 896q0 106-75 181t-181 75-181-75-75-181 75-181 181-75 181 75
|
|
477
484
|
75 181zm-256-544q-148 0-273 73t-198 198-73 273 73 273 198 198 273 73 273-73
|
|
@@ -851,8 +858,8 @@ function getDefinedCursors(context, symbol) {
|
|
|
851
858
|
const standardCursorNames = STANDARD_CURSORS.values();
|
|
852
859
|
|
|
853
860
|
|
|
854
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
855
|
-
var esm = __webpack_require__(
|
|
861
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
862
|
+
var esm = __webpack_require__(12651);
|
|
856
863
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/cursors/ImageMouseCursor.js
|
|
857
864
|
|
|
858
865
|
|
|
@@ -988,7 +995,7 @@ const CursorNames = [...SVGCursorDescriptor/* svgCursorNames */.Sz, ...standardC
|
|
|
988
995
|
|
|
989
996
|
/***/ }),
|
|
990
997
|
|
|
991
|
-
/***/
|
|
998
|
+
/***/ 25876:
|
|
992
999
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
993
1000
|
|
|
994
1001
|
// ESM COMPAT FLAG
|
|
@@ -1003,6 +1010,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1003
1010
|
drawEllipseByCoordinates: () => (/* reexport */ drawingSvg_drawEllipseByCoordinates),
|
|
1004
1011
|
drawHandle: () => (/* reexport */ drawingSvg_drawHandle),
|
|
1005
1012
|
drawHandles: () => (/* reexport */ drawingSvg_drawHandles),
|
|
1013
|
+
drawHeight: () => (/* reexport */ drawHeight),
|
|
1006
1014
|
drawLine: () => (/* reexport */ drawLine),
|
|
1007
1015
|
drawLinkedTextBox: () => (/* reexport */ drawingSvg_drawLinkedTextBox),
|
|
1008
1016
|
drawPath: () => (/* reexport */ drawPath),
|
|
@@ -1269,6 +1277,50 @@ function drawLine(svgDrawingHelper, annotationUID, lineUID, start, end, options
|
|
|
1269
1277
|
}
|
|
1270
1278
|
}
|
|
1271
1279
|
|
|
1280
|
+
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawHeight.js
|
|
1281
|
+
|
|
1282
|
+
function drawHeight(svgDrawingHelper, annotationUID, heightUID, start, end, options = {}) {
|
|
1283
|
+
if (isNaN(start[0]) || isNaN(start[1]) || isNaN(end[0]) || isNaN(end[1])) {
|
|
1284
|
+
return;
|
|
1285
|
+
}
|
|
1286
|
+
const { color, width, lineWidth, lineDash } = Object.assign({
|
|
1287
|
+
color: 'rgb(0, 255, 0)',
|
|
1288
|
+
width: '2',
|
|
1289
|
+
lineWidth: undefined,
|
|
1290
|
+
lineDash: undefined,
|
|
1291
|
+
}, options);
|
|
1292
|
+
const midX = end[0] + (start[0] - end[0]) / 2;
|
|
1293
|
+
const endfirstLine = [midX, start[1]];
|
|
1294
|
+
const endsecondLine = [midX, end[1]];
|
|
1295
|
+
const firstLine = {
|
|
1296
|
+
start: start,
|
|
1297
|
+
end: endfirstLine,
|
|
1298
|
+
};
|
|
1299
|
+
const secondLine = {
|
|
1300
|
+
start: endfirstLine,
|
|
1301
|
+
end: endsecondLine,
|
|
1302
|
+
};
|
|
1303
|
+
const threeLine = {
|
|
1304
|
+
start: endsecondLine,
|
|
1305
|
+
end: end,
|
|
1306
|
+
};
|
|
1307
|
+
drawLine(svgDrawingHelper, annotationUID, '1', firstLine.start, firstLine.end, {
|
|
1308
|
+
color,
|
|
1309
|
+
width,
|
|
1310
|
+
lineWidth,
|
|
1311
|
+
});
|
|
1312
|
+
drawLine(svgDrawingHelper, annotationUID, '2', secondLine.start, secondLine.end, {
|
|
1313
|
+
color,
|
|
1314
|
+
width,
|
|
1315
|
+
lineWidth,
|
|
1316
|
+
});
|
|
1317
|
+
drawLine(svgDrawingHelper, annotationUID, '3', threeLine.start, threeLine.end, {
|
|
1318
|
+
color,
|
|
1319
|
+
width,
|
|
1320
|
+
lineWidth,
|
|
1321
|
+
});
|
|
1322
|
+
}
|
|
1323
|
+
|
|
1272
1324
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/drawPolyline.js
|
|
1273
1325
|
|
|
1274
1326
|
|
|
@@ -1697,6 +1749,7 @@ function drawRedactionRect(svgDrawingHelper, annotationUID, rectangleUID, start,
|
|
|
1697
1749
|
|
|
1698
1750
|
|
|
1699
1751
|
|
|
1752
|
+
|
|
1700
1753
|
|
|
1701
1754
|
/***/ }),
|
|
1702
1755
|
|
|
@@ -1944,8 +1997,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1944
1997
|
rb: () => (/* reexport */ eventDispatchers_touchToolEventDispatcher)
|
|
1945
1998
|
});
|
|
1946
1999
|
|
|
1947
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
1948
|
-
var esm = __webpack_require__(
|
|
2000
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
2001
|
+
var esm = __webpack_require__(12651);
|
|
1949
2002
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/triggerAnnotationRender.js
|
|
1950
2003
|
var triggerAnnotationRender = __webpack_require__(64307);
|
|
1951
2004
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/imageRenderedEventDispatcher.js
|
|
@@ -2173,7 +2226,7 @@ const cameraResetEventDispatcher_disable = function (element) {
|
|
|
2173
2226
|
/* harmony export */ Z: () => (/* binding */ contourSegmentationCompletedListener),
|
|
2174
2227
|
/* harmony export */ h: () => (/* binding */ createPolylineHole)
|
|
2175
2228
|
/* harmony export */ });
|
|
2176
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2229
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
2177
2230
|
/* harmony import */ var _utilities_getViewportsForAnnotation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22319);
|
|
2178
2231
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42975);
|
|
2179
2232
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46966);
|
|
@@ -2531,8 +2584,8 @@ const segmentationRepresentationModifiedListener = function (evt) {
|
|
|
2531
2584
|
var SegmentationRepresentations = __webpack_require__(74297);
|
|
2532
2585
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/segmentationState.js + 2 modules
|
|
2533
2586
|
var segmentationState = __webpack_require__(14305);
|
|
2534
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
2535
|
-
var esm = __webpack_require__(
|
|
2587
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
2588
|
+
var esm = __webpack_require__(12651);
|
|
2536
2589
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js
|
|
2537
2590
|
var ToolGroupManager = __webpack_require__(27078);
|
|
2538
2591
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js
|
|
@@ -2922,6 +2975,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2922
2975
|
/* harmony export */ EllipticalROITool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.$3),
|
|
2923
2976
|
/* harmony export */ Enums: () => (/* reexport module object */ _enums__WEBPACK_IMPORTED_MODULE_12__),
|
|
2924
2977
|
/* harmony export */ EraserTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.Ki),
|
|
2978
|
+
/* harmony export */ HeightTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.UH),
|
|
2925
2979
|
/* harmony export */ KeyImageTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.FE),
|
|
2926
2980
|
/* harmony export */ LengthTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.LW),
|
|
2927
2981
|
/* harmony export */ LivewireContourSegmentationTool: () => (/* reexport safe */ _tools__WEBPACK_IMPORTED_MODULE_10__.g5),
|
|
@@ -2981,7 +3035,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2981
3035
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33232);
|
|
2982
3036
|
/* harmony import */ var _constants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69562);
|
|
2983
3037
|
/* harmony import */ var _synchronizers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93423);
|
|
2984
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
3038
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25876);
|
|
2985
3039
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42975);
|
|
2986
3040
|
/* harmony import */ var _cursors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(60020);
|
|
2987
3041
|
/* harmony import */ var _types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(35106);
|
|
@@ -3015,7 +3069,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3015
3069
|
/* harmony export */ S1: () => (/* binding */ init),
|
|
3016
3070
|
/* harmony export */ ob: () => (/* binding */ destroy)
|
|
3017
3071
|
/* harmony export */ });
|
|
3018
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3072
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
3019
3073
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86614);
|
|
3020
3074
|
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14305);
|
|
3021
3075
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68096);
|
|
@@ -3101,7 +3155,7 @@ function _removeCornerstoneToolsEventListeners() {
|
|
|
3101
3155
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3102
3156
|
/* harmony export */ Z: () => (/* binding */ AnnotationGroup)
|
|
3103
3157
|
/* harmony export */ });
|
|
3104
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3158
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
3105
3159
|
/* harmony import */ var _enums_Events__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(34539);
|
|
3106
3160
|
/* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
3107
3161
|
|
|
@@ -3186,7 +3240,7 @@ class AnnotationGroup {
|
|
|
3186
3240
|
/* harmony export */ });
|
|
3187
3241
|
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11677);
|
|
3188
3242
|
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0__);
|
|
3189
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
3243
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
3190
3244
|
/* harmony import */ var _annotationLocking__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(11163);
|
|
3191
3245
|
/* harmony import */ var _annotationVisibility__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(41836);
|
|
3192
3246
|
/* harmony import */ var _utilities_defineProperties__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(73685);
|
|
@@ -3418,7 +3472,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3418
3472
|
/* harmony export */ setAnnotationLocked: () => (/* binding */ setAnnotationLocked),
|
|
3419
3473
|
/* harmony export */ unlockAllAnnotations: () => (/* binding */ unlockAllAnnotations)
|
|
3420
3474
|
/* harmony export */ });
|
|
3421
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3475
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
3422
3476
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
3423
3477
|
|
|
3424
3478
|
|
|
@@ -3523,7 +3577,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3523
3577
|
/* harmony export */ isAnnotationSelected: () => (/* binding */ isAnnotationSelected),
|
|
3524
3578
|
/* harmony export */ setAnnotationSelected: () => (/* binding */ setAnnotationSelected)
|
|
3525
3579
|
/* harmony export */ });
|
|
3526
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3580
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
3527
3581
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
3528
3582
|
/* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
3529
3583
|
|
|
@@ -3623,7 +3677,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3623
3677
|
/* harmony export */ resetAnnotationManager: () => (/* binding */ resetAnnotationManager),
|
|
3624
3678
|
/* harmony export */ setAnnotationManager: () => (/* binding */ setAnnotationManager)
|
|
3625
3679
|
/* harmony export */ });
|
|
3626
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3680
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
3627
3681
|
/* harmony import */ var _FrameOfReferenceSpecificAnnotationManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17433);
|
|
3628
3682
|
/* harmony import */ var _helpers_state__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36705);
|
|
3629
3683
|
|
|
@@ -3763,7 +3817,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3763
3817
|
/* harmony export */ setAnnotationVisibility: () => (/* binding */ setAnnotationVisibility),
|
|
3764
3818
|
/* harmony export */ showAllAnnotations: () => (/* binding */ showAllAnnotations)
|
|
3765
3819
|
/* harmony export */ });
|
|
3766
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
3820
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
3767
3821
|
/* harmony import */ var _annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86614);
|
|
3768
3822
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68096);
|
|
3769
3823
|
/* harmony import */ var _annotationSelection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(91398);
|
|
@@ -4116,7 +4170,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
4116
4170
|
/* harmony export */ lf: () => (/* binding */ triggerContourAnnotationCompleted),
|
|
4117
4171
|
/* harmony export */ xJ: () => (/* binding */ triggerAnnotationAddedForElement)
|
|
4118
4172
|
/* harmony export */ });
|
|
4119
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4173
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
4120
4174
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
4121
4175
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27078);
|
|
4122
4176
|
|
|
@@ -4366,7 +4420,7 @@ function getSegmentVisibility(toolGroupId, segmentationRepresentationUID, segmen
|
|
|
4366
4420
|
/* harmony export */ rX: () => (/* binding */ getSurfaceActorUID)
|
|
4367
4421
|
/* harmony export */ });
|
|
4368
4422
|
/* unused harmony exports generateCacheId, updatePolyDataCache */
|
|
4369
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
4423
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
4370
4424
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
4371
4425
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42975);
|
|
4372
4426
|
/* harmony import */ var _polySeg_registerPolySegWorker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39163);
|
|
@@ -4631,8 +4685,8 @@ function addSegmentations(segmentationInputArray) {
|
|
|
4631
4685
|
|
|
4632
4686
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js
|
|
4633
4687
|
var ToolGroupManager = __webpack_require__(27078);
|
|
4634
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
4635
|
-
var esm = __webpack_require__(
|
|
4688
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
4689
|
+
var esm = __webpack_require__(12651);
|
|
4636
4690
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/segmentation/config/segmentationConfig.js
|
|
4637
4691
|
|
|
4638
4692
|
function getGlobalConfig() {
|
|
@@ -6036,7 +6090,7 @@ async function canConvertFromTo(fromRepresentationType, toRepresentationType) {
|
|
|
6036
6090
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6037
6091
|
/* harmony export */ k: () => (/* binding */ registerPolySegWorker)
|
|
6038
6092
|
/* harmony export */ });
|
|
6039
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6093
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
6040
6094
|
|
|
6041
6095
|
let registered = false;
|
|
6042
6096
|
function registerPolySegWorker() {
|
|
@@ -6143,8 +6197,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
6143
6197
|
// EXTERNAL MODULE: ../../../node_modules/lodash.clonedeep/index.js
|
|
6144
6198
|
var lodash_clonedeep = __webpack_require__(11677);
|
|
6145
6199
|
var lodash_clonedeep_default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep);
|
|
6146
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
6147
|
-
var esm = __webpack_require__(
|
|
6200
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
6201
|
+
var esm = __webpack_require__(12651);
|
|
6148
6202
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/enums/index.js + 3 modules
|
|
6149
6203
|
var enums = __webpack_require__(68096);
|
|
6150
6204
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/displayTools/Contour/contourConfig.js
|
|
@@ -6597,7 +6651,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
6597
6651
|
/* harmony export */ triggerSegmentationRepresentationModified: () => (/* binding */ triggerSegmentationRepresentationModified),
|
|
6598
6652
|
/* harmony export */ triggerSegmentationRepresentationRemoved: () => (/* binding */ triggerSegmentationRepresentationRemoved)
|
|
6599
6653
|
/* harmony export */ });
|
|
6600
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6654
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
6601
6655
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
6602
6656
|
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(14305);
|
|
6603
6657
|
/* harmony import */ var _utilities_segmentation_getUniqueSegmentIndices__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23267);
|
|
@@ -6671,7 +6725,7 @@ function triggerSegmentationDataModified(segmentationId, modifiedSlicesToUse) {
|
|
|
6671
6725
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6672
6726
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
6673
6727
|
/* harmony export */ });
|
|
6674
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
6728
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
6675
6729
|
|
|
6676
6730
|
class Synchronizer {
|
|
6677
6731
|
constructor(synchronizerId, eventName, eventHandler, options) {
|
|
@@ -7006,7 +7060,7 @@ function destroySynchronizer(synchronizerId) {
|
|
|
7006
7060
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7007
7061
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
7008
7062
|
/* harmony export */ });
|
|
7009
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
7063
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
7010
7064
|
/* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33232);
|
|
7011
7065
|
|
|
7012
7066
|
|
|
@@ -7193,8 +7247,8 @@ function _appendChild(newNode, referenceNode) {
|
|
|
7193
7247
|
referenceNode.querySelector('div.viewport-element').appendChild(newNode);
|
|
7194
7248
|
}
|
|
7195
7249
|
|
|
7196
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
7197
|
-
var esm = __webpack_require__(
|
|
7250
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
7251
|
+
var esm = __webpack_require__(12651);
|
|
7198
7252
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/filterToolsWithAnnotationsForElement.js
|
|
7199
7253
|
var store_filterToolsWithAnnotationsForElement = __webpack_require__(80769);
|
|
7200
7254
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getToolsWithModesForElement.js
|
|
@@ -7413,8 +7467,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
7413
7467
|
|
|
7414
7468
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/SynchronizerManager/index.js + 5 modules
|
|
7415
7469
|
var SynchronizerManager = __webpack_require__(36779);
|
|
7416
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
7417
|
-
var esm = __webpack_require__(
|
|
7470
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
7471
|
+
var esm = __webpack_require__(12651);
|
|
7418
7472
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/synchronizers/callbacks/cameraSyncCallback.js
|
|
7419
7473
|
|
|
7420
7474
|
function cameraSyncCallback(synchronizerInstance, sourceViewport, targetViewport, cameraModifiedEvent) {
|
|
@@ -7685,12 +7739,12 @@ const createStackImageSynchronizer = createImageSliceSynchronizer;
|
|
|
7685
7739
|
/* harmony export */ Z: () => (/* binding */ AdvancedMagnifyTool)
|
|
7686
7740
|
/* harmony export */ });
|
|
7687
7741
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
7688
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
7742
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
7689
7743
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
7690
7744
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11163);
|
|
7691
7745
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(41836);
|
|
7692
7746
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36705);
|
|
7693
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
7747
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25876);
|
|
7694
7748
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33232);
|
|
7695
7749
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(68096);
|
|
7696
7750
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46966);
|
|
@@ -8215,10 +8269,10 @@ AnnotationEraserTool.toolName = 'Eraser';
|
|
|
8215
8269
|
/* harmony import */ var _kitware_vtk_js_Common_Core_Math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32899);
|
|
8216
8270
|
/* harmony import */ var _kitware_vtk_js_Common_Core_MatrixBuilder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45802);
|
|
8217
8271
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93382);
|
|
8218
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
8272
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(12651);
|
|
8219
8273
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27078);
|
|
8220
8274
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(86614);
|
|
8221
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(
|
|
8275
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(25876);
|
|
8222
8276
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(33232);
|
|
8223
8277
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(68096);
|
|
8224
8278
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(46966);
|
|
@@ -8334,15 +8388,16 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
8334
8388
|
};
|
|
8335
8389
|
this.resetCrosshairs = () => {
|
|
8336
8390
|
const viewportsInfo = this._getViewportsInfo();
|
|
8337
|
-
|
|
8391
|
+
for (const viewportInfo of viewportsInfo) {
|
|
8392
|
+
const { viewportId, renderingEngineId } = viewportInfo;
|
|
8338
8393
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_4__.getEnabledElementByIds)(viewportId, renderingEngineId);
|
|
8339
8394
|
const { viewport } = enabledElement;
|
|
8340
8395
|
const resetPan = true;
|
|
8341
8396
|
const resetZoom = true;
|
|
8342
8397
|
const resetToCenter = true;
|
|
8343
8398
|
const resetRotation = true;
|
|
8344
|
-
const
|
|
8345
|
-
viewport.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation,
|
|
8399
|
+
const suppressEvents = true;
|
|
8400
|
+
viewport.resetCamera(resetPan, resetZoom, resetToCenter, resetRotation, suppressEvents);
|
|
8346
8401
|
viewport.resetSlabThickness();
|
|
8347
8402
|
const { element } = viewport;
|
|
8348
8403
|
let annotations = this._getAnnotations(enabledElement);
|
|
@@ -8351,7 +8406,7 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
8351
8406
|
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.removeAnnotation)(annotations[0].annotationUID);
|
|
8352
8407
|
}
|
|
8353
8408
|
viewport.render();
|
|
8354
|
-
}
|
|
8409
|
+
}
|
|
8355
8410
|
this.computeToolCenter(viewportsInfo);
|
|
8356
8411
|
};
|
|
8357
8412
|
this.computeToolCenter = (viewportsInfo) => {
|
|
@@ -8872,7 +8927,6 @@ class CrosshairsTool extends _base__WEBPACK_IMPORTED_MODULE_3__/* .AnnotationToo
|
|
|
8872
8927
|
renderStatus = true;
|
|
8873
8928
|
data.handles.rotationPoints = newRtpoints;
|
|
8874
8929
|
data.handles.slabThicknessPoints = newStpoints;
|
|
8875
|
-
debugger;
|
|
8876
8930
|
if (this.configuration.viewportIndicators) {
|
|
8877
8931
|
const { viewportIndicatorsConfig } = this.configuration;
|
|
8878
8932
|
const xOffset = viewportIndicatorsConfig?.xOffset || 0.95;
|
|
@@ -9683,7 +9737,7 @@ CrosshairsTool.toolName = 'Crosshairs';
|
|
|
9683
9737
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9684
9738
|
/* harmony export */ });
|
|
9685
9739
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
9686
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
9740
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
9687
9741
|
/* harmony import */ var _utilities_planar__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44037);
|
|
9688
9742
|
/* harmony import */ var _utilities_viewport_jumpToWorld__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(94451);
|
|
9689
9743
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27078);
|
|
@@ -9692,7 +9746,6 @@ CrosshairsTool.toolName = 'Crosshairs';
|
|
|
9692
9746
|
|
|
9693
9747
|
|
|
9694
9748
|
|
|
9695
|
-
|
|
9696
9749
|
class MIPJumpToClickTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseTool */ .ml {
|
|
9697
9750
|
constructor(toolProps = {}, defaultToolProps = {
|
|
9698
9751
|
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
@@ -9706,11 +9759,10 @@ class MIPJumpToClickTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseTool
|
|
|
9706
9759
|
const { element, currentPoints } = evt.detail;
|
|
9707
9760
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
9708
9761
|
const { viewport, renderingEngine } = enabledElement;
|
|
9709
|
-
const
|
|
9710
|
-
if (!
|
|
9762
|
+
const volumeId = this.getTargetVolumeId(viewport);
|
|
9763
|
+
if (!volumeId) {
|
|
9711
9764
|
throw new Error(`MIPJumpToClickTool: targetId is not a volumeId, you should only use MIPJumpToClickTool with a volumeId as the targetId`);
|
|
9712
9765
|
}
|
|
9713
|
-
const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.getVolumeId(targetId);
|
|
9714
9766
|
let maxIntensity = -Infinity;
|
|
9715
9767
|
const maxFn = (intensity, point) => {
|
|
9716
9768
|
if (intensity > maxIntensity) {
|
|
@@ -9757,7 +9809,7 @@ MIPJumpToClickTool.toolName = 'MIPJumpToClickTool';
|
|
|
9757
9809
|
/* harmony export */ });
|
|
9758
9810
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
9759
9811
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
9760
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
9812
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12651);
|
|
9761
9813
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46966);
|
|
9762
9814
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66878);
|
|
9763
9815
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33232);
|
|
@@ -9960,7 +10012,7 @@ MagnifyTool.toolName = 'Magnify';
|
|
|
9960
10012
|
/* harmony import */ var _kitware_vtk_js_IO_XML_XMLPolyDataReader__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(42350);
|
|
9961
10013
|
/* harmony import */ var _kitware_vtk_js_Common_DataModel_PolyData__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1299);
|
|
9962
10014
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(93382);
|
|
9963
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
10015
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(12651);
|
|
9964
10016
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46966);
|
|
9965
10017
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(27078);
|
|
9966
10018
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(68096);
|
|
@@ -10252,10 +10304,10 @@ OrientationMarkerTool.toolName = 'OrientationMarker';
|
|
|
10252
10304
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10253
10305
|
/* harmony export */ });
|
|
10254
10306
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
10255
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
10307
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
10256
10308
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
10257
10309
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27078);
|
|
10258
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
10310
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25876);
|
|
10259
10311
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66878);
|
|
10260
10312
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92622);
|
|
10261
10313
|
|
|
@@ -10433,7 +10485,7 @@ OverlayGridTool.toolName = 'OverlayGrid';
|
|
|
10433
10485
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10434
10486
|
/* harmony export */ });
|
|
10435
10487
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
10436
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
10488
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
10437
10489
|
|
|
10438
10490
|
|
|
10439
10491
|
class PanTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseTool */ .ml {
|
|
@@ -10488,7 +10540,7 @@ PanTool.toolName = 'Pan';
|
|
|
10488
10540
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10489
10541
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10490
10542
|
/* harmony export */ });
|
|
10491
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
10543
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
10492
10544
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
10493
10545
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
10494
10546
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21221);
|
|
@@ -10552,10 +10604,10 @@ PlanarRotateTool.toolName = 'PlanarRotate';
|
|
|
10552
10604
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
10553
10605
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10554
10606
|
/* harmony export */ });
|
|
10555
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
10607
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
10556
10608
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86614);
|
|
10557
10609
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41836);
|
|
10558
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
10610
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25876);
|
|
10559
10611
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46966);
|
|
10560
10612
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66878);
|
|
10561
10613
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72076);
|
|
@@ -10883,9 +10935,9 @@ ReferenceCursors.toolName = 'ReferenceCursors';
|
|
|
10883
10935
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10884
10936
|
/* harmony export */ });
|
|
10885
10937
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
10886
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
10938
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
10887
10939
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
10888
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
10940
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25876);
|
|
10889
10941
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46966);
|
|
10890
10942
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(66878);
|
|
10891
10943
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92622);
|
|
@@ -11124,9 +11176,9 @@ ReferenceLines.toolName = 'ReferenceLines';
|
|
|
11124
11176
|
/* harmony export */ });
|
|
11125
11177
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(92622);
|
|
11126
11178
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
11127
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
11179
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12651);
|
|
11128
11180
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86614);
|
|
11129
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
11181
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25876);
|
|
11130
11182
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27078);
|
|
11131
11183
|
|
|
11132
11184
|
|
|
@@ -11533,7 +11585,7 @@ ScaleOverlayTool.toolName = 'ScaleOverlay';
|
|
|
11533
11585
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11534
11586
|
/* harmony export */ });
|
|
11535
11587
|
/* unused harmony export contourIndex */
|
|
11536
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
11588
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
11537
11589
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
11538
11590
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50097);
|
|
11539
11591
|
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(79390);
|
|
@@ -11844,9 +11896,9 @@ SculptorTool.toolName = 'SculptorTool';
|
|
|
11844
11896
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11845
11897
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
11846
11898
|
/* harmony export */ });
|
|
11847
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
11899
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
11848
11900
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(86614);
|
|
11849
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
11901
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25876);
|
|
11850
11902
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(27078);
|
|
11851
11903
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66878);
|
|
11852
11904
|
/* harmony import */ var _base_AnnotationDisplayTool__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(92622);
|
|
@@ -12040,7 +12092,7 @@ SegmentationIntersectionTool.toolName = 'SegmentationIntersection';
|
|
|
12040
12092
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12041
12093
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12042
12094
|
/* harmony export */ });
|
|
12043
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
12095
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
12044
12096
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
12045
12097
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42975);
|
|
12046
12098
|
|
|
@@ -12067,12 +12119,11 @@ class StackScrollTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .BaseTool */
|
|
|
12067
12119
|
_dragCallback(evt) {
|
|
12068
12120
|
const { deltaPoints, viewportId, renderingEngineId } = evt.detail;
|
|
12069
12121
|
const { viewport } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElementByIds)(viewportId, renderingEngineId);
|
|
12070
|
-
const targetId = this.getTargetId(viewport);
|
|
12071
12122
|
const { debounceIfNotLoaded, invert, loop } = this.configuration;
|
|
12072
12123
|
const deltaPointY = deltaPoints.canvas[1];
|
|
12073
12124
|
let volumeId;
|
|
12074
12125
|
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.VolumeViewport) {
|
|
12075
|
-
volumeId =
|
|
12126
|
+
volumeId = this.getTargetVolumeId(viewport);
|
|
12076
12127
|
}
|
|
12077
12128
|
const pixelsPerImage = this._getPixelPerImage(viewport);
|
|
12078
12129
|
const deltaY = deltaPointY + this.deltaY;
|
|
@@ -12111,7 +12162,7 @@ StackScrollTool.toolName = 'StackScroll';
|
|
|
12111
12162
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
12112
12163
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12113
12164
|
/* harmony export */ });
|
|
12114
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
12165
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
12115
12166
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
12116
12167
|
/* harmony import */ var _utilities_scroll__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63478);
|
|
12117
12168
|
|
|
@@ -12135,8 +12186,7 @@ class StackScrollMouseWheelTool extends _base__WEBPACK_IMPORTED_MODULE_1__/* .Ba
|
|
|
12135
12186
|
const { invert } = this.configuration;
|
|
12136
12187
|
const { viewport } = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
12137
12188
|
const delta = direction * (invert ? -1 : 1);
|
|
12138
|
-
const
|
|
12139
|
-
const volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getVolumeId(targetId);
|
|
12189
|
+
const volumeId = this.getTargetVolumeId(viewport);
|
|
12140
12190
|
(0,_utilities_scroll__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z)(viewport, {
|
|
12141
12191
|
delta,
|
|
12142
12192
|
debounceLoading: this.configuration.debounceIfNotLoaded,
|
|
@@ -12160,7 +12210,7 @@ StackScrollMouseWheelTool.toolName = 'StackScrollMouseWheel';
|
|
|
12160
12210
|
/* harmony export */ });
|
|
12161
12211
|
/* harmony import */ var _kitware_vtk_js_Common_Core_Math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(32899);
|
|
12162
12212
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
12163
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
12213
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12651);
|
|
12164
12214
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(72076);
|
|
12165
12215
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93382);
|
|
12166
12216
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27078);
|
|
@@ -12348,7 +12398,7 @@ TrackballRotateTool.toolName = 'TrackballRotate';
|
|
|
12348
12398
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12349
12399
|
/* harmony export */ });
|
|
12350
12400
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
12351
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
12401
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
12352
12402
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(72076);
|
|
12353
12403
|
|
|
12354
12404
|
|
|
@@ -12413,10 +12463,10 @@ VolumeRotateMouseWheelTool.toolName = 'VolumeRotateMouseWheel';
|
|
|
12413
12463
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12414
12464
|
/* harmony export */ });
|
|
12415
12465
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
12416
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
12466
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
12417
12467
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50097);
|
|
12418
12468
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36705);
|
|
12419
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
12469
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25876);
|
|
12420
12470
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33232);
|
|
12421
12471
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(68096);
|
|
12422
12472
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46966);
|
|
@@ -12657,7 +12707,7 @@ WindowLevelRegionTool.toolName = 'WindowLevelRegion';
|
|
|
12657
12707
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
12658
12708
|
/* harmony export */ });
|
|
12659
12709
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
12660
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
12710
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
12661
12711
|
|
|
12662
12712
|
|
|
12663
12713
|
const DEFAULT_MULTIPLIER = 4;
|
|
@@ -12707,8 +12757,7 @@ class WindowLevelTool extends _base__WEBPACK_IMPORTED_MODULE_0__/* .BaseTool */
|
|
|
12707
12757
|
let isPreScaled = false;
|
|
12708
12758
|
const properties = viewport.getProperties();
|
|
12709
12759
|
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.VolumeViewport) {
|
|
12710
|
-
|
|
12711
|
-
volumeId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.getVolumeId(targetId);
|
|
12760
|
+
volumeId = this.getTargetVolumeId(viewport);
|
|
12712
12761
|
viewportsContainingVolumeUID = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.getViewportsWithVolumeId(volumeId, renderingEngine.id);
|
|
12713
12762
|
({ lower, upper } = properties.voiRange);
|
|
12714
12763
|
const volume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.cache.getVolume(volumeId);
|
|
@@ -12864,7 +12913,7 @@ WindowLevelTool.toolName = 'WindowLevel';
|
|
|
12864
12913
|
/* harmony export */ });
|
|
12865
12914
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
12866
12915
|
/* harmony import */ var _kitware_vtk_js_Common_Core_Math__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32899);
|
|
12867
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
12916
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12651);
|
|
12868
12917
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93382);
|
|
12869
12918
|
|
|
12870
12919
|
|
|
@@ -13057,7 +13106,7 @@ ZoomTool.toolName = 'Zoom';
|
|
|
13057
13106
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13058
13107
|
/* harmony export */ });
|
|
13059
13108
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
13060
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
13109
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
13061
13110
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
13062
13111
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90685);
|
|
13063
13112
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86614);
|
|
@@ -13065,7 +13114,7 @@ ZoomTool.toolName = 'Zoom';
|
|
|
13065
13114
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79922);
|
|
13066
13115
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(21221);
|
|
13067
13116
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(42975);
|
|
13068
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
13117
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25876);
|
|
13069
13118
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(33232);
|
|
13070
13119
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(46966);
|
|
13071
13120
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(66878);
|
|
@@ -13532,12 +13581,12 @@ AngleTool.toolName = 'Angle';
|
|
|
13532
13581
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13533
13582
|
/* harmony export */ });
|
|
13534
13583
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
13535
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
13584
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
13536
13585
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
13537
13586
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86614);
|
|
13538
13587
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11163);
|
|
13539
13588
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(79922);
|
|
13540
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
13589
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25876);
|
|
13541
13590
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33232);
|
|
13542
13591
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46966);
|
|
13543
13592
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(66878);
|
|
@@ -13978,7 +14027,7 @@ ArrowAnnotateTool.toolName = 'ArrowAnnotate';
|
|
|
13978
14027
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
13979
14028
|
/* harmony export */ });
|
|
13980
14029
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
13981
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
14030
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
13982
14031
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39661);
|
|
13983
14032
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42975);
|
|
13984
14033
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93382);
|
|
@@ -13987,7 +14036,7 @@ ArrowAnnotateTool.toolName = 'ArrowAnnotate';
|
|
|
13987
14036
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11163);
|
|
13988
14037
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41836);
|
|
13989
14038
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(36705);
|
|
13990
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(
|
|
14039
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(25876);
|
|
13991
14040
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(33232);
|
|
13992
14041
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(68096);
|
|
13993
14042
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46966);
|
|
@@ -14736,7 +14785,7 @@ BidirectionalTool.toolName = 'Bidirectional';
|
|
|
14736
14785
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
14737
14786
|
/* harmony export */ });
|
|
14738
14787
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
14739
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
14788
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
14740
14789
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39661);
|
|
14741
14790
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42975);
|
|
14742
14791
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90685);
|
|
@@ -14744,7 +14793,7 @@ BidirectionalTool.toolName = 'Bidirectional';
|
|
|
14744
14793
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11163);
|
|
14745
14794
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41836);
|
|
14746
14795
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(36705);
|
|
14747
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
14796
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25876);
|
|
14748
14797
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(33232);
|
|
14749
14798
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(68096);
|
|
14750
14799
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(46966);
|
|
@@ -15357,7 +15406,7 @@ CircleROITool.toolName = 'CircleROI';
|
|
|
15357
15406
|
/* harmony export */ });
|
|
15358
15407
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
15359
15408
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
15360
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
15409
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12651);
|
|
15361
15410
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(93382);
|
|
15362
15411
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90685);
|
|
15363
15412
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86614);
|
|
@@ -15366,7 +15415,7 @@ CircleROITool.toolName = 'CircleROI';
|
|
|
15366
15415
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(79922);
|
|
15367
15416
|
/* harmony import */ var _utilities_math_angle_angleBetweenLines__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(21221);
|
|
15368
15417
|
/* harmony import */ var _utilities_math_midPoint__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(61563);
|
|
15369
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
15418
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(25876);
|
|
15370
15419
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33232);
|
|
15371
15420
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46966);
|
|
15372
15421
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(20724);
|
|
@@ -16066,8 +16115,8 @@ CobbAngleTool.toolName = 'CobbAngle';
|
|
|
16066
16115
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16067
16116
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16068
16117
|
/* harmony export */ });
|
|
16069
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
16070
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
16118
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
16119
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25876);
|
|
16071
16120
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46966);
|
|
16072
16121
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23118);
|
|
16073
16122
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66878);
|
|
@@ -16219,7 +16268,7 @@ DragProbeTool.toolName = 'DragProbe';
|
|
|
16219
16268
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16220
16269
|
/* harmony export */ });
|
|
16221
16270
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
16222
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
16271
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
16223
16272
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39661);
|
|
16224
16273
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42975);
|
|
16225
16274
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90685);
|
|
@@ -16227,7 +16276,7 @@ DragProbeTool.toolName = 'DragProbe';
|
|
|
16227
16276
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11163);
|
|
16228
16277
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41836);
|
|
16229
16278
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(36705);
|
|
16230
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
16279
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25876);
|
|
16231
16280
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(33232);
|
|
16232
16281
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(68096);
|
|
16233
16282
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(46966);
|
|
@@ -16915,209 +16964,14 @@ EllipticalROITool.toolName = 'EllipticalROI';
|
|
|
16915
16964
|
|
|
16916
16965
|
/***/ }),
|
|
16917
16966
|
|
|
16918
|
-
/***/
|
|
16919
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16920
|
-
|
|
16921
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
16922
|
-
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
16923
|
-
/* harmony export */ });
|
|
16924
|
-
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
16925
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62709);
|
|
16926
|
-
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
16927
|
-
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86614);
|
|
16928
|
-
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36705);
|
|
16929
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(86785);
|
|
16930
|
-
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33232);
|
|
16931
|
-
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46966);
|
|
16932
|
-
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(66878);
|
|
16933
|
-
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23118);
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
class KeyImageTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .AnnotationTool */ .A8 {
|
|
16945
|
-
constructor(toolProps = {}, defaultToolProps = {
|
|
16946
|
-
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
16947
|
-
configuration: {
|
|
16948
|
-
getTextCallback,
|
|
16949
|
-
changeTextCallback,
|
|
16950
|
-
canvasPosition: [10, 10],
|
|
16951
|
-
canvasSize: 10,
|
|
16952
|
-
},
|
|
16953
|
-
}) {
|
|
16954
|
-
super(toolProps, defaultToolProps);
|
|
16955
|
-
this.addNewAnnotation = (evt) => {
|
|
16956
|
-
const eventDetail = evt.detail;
|
|
16957
|
-
const { currentPoints, element } = eventDetail;
|
|
16958
|
-
const worldPos = currentPoints.world;
|
|
16959
|
-
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
16960
|
-
const { viewport, renderingEngine } = enabledElement;
|
|
16961
|
-
const camera = viewport.getCamera();
|
|
16962
|
-
const { viewPlaneNormal, viewUp } = camera;
|
|
16963
|
-
const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
|
|
16964
|
-
const annotation = KeyImageTool.createAnnotation({
|
|
16965
|
-
metadata: { ...viewport.getViewReference(), referencedImageId },
|
|
16966
|
-
});
|
|
16967
|
-
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.addAnnotation)(annotation, element);
|
|
16968
|
-
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
16969
|
-
evt.preventDefault();
|
|
16970
|
-
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
16971
|
-
this.configuration.getTextCallback((text) => {
|
|
16972
|
-
if (!text) {
|
|
16973
|
-
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.removeAnnotation)(annotation.annotationUID);
|
|
16974
|
-
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
16975
|
-
this.isDrawing = false;
|
|
16976
|
-
return;
|
|
16977
|
-
}
|
|
16978
|
-
annotation.data.text = text;
|
|
16979
|
-
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__/* .triggerAnnotationCompleted */ .F$)(annotation);
|
|
16980
|
-
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
16981
|
-
});
|
|
16982
|
-
return annotation;
|
|
16983
|
-
};
|
|
16984
|
-
this.isPointNearTool = (element, annotation, canvasCoords, proximity) => {
|
|
16985
|
-
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
16986
|
-
const { viewport } = enabledElement;
|
|
16987
|
-
const { data } = annotation;
|
|
16988
|
-
const { canvasPosition, canvasSize } = this.configuration;
|
|
16989
|
-
if (!canvasPosition?.length) {
|
|
16990
|
-
return false;
|
|
16991
|
-
}
|
|
16992
|
-
if (Math.abs(canvasCoords[0] - canvasPosition[0] + canvasSize / 2) <=
|
|
16993
|
-
canvasSize / 2 &&
|
|
16994
|
-
Math.abs(canvasCoords[1] - canvasPosition[1] + canvasSize / 2) <=
|
|
16995
|
-
canvasSize / 2) {
|
|
16996
|
-
return true;
|
|
16997
|
-
}
|
|
16998
|
-
return false;
|
|
16999
|
-
};
|
|
17000
|
-
this.toolSelectedCallback = (evt, annotation) => {
|
|
17001
|
-
annotation.highlighted = true;
|
|
17002
|
-
evt.preventDefault();
|
|
17003
|
-
};
|
|
17004
|
-
this._endCallback = (evt) => {
|
|
17005
|
-
const eventDetail = evt.detail;
|
|
17006
|
-
const { element } = eventDetail;
|
|
17007
|
-
this._deactivateModify(element);
|
|
17008
|
-
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__.resetElementCursor)(element);
|
|
17009
|
-
};
|
|
17010
|
-
this.doubleClickCallback = (evt) => {
|
|
17011
|
-
const eventDetail = evt.detail;
|
|
17012
|
-
const { element } = eventDetail;
|
|
17013
|
-
let annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.getAnnotations)(this.getToolName(), element);
|
|
17014
|
-
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
17015
|
-
if (!annotations?.length) {
|
|
17016
|
-
return;
|
|
17017
|
-
}
|
|
17018
|
-
const clickedAnnotation = annotations.find((annotation) => this.isPointNearTool(element, annotation, eventDetail.currentPoints.canvas, 6));
|
|
17019
|
-
if (!clickedAnnotation) {
|
|
17020
|
-
return;
|
|
17021
|
-
}
|
|
17022
|
-
const annotation = clickedAnnotation;
|
|
17023
|
-
this.configuration.changeTextCallback(clickedAnnotation, evt.detail, this._doneChangingTextCallback.bind(this, element, annotation));
|
|
17024
|
-
this.isDrawing = false;
|
|
17025
|
-
evt.stopImmediatePropagation();
|
|
17026
|
-
evt.preventDefault();
|
|
17027
|
-
};
|
|
17028
|
-
this._activateModify = (element) => {
|
|
17029
|
-
_store__WEBPACK_IMPORTED_MODULE_6__/* .state */ .SB.isInteractingWithTool = true;
|
|
17030
|
-
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17031
|
-
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17032
|
-
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17033
|
-
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17034
|
-
};
|
|
17035
|
-
this._deactivateModify = (element) => {
|
|
17036
|
-
_store__WEBPACK_IMPORTED_MODULE_6__/* .state */ .SB.isInteractingWithTool = false;
|
|
17037
|
-
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17038
|
-
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17039
|
-
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17040
|
-
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17041
|
-
};
|
|
17042
|
-
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
17043
|
-
let renderStatus = false;
|
|
17044
|
-
const { viewport } = enabledElement;
|
|
17045
|
-
const { element } = viewport;
|
|
17046
|
-
let annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.getAnnotations)(this.getToolName(), element);
|
|
17047
|
-
if (!annotations?.length) {
|
|
17048
|
-
return renderStatus;
|
|
17049
|
-
}
|
|
17050
|
-
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
17051
|
-
if (!annotations?.length) {
|
|
17052
|
-
return renderStatus;
|
|
17053
|
-
}
|
|
17054
|
-
const styleSpecifier = {
|
|
17055
|
-
toolGroupId: this.toolGroupId,
|
|
17056
|
-
toolName: this.getToolName(),
|
|
17057
|
-
viewportId: enabledElement.viewport.id,
|
|
17058
|
-
};
|
|
17059
|
-
for (let i = 0; i < annotations.length; i++) {
|
|
17060
|
-
const annotation = annotations[i];
|
|
17061
|
-
const { annotationUID } = annotation;
|
|
17062
|
-
styleSpecifier.annotationUID = annotationUID;
|
|
17063
|
-
const { color } = this.getAnnotationStyle({
|
|
17064
|
-
annotation,
|
|
17065
|
-
styleSpecifier,
|
|
17066
|
-
});
|
|
17067
|
-
const { canvasPosition, canvasSize } = this.configuration;
|
|
17068
|
-
if (canvasPosition?.length) {
|
|
17069
|
-
const arrowUID = '1';
|
|
17070
|
-
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_5__.drawArrow)(svgDrawingHelper, annotationUID, arrowUID, canvasPosition.map((it) => it + canvasSize), canvasPosition, {
|
|
17071
|
-
color,
|
|
17072
|
-
width: 1,
|
|
17073
|
-
});
|
|
17074
|
-
}
|
|
17075
|
-
renderStatus = true;
|
|
17076
|
-
if (!viewport.getRenderingEngine()) {
|
|
17077
|
-
console.warn('Rendering Engine has been destroyed');
|
|
17078
|
-
return renderStatus;
|
|
17079
|
-
}
|
|
17080
|
-
}
|
|
17081
|
-
return renderStatus;
|
|
17082
|
-
};
|
|
17083
|
-
}
|
|
17084
|
-
cancel() {
|
|
17085
|
-
}
|
|
17086
|
-
handleSelectedCallback(evt, annotation, handle) {
|
|
17087
|
-
}
|
|
17088
|
-
_doneChangingTextCallback(element, annotation, updatedText) {
|
|
17089
|
-
annotation.data.text = updatedText;
|
|
17090
|
-
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17091
|
-
const { renderingEngine } = enabledElement;
|
|
17092
|
-
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
17093
|
-
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17094
|
-
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__/* .triggerAnnotationModified */ .hg)(annotation, element);
|
|
17095
|
-
}
|
|
17096
|
-
_isInsideVolume(index1, index2, dimensions) {
|
|
17097
|
-
return (_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index1, dimensions) &&
|
|
17098
|
-
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index2, dimensions));
|
|
17099
|
-
}
|
|
17100
|
-
}
|
|
17101
|
-
function getTextCallback(doneChangingTextCallback) {
|
|
17102
|
-
return doneChangingTextCallback(prompt('Enter your annotation:'));
|
|
17103
|
-
}
|
|
17104
|
-
function changeTextCallback(data, eventData, doneChangingTextCallback) {
|
|
17105
|
-
return doneChangingTextCallback(prompt('Enter your annotation:'));
|
|
17106
|
-
}
|
|
17107
|
-
KeyImageTool.toolName = 'KeyImage';
|
|
17108
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (KeyImageTool);
|
|
17109
|
-
|
|
17110
|
-
|
|
17111
|
-
/***/ }),
|
|
17112
|
-
|
|
17113
|
-
/***/ 3098:
|
|
16967
|
+
/***/ 76131:
|
|
17114
16968
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17115
16969
|
|
|
17116
16970
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17117
16971
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17118
16972
|
/* harmony export */ });
|
|
17119
16973
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
17120
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
16974
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
17121
16975
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39661);
|
|
17122
16976
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42975);
|
|
17123
16977
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93382);
|
|
@@ -17127,7 +16981,7 @@ KeyImageTool.toolName = 'KeyImage';
|
|
|
17127
16981
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41836);
|
|
17128
16982
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(36705);
|
|
17129
16983
|
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(79922);
|
|
17130
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(
|
|
16984
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(25876);
|
|
17131
16985
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33232);
|
|
17132
16986
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46966);
|
|
17133
16987
|
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(20724);
|
|
@@ -17151,7 +17005,7 @@ KeyImageTool.toolName = 'KeyImage';
|
|
|
17151
17005
|
|
|
17152
17006
|
|
|
17153
17007
|
const { transformWorldToIndex } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities;
|
|
17154
|
-
class
|
|
17008
|
+
class HeightTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .AnnotationTool */ .A8 {
|
|
17155
17009
|
constructor(toolProps = {}, defaultToolProps = {
|
|
17156
17010
|
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
17157
17011
|
configuration: {
|
|
@@ -17432,14 +17286,12 @@ class LengthTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .AnnotationTool */
|
|
|
17432
17286
|
lineWidth,
|
|
17433
17287
|
});
|
|
17434
17288
|
}
|
|
17435
|
-
const
|
|
17436
|
-
|
|
17437
|
-
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_11__.drawLine)(svgDrawingHelper, annotationUID, lineUID, canvasCoordinates[0], canvasCoordinates[1], {
|
|
17289
|
+
const heightUID = '0';
|
|
17290
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_11__.drawHeight)(svgDrawingHelper, annotationUID, heightUID, canvasCoordinates[0], canvasCoordinates[1], {
|
|
17438
17291
|
color,
|
|
17439
17292
|
width: lineWidth,
|
|
17440
|
-
lineDash,
|
|
17441
|
-
|
|
17442
|
-
}, dataId);
|
|
17293
|
+
lineDash: lineDash,
|
|
17294
|
+
});
|
|
17443
17295
|
renderStatus = true;
|
|
17444
17296
|
if (!viewport.getRenderingEngine()) {
|
|
17445
17297
|
console.warn('Rendering Engine has been destroyed');
|
|
@@ -17507,16 +17359,678 @@ class LengthTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .AnnotationTool */
|
|
|
17507
17359
|
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17508
17360
|
evt.preventDefault();
|
|
17509
17361
|
}
|
|
17510
|
-
|
|
17511
|
-
const dx =
|
|
17512
|
-
const dy =
|
|
17513
|
-
const dz =
|
|
17514
|
-
|
|
17515
|
-
|
|
17516
|
-
|
|
17517
|
-
|
|
17518
|
-
|
|
17519
|
-
|
|
17362
|
+
_calculateHeight(pos1, pos2) {
|
|
17363
|
+
const dx = pos2[0] - pos1[0];
|
|
17364
|
+
const dy = pos2[1] - pos1[1];
|
|
17365
|
+
const dz = pos2[2] - pos1[2];
|
|
17366
|
+
if (dx == 0) {
|
|
17367
|
+
if (dy != 0) {
|
|
17368
|
+
return Math.abs(dz);
|
|
17369
|
+
}
|
|
17370
|
+
else {
|
|
17371
|
+
return 0;
|
|
17372
|
+
}
|
|
17373
|
+
}
|
|
17374
|
+
else if (dy == 0) {
|
|
17375
|
+
return Math.abs(dz);
|
|
17376
|
+
}
|
|
17377
|
+
else if (dz == 0) {
|
|
17378
|
+
return Math.abs(dy);
|
|
17379
|
+
}
|
|
17380
|
+
}
|
|
17381
|
+
_calculateCachedStats(annotation, renderingEngine, enabledElement) {
|
|
17382
|
+
const data = annotation.data;
|
|
17383
|
+
const { element } = enabledElement.viewport;
|
|
17384
|
+
const worldPos1 = data.handles.points[0];
|
|
17385
|
+
const worldPos2 = data.handles.points[1];
|
|
17386
|
+
const { cachedStats } = data;
|
|
17387
|
+
const targetIds = Object.keys(cachedStats);
|
|
17388
|
+
for (let i = 0; i < targetIds.length; i++) {
|
|
17389
|
+
const targetId = targetIds[i];
|
|
17390
|
+
const image = this.getTargetIdImage(targetId, renderingEngine);
|
|
17391
|
+
if (!image) {
|
|
17392
|
+
continue;
|
|
17393
|
+
}
|
|
17394
|
+
const { imageData, dimensions } = image;
|
|
17395
|
+
const index1 = transformWorldToIndex(imageData, worldPos1);
|
|
17396
|
+
const index2 = transformWorldToIndex(imageData, worldPos2);
|
|
17397
|
+
const handles = [index1, index2];
|
|
17398
|
+
const { scale, units } = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__/* .getCalibratedLengthUnitsAndScale */ .mh)(image, handles);
|
|
17399
|
+
const height = this._calculateHeight(worldPos1, worldPos2) / scale;
|
|
17400
|
+
this._isInsideVolume(index1, index2, dimensions)
|
|
17401
|
+
? (this.isHandleOutsideImage = false)
|
|
17402
|
+
: (this.isHandleOutsideImage = true);
|
|
17403
|
+
cachedStats[targetId] = {
|
|
17404
|
+
height,
|
|
17405
|
+
unit: units,
|
|
17406
|
+
};
|
|
17407
|
+
}
|
|
17408
|
+
annotation.invalidated = false;
|
|
17409
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__/* .triggerAnnotationModified */ .hg)(annotation, element);
|
|
17410
|
+
return cachedStats;
|
|
17411
|
+
}
|
|
17412
|
+
_isInsideVolume(index1, index2, dimensions) {
|
|
17413
|
+
return (_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index1, dimensions) &&
|
|
17414
|
+
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index2, dimensions));
|
|
17415
|
+
}
|
|
17416
|
+
}
|
|
17417
|
+
function defaultGetTextLines(data, targetId) {
|
|
17418
|
+
const cachedVolumeStats = data.cachedStats[targetId];
|
|
17419
|
+
const { height, unit } = cachedVolumeStats;
|
|
17420
|
+
if (height === undefined || height === null || isNaN(height)) {
|
|
17421
|
+
return;
|
|
17422
|
+
}
|
|
17423
|
+
const textLines = [`${(0,_utilities__WEBPACK_IMPORTED_MODULE_3__.roundNumber)(height)} ${unit}`];
|
|
17424
|
+
return textLines;
|
|
17425
|
+
}
|
|
17426
|
+
HeightTool.toolName = 'Height';
|
|
17427
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (HeightTool);
|
|
17428
|
+
|
|
17429
|
+
|
|
17430
|
+
/***/ }),
|
|
17431
|
+
|
|
17432
|
+
/***/ 7003:
|
|
17433
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17434
|
+
|
|
17435
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17436
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17437
|
+
/* harmony export */ });
|
|
17438
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
17439
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
17440
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
17441
|
+
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86614);
|
|
17442
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36705);
|
|
17443
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25876);
|
|
17444
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33232);
|
|
17445
|
+
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(46966);
|
|
17446
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(66878);
|
|
17447
|
+
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23118);
|
|
17448
|
+
|
|
17449
|
+
|
|
17450
|
+
|
|
17451
|
+
|
|
17452
|
+
|
|
17453
|
+
|
|
17454
|
+
|
|
17455
|
+
|
|
17456
|
+
|
|
17457
|
+
|
|
17458
|
+
class KeyImageTool extends _base__WEBPACK_IMPORTED_MODULE_2__/* .AnnotationTool */ .A8 {
|
|
17459
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
17460
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
17461
|
+
configuration: {
|
|
17462
|
+
getTextCallback,
|
|
17463
|
+
changeTextCallback,
|
|
17464
|
+
canvasPosition: [10, 10],
|
|
17465
|
+
canvasSize: 10,
|
|
17466
|
+
},
|
|
17467
|
+
}) {
|
|
17468
|
+
super(toolProps, defaultToolProps);
|
|
17469
|
+
this.addNewAnnotation = (evt) => {
|
|
17470
|
+
const eventDetail = evt.detail;
|
|
17471
|
+
const { currentPoints, element } = eventDetail;
|
|
17472
|
+
const worldPos = currentPoints.world;
|
|
17473
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17474
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
17475
|
+
const camera = viewport.getCamera();
|
|
17476
|
+
const { viewPlaneNormal, viewUp } = camera;
|
|
17477
|
+
const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
|
|
17478
|
+
const annotation = KeyImageTool.createAnnotation({
|
|
17479
|
+
metadata: { ...viewport.getViewReference(), referencedImageId },
|
|
17480
|
+
});
|
|
17481
|
+
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.addAnnotation)(annotation, element);
|
|
17482
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
17483
|
+
evt.preventDefault();
|
|
17484
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17485
|
+
this.configuration.getTextCallback((text) => {
|
|
17486
|
+
if (!text) {
|
|
17487
|
+
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.removeAnnotation)(annotation.annotationUID);
|
|
17488
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17489
|
+
this.isDrawing = false;
|
|
17490
|
+
return;
|
|
17491
|
+
}
|
|
17492
|
+
annotation.data.text = text;
|
|
17493
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__/* .triggerAnnotationCompleted */ .F$)(annotation);
|
|
17494
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17495
|
+
});
|
|
17496
|
+
return annotation;
|
|
17497
|
+
};
|
|
17498
|
+
this.isPointNearTool = (element, annotation, canvasCoords, proximity) => {
|
|
17499
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17500
|
+
const { viewport } = enabledElement;
|
|
17501
|
+
const { data } = annotation;
|
|
17502
|
+
const { canvasPosition, canvasSize } = this.configuration;
|
|
17503
|
+
if (!canvasPosition?.length) {
|
|
17504
|
+
return false;
|
|
17505
|
+
}
|
|
17506
|
+
if (Math.abs(canvasCoords[0] - canvasPosition[0] + canvasSize / 2) <=
|
|
17507
|
+
canvasSize / 2 &&
|
|
17508
|
+
Math.abs(canvasCoords[1] - canvasPosition[1] + canvasSize / 2) <=
|
|
17509
|
+
canvasSize / 2) {
|
|
17510
|
+
return true;
|
|
17511
|
+
}
|
|
17512
|
+
return false;
|
|
17513
|
+
};
|
|
17514
|
+
this.toolSelectedCallback = (evt, annotation) => {
|
|
17515
|
+
annotation.highlighted = true;
|
|
17516
|
+
evt.preventDefault();
|
|
17517
|
+
};
|
|
17518
|
+
this._endCallback = (evt) => {
|
|
17519
|
+
const eventDetail = evt.detail;
|
|
17520
|
+
const { element } = eventDetail;
|
|
17521
|
+
this._deactivateModify(element);
|
|
17522
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__.resetElementCursor)(element);
|
|
17523
|
+
};
|
|
17524
|
+
this.doubleClickCallback = (evt) => {
|
|
17525
|
+
const eventDetail = evt.detail;
|
|
17526
|
+
const { element } = eventDetail;
|
|
17527
|
+
let annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.getAnnotations)(this.getToolName(), element);
|
|
17528
|
+
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
17529
|
+
if (!annotations?.length) {
|
|
17530
|
+
return;
|
|
17531
|
+
}
|
|
17532
|
+
const clickedAnnotation = annotations.find((annotation) => this.isPointNearTool(element, annotation, eventDetail.currentPoints.canvas, 6));
|
|
17533
|
+
if (!clickedAnnotation) {
|
|
17534
|
+
return;
|
|
17535
|
+
}
|
|
17536
|
+
const annotation = clickedAnnotation;
|
|
17537
|
+
this.configuration.changeTextCallback(clickedAnnotation, evt.detail, this._doneChangingTextCallback.bind(this, element, annotation));
|
|
17538
|
+
this.isDrawing = false;
|
|
17539
|
+
evt.stopImmediatePropagation();
|
|
17540
|
+
evt.preventDefault();
|
|
17541
|
+
};
|
|
17542
|
+
this._activateModify = (element) => {
|
|
17543
|
+
_store__WEBPACK_IMPORTED_MODULE_6__/* .state */ .SB.isInteractingWithTool = true;
|
|
17544
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17545
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17546
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17547
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17548
|
+
};
|
|
17549
|
+
this._deactivateModify = (element) => {
|
|
17550
|
+
_store__WEBPACK_IMPORTED_MODULE_6__/* .state */ .SB.isInteractingWithTool = false;
|
|
17551
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17552
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17553
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17554
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17555
|
+
};
|
|
17556
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
17557
|
+
let renderStatus = false;
|
|
17558
|
+
const { viewport } = enabledElement;
|
|
17559
|
+
const { element } = viewport;
|
|
17560
|
+
let annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.getAnnotations)(this.getToolName(), element);
|
|
17561
|
+
if (!annotations?.length) {
|
|
17562
|
+
return renderStatus;
|
|
17563
|
+
}
|
|
17564
|
+
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
17565
|
+
if (!annotations?.length) {
|
|
17566
|
+
return renderStatus;
|
|
17567
|
+
}
|
|
17568
|
+
const styleSpecifier = {
|
|
17569
|
+
toolGroupId: this.toolGroupId,
|
|
17570
|
+
toolName: this.getToolName(),
|
|
17571
|
+
viewportId: enabledElement.viewport.id,
|
|
17572
|
+
};
|
|
17573
|
+
for (let i = 0; i < annotations.length; i++) {
|
|
17574
|
+
const annotation = annotations[i];
|
|
17575
|
+
const { annotationUID } = annotation;
|
|
17576
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
17577
|
+
const { color } = this.getAnnotationStyle({
|
|
17578
|
+
annotation,
|
|
17579
|
+
styleSpecifier,
|
|
17580
|
+
});
|
|
17581
|
+
const { canvasPosition, canvasSize } = this.configuration;
|
|
17582
|
+
if (canvasPosition?.length) {
|
|
17583
|
+
const arrowUID = '1';
|
|
17584
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_5__.drawArrow)(svgDrawingHelper, annotationUID, arrowUID, canvasPosition.map((it) => it + canvasSize), canvasPosition, {
|
|
17585
|
+
color,
|
|
17586
|
+
width: 1,
|
|
17587
|
+
});
|
|
17588
|
+
}
|
|
17589
|
+
renderStatus = true;
|
|
17590
|
+
if (!viewport.getRenderingEngine()) {
|
|
17591
|
+
console.warn('Rendering Engine has been destroyed');
|
|
17592
|
+
return renderStatus;
|
|
17593
|
+
}
|
|
17594
|
+
}
|
|
17595
|
+
return renderStatus;
|
|
17596
|
+
};
|
|
17597
|
+
}
|
|
17598
|
+
cancel() {
|
|
17599
|
+
}
|
|
17600
|
+
handleSelectedCallback(evt, annotation, handle) {
|
|
17601
|
+
}
|
|
17602
|
+
_doneChangingTextCallback(element, annotation, updatedText) {
|
|
17603
|
+
annotation.data.text = updatedText;
|
|
17604
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17605
|
+
const { renderingEngine } = enabledElement;
|
|
17606
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_7__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
17607
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17608
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__/* .triggerAnnotationModified */ .hg)(annotation, element);
|
|
17609
|
+
}
|
|
17610
|
+
_isInsideVolume(index1, index2, dimensions) {
|
|
17611
|
+
return (_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index1, dimensions) &&
|
|
17612
|
+
_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities.indexWithinDimensions(index2, dimensions));
|
|
17613
|
+
}
|
|
17614
|
+
}
|
|
17615
|
+
function getTextCallback(doneChangingTextCallback) {
|
|
17616
|
+
return doneChangingTextCallback(prompt('Enter your annotation:'));
|
|
17617
|
+
}
|
|
17618
|
+
function changeTextCallback(data, eventData, doneChangingTextCallback) {
|
|
17619
|
+
return doneChangingTextCallback(prompt('Enter your annotation:'));
|
|
17620
|
+
}
|
|
17621
|
+
KeyImageTool.toolName = 'KeyImage';
|
|
17622
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (KeyImageTool);
|
|
17623
|
+
|
|
17624
|
+
|
|
17625
|
+
/***/ }),
|
|
17626
|
+
|
|
17627
|
+
/***/ 3098:
|
|
17628
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
17629
|
+
|
|
17630
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17631
|
+
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17632
|
+
/* harmony export */ });
|
|
17633
|
+
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
17634
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
17635
|
+
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39661);
|
|
17636
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42975);
|
|
17637
|
+
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(93382);
|
|
17638
|
+
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(90685);
|
|
17639
|
+
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(86614);
|
|
17640
|
+
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11163);
|
|
17641
|
+
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(41836);
|
|
17642
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(36705);
|
|
17643
|
+
/* harmony import */ var _utilities_math_line__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(79922);
|
|
17644
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(25876);
|
|
17645
|
+
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(33232);
|
|
17646
|
+
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46966);
|
|
17647
|
+
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(20724);
|
|
17648
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(66878);
|
|
17649
|
+
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(23118);
|
|
17650
|
+
|
|
17651
|
+
|
|
17652
|
+
|
|
17653
|
+
|
|
17654
|
+
|
|
17655
|
+
|
|
17656
|
+
|
|
17657
|
+
|
|
17658
|
+
|
|
17659
|
+
|
|
17660
|
+
|
|
17661
|
+
|
|
17662
|
+
|
|
17663
|
+
|
|
17664
|
+
|
|
17665
|
+
|
|
17666
|
+
|
|
17667
|
+
const { transformWorldToIndex } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.utilities;
|
|
17668
|
+
class LengthTool extends _base__WEBPACK_IMPORTED_MODULE_4__/* .AnnotationTool */ .A8 {
|
|
17669
|
+
constructor(toolProps = {}, defaultToolProps = {
|
|
17670
|
+
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
17671
|
+
configuration: {
|
|
17672
|
+
preventHandleOutsideImage: false,
|
|
17673
|
+
getTextLines: defaultGetTextLines,
|
|
17674
|
+
},
|
|
17675
|
+
}) {
|
|
17676
|
+
super(toolProps, defaultToolProps);
|
|
17677
|
+
this.addNewAnnotation = (evt) => {
|
|
17678
|
+
const eventDetail = evt.detail;
|
|
17679
|
+
const { currentPoints, element } = eventDetail;
|
|
17680
|
+
const worldPos = currentPoints.world;
|
|
17681
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17682
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
17683
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_16__.hideElementCursor)(element);
|
|
17684
|
+
this.isDrawing = true;
|
|
17685
|
+
const { viewPlaneNormal, viewUp, position: cameraPosition, } = viewport.getCamera();
|
|
17686
|
+
const referencedImageId = this.getReferencedImageId(viewport, worldPos, viewPlaneNormal, viewUp);
|
|
17687
|
+
const annotation = {
|
|
17688
|
+
highlighted: true,
|
|
17689
|
+
invalidated: true,
|
|
17690
|
+
metadata: {
|
|
17691
|
+
...viewport.getViewReference({ points: [worldPos] }),
|
|
17692
|
+
toolName: this.getToolName(),
|
|
17693
|
+
referencedImageId,
|
|
17694
|
+
viewUp,
|
|
17695
|
+
cameraPosition,
|
|
17696
|
+
},
|
|
17697
|
+
data: {
|
|
17698
|
+
handles: {
|
|
17699
|
+
points: [[...worldPos], [...worldPos]],
|
|
17700
|
+
activeHandleIndex: null,
|
|
17701
|
+
textBox: {
|
|
17702
|
+
hasMoved: false,
|
|
17703
|
+
worldPosition: [0, 0, 0],
|
|
17704
|
+
worldBoundingBox: {
|
|
17705
|
+
topLeft: [0, 0, 0],
|
|
17706
|
+
topRight: [0, 0, 0],
|
|
17707
|
+
bottomLeft: [0, 0, 0],
|
|
17708
|
+
bottomRight: [0, 0, 0],
|
|
17709
|
+
},
|
|
17710
|
+
},
|
|
17711
|
+
},
|
|
17712
|
+
label: '',
|
|
17713
|
+
cachedStats: {},
|
|
17714
|
+
},
|
|
17715
|
+
};
|
|
17716
|
+
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.addAnnotation)(annotation, element);
|
|
17717
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
17718
|
+
this.editData = {
|
|
17719
|
+
annotation,
|
|
17720
|
+
viewportIdsToRender,
|
|
17721
|
+
handleIndex: 1,
|
|
17722
|
+
movingTextBox: false,
|
|
17723
|
+
newAnnotation: true,
|
|
17724
|
+
hasMoved: false,
|
|
17725
|
+
};
|
|
17726
|
+
this._activateDraw(element);
|
|
17727
|
+
evt.preventDefault();
|
|
17728
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17729
|
+
return annotation;
|
|
17730
|
+
};
|
|
17731
|
+
this.isPointNearTool = (element, annotation, canvasCoords, proximity) => {
|
|
17732
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17733
|
+
const { viewport } = enabledElement;
|
|
17734
|
+
const { data } = annotation;
|
|
17735
|
+
const [point1, point2] = data.handles.points;
|
|
17736
|
+
const canvasPoint1 = viewport.worldToCanvas(point1);
|
|
17737
|
+
const canvasPoint2 = viewport.worldToCanvas(point2);
|
|
17738
|
+
const line = {
|
|
17739
|
+
start: {
|
|
17740
|
+
x: canvasPoint1[0],
|
|
17741
|
+
y: canvasPoint1[1],
|
|
17742
|
+
},
|
|
17743
|
+
end: {
|
|
17744
|
+
x: canvasPoint2[0],
|
|
17745
|
+
y: canvasPoint2[1],
|
|
17746
|
+
},
|
|
17747
|
+
};
|
|
17748
|
+
const distanceToPoint = _utilities_math_line__WEBPACK_IMPORTED_MODULE_10__.distanceToPoint([line.start.x, line.start.y], [line.end.x, line.end.y], [canvasCoords[0], canvasCoords[1]]);
|
|
17749
|
+
if (distanceToPoint <= proximity) {
|
|
17750
|
+
return true;
|
|
17751
|
+
}
|
|
17752
|
+
return false;
|
|
17753
|
+
};
|
|
17754
|
+
this.toolSelectedCallback = (evt, annotation) => {
|
|
17755
|
+
const eventDetail = evt.detail;
|
|
17756
|
+
const { element } = eventDetail;
|
|
17757
|
+
annotation.highlighted = true;
|
|
17758
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
17759
|
+
this.editData = {
|
|
17760
|
+
annotation,
|
|
17761
|
+
viewportIdsToRender,
|
|
17762
|
+
movingTextBox: false,
|
|
17763
|
+
};
|
|
17764
|
+
this._activateModify(element);
|
|
17765
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_16__.hideElementCursor)(element);
|
|
17766
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17767
|
+
const { renderingEngine } = enabledElement;
|
|
17768
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17769
|
+
evt.preventDefault();
|
|
17770
|
+
};
|
|
17771
|
+
this._endCallback = (evt) => {
|
|
17772
|
+
const eventDetail = evt.detail;
|
|
17773
|
+
const { element } = eventDetail;
|
|
17774
|
+
const { annotation, viewportIdsToRender, newAnnotation, hasMoved } = this.editData;
|
|
17775
|
+
const { data } = annotation;
|
|
17776
|
+
if (newAnnotation && !hasMoved) {
|
|
17777
|
+
return;
|
|
17778
|
+
}
|
|
17779
|
+
data.handles.activeHandleIndex = null;
|
|
17780
|
+
this._deactivateModify(element);
|
|
17781
|
+
this._deactivateDraw(element);
|
|
17782
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_16__.resetElementCursor)(element);
|
|
17783
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17784
|
+
const { renderingEngine } = enabledElement;
|
|
17785
|
+
if (this.isHandleOutsideImage &&
|
|
17786
|
+
this.configuration.preventHandleOutsideImage) {
|
|
17787
|
+
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.removeAnnotation)(annotation.annotationUID);
|
|
17788
|
+
}
|
|
17789
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17790
|
+
if (newAnnotation) {
|
|
17791
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__/* .triggerAnnotationCompleted */ .F$)(annotation);
|
|
17792
|
+
}
|
|
17793
|
+
this.editData = null;
|
|
17794
|
+
this.isDrawing = false;
|
|
17795
|
+
};
|
|
17796
|
+
this._dragCallback = (evt) => {
|
|
17797
|
+
this.isDrawing = true;
|
|
17798
|
+
const eventDetail = evt.detail;
|
|
17799
|
+
const { element } = eventDetail;
|
|
17800
|
+
const { annotation, viewportIdsToRender, handleIndex, movingTextBox } = this.editData;
|
|
17801
|
+
const { data } = annotation;
|
|
17802
|
+
if (movingTextBox) {
|
|
17803
|
+
const { deltaPoints } = eventDetail;
|
|
17804
|
+
const worldPosDelta = deltaPoints.world;
|
|
17805
|
+
const { textBox } = data.handles;
|
|
17806
|
+
const { worldPosition } = textBox;
|
|
17807
|
+
worldPosition[0] += worldPosDelta[0];
|
|
17808
|
+
worldPosition[1] += worldPosDelta[1];
|
|
17809
|
+
worldPosition[2] += worldPosDelta[2];
|
|
17810
|
+
textBox.hasMoved = true;
|
|
17811
|
+
}
|
|
17812
|
+
else if (handleIndex === undefined) {
|
|
17813
|
+
const { deltaPoints } = eventDetail;
|
|
17814
|
+
const worldPosDelta = deltaPoints.world;
|
|
17815
|
+
const points = data.handles.points;
|
|
17816
|
+
points.forEach((point) => {
|
|
17817
|
+
point[0] += worldPosDelta[0];
|
|
17818
|
+
point[1] += worldPosDelta[1];
|
|
17819
|
+
point[2] += worldPosDelta[2];
|
|
17820
|
+
});
|
|
17821
|
+
annotation.invalidated = true;
|
|
17822
|
+
}
|
|
17823
|
+
else {
|
|
17824
|
+
const { currentPoints } = eventDetail;
|
|
17825
|
+
const worldPos = currentPoints.world;
|
|
17826
|
+
data.handles.points[handleIndex] = [...worldPos];
|
|
17827
|
+
annotation.invalidated = true;
|
|
17828
|
+
}
|
|
17829
|
+
this.editData.hasMoved = true;
|
|
17830
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17831
|
+
const { renderingEngine } = enabledElement;
|
|
17832
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17833
|
+
};
|
|
17834
|
+
this.cancel = (element) => {
|
|
17835
|
+
if (this.isDrawing) {
|
|
17836
|
+
this.isDrawing = false;
|
|
17837
|
+
this._deactivateDraw(element);
|
|
17838
|
+
this._deactivateModify(element);
|
|
17839
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_16__.resetElementCursor)(element);
|
|
17840
|
+
const { annotation, viewportIdsToRender, newAnnotation } = this.editData;
|
|
17841
|
+
const { data } = annotation;
|
|
17842
|
+
annotation.highlighted = false;
|
|
17843
|
+
data.handles.activeHandleIndex = null;
|
|
17844
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
17845
|
+
const { renderingEngine } = enabledElement;
|
|
17846
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
17847
|
+
if (newAnnotation) {
|
|
17848
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_9__/* .triggerAnnotationCompleted */ .F$)(annotation);
|
|
17849
|
+
}
|
|
17850
|
+
this.editData = null;
|
|
17851
|
+
return annotation.annotationUID;
|
|
17852
|
+
}
|
|
17853
|
+
};
|
|
17854
|
+
this._activateModify = (element) => {
|
|
17855
|
+
_store__WEBPACK_IMPORTED_MODULE_12__/* .state */ .SB.isInteractingWithTool = true;
|
|
17856
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17857
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_DRAG, this._dragCallback);
|
|
17858
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17859
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17860
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_DRAG, this._dragCallback);
|
|
17861
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17862
|
+
};
|
|
17863
|
+
this._deactivateModify = (element) => {
|
|
17864
|
+
_store__WEBPACK_IMPORTED_MODULE_12__/* .state */ .SB.isInteractingWithTool = false;
|
|
17865
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17866
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_DRAG, this._dragCallback);
|
|
17867
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17868
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17869
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_DRAG, this._dragCallback);
|
|
17870
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17871
|
+
};
|
|
17872
|
+
this._activateDraw = (element) => {
|
|
17873
|
+
_store__WEBPACK_IMPORTED_MODULE_12__/* .state */ .SB.isInteractingWithTool = true;
|
|
17874
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17875
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_DRAG, this._dragCallback);
|
|
17876
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_MOVE, this._dragCallback);
|
|
17877
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17878
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17879
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_DRAG, this._dragCallback);
|
|
17880
|
+
element.addEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17881
|
+
};
|
|
17882
|
+
this._deactivateDraw = (element) => {
|
|
17883
|
+
_store__WEBPACK_IMPORTED_MODULE_12__/* .state */ .SB.isInteractingWithTool = false;
|
|
17884
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_UP, this._endCallback);
|
|
17885
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_DRAG, this._dragCallback);
|
|
17886
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_MOVE, this._dragCallback);
|
|
17887
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.MOUSE_CLICK, this._endCallback);
|
|
17888
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_END, this._endCallback);
|
|
17889
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_DRAG, this._dragCallback);
|
|
17890
|
+
element.removeEventListener(_enums__WEBPACK_IMPORTED_MODULE_0__.Events.TOUCH_TAP, this._endCallback);
|
|
17891
|
+
};
|
|
17892
|
+
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
17893
|
+
let renderStatus = false;
|
|
17894
|
+
const { viewport } = enabledElement;
|
|
17895
|
+
const { element } = viewport;
|
|
17896
|
+
let annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_6__.getAnnotations)(this.getToolName(), element);
|
|
17897
|
+
if (!annotations?.length) {
|
|
17898
|
+
return renderStatus;
|
|
17899
|
+
}
|
|
17900
|
+
annotations = this.filterInteractableAnnotationsForElement(element, annotations);
|
|
17901
|
+
if (!annotations?.length) {
|
|
17902
|
+
return renderStatus;
|
|
17903
|
+
}
|
|
17904
|
+
const targetId = this.getTargetId(viewport);
|
|
17905
|
+
const renderingEngine = viewport.getRenderingEngine();
|
|
17906
|
+
const styleSpecifier = {
|
|
17907
|
+
toolGroupId: this.toolGroupId,
|
|
17908
|
+
toolName: this.getToolName(),
|
|
17909
|
+
viewportId: enabledElement.viewport.id,
|
|
17910
|
+
};
|
|
17911
|
+
for (let i = 0; i < annotations.length; i++) {
|
|
17912
|
+
const annotation = annotations[i];
|
|
17913
|
+
const { annotationUID, data } = annotation;
|
|
17914
|
+
const { points, activeHandleIndex } = data.handles;
|
|
17915
|
+
styleSpecifier.annotationUID = annotationUID;
|
|
17916
|
+
const { color, lineWidth, lineDash, shadow } = this.getAnnotationStyle({
|
|
17917
|
+
annotation,
|
|
17918
|
+
styleSpecifier,
|
|
17919
|
+
});
|
|
17920
|
+
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
17921
|
+
let activeHandleCanvasCoords;
|
|
17922
|
+
if (!data.cachedStats[targetId] ||
|
|
17923
|
+
data.cachedStats[targetId].unit == null) {
|
|
17924
|
+
data.cachedStats[targetId] = {
|
|
17925
|
+
length: null,
|
|
17926
|
+
unit: null,
|
|
17927
|
+
};
|
|
17928
|
+
this._calculateCachedStats(annotation, renderingEngine, enabledElement);
|
|
17929
|
+
}
|
|
17930
|
+
else if (annotation.invalidated) {
|
|
17931
|
+
this._throttledCalculateCachedStats(annotation, renderingEngine, enabledElement);
|
|
17932
|
+
}
|
|
17933
|
+
if (!(0,_stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_8__.isAnnotationVisible)(annotationUID)) {
|
|
17934
|
+
continue;
|
|
17935
|
+
}
|
|
17936
|
+
if (!(0,_stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_7__.isAnnotationLocked)(annotation) &&
|
|
17937
|
+
!this.editData &&
|
|
17938
|
+
activeHandleIndex !== null) {
|
|
17939
|
+
activeHandleCanvasCoords = [canvasCoordinates[activeHandleIndex]];
|
|
17940
|
+
}
|
|
17941
|
+
if (activeHandleCanvasCoords) {
|
|
17942
|
+
const handleGroupUID = '0';
|
|
17943
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_11__.drawHandles)(svgDrawingHelper, annotationUID, handleGroupUID, canvasCoordinates, {
|
|
17944
|
+
color,
|
|
17945
|
+
lineDash,
|
|
17946
|
+
lineWidth,
|
|
17947
|
+
});
|
|
17948
|
+
}
|
|
17949
|
+
const dataId = `${annotationUID}-line`;
|
|
17950
|
+
const lineUID = '1';
|
|
17951
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_11__.drawLine)(svgDrawingHelper, annotationUID, lineUID, canvasCoordinates[0], canvasCoordinates[1], {
|
|
17952
|
+
color,
|
|
17953
|
+
width: lineWidth,
|
|
17954
|
+
lineDash,
|
|
17955
|
+
shadow,
|
|
17956
|
+
}, dataId);
|
|
17957
|
+
renderStatus = true;
|
|
17958
|
+
if (!viewport.getRenderingEngine()) {
|
|
17959
|
+
console.warn('Rendering Engine has been destroyed');
|
|
17960
|
+
return renderStatus;
|
|
17961
|
+
}
|
|
17962
|
+
const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
17963
|
+
if (!options.visibility) {
|
|
17964
|
+
data.handles.textBox = {
|
|
17965
|
+
hasMoved: false,
|
|
17966
|
+
worldPosition: [0, 0, 0],
|
|
17967
|
+
worldBoundingBox: {
|
|
17968
|
+
topLeft: [0, 0, 0],
|
|
17969
|
+
topRight: [0, 0, 0],
|
|
17970
|
+
bottomLeft: [0, 0, 0],
|
|
17971
|
+
bottomRight: [0, 0, 0],
|
|
17972
|
+
},
|
|
17973
|
+
};
|
|
17974
|
+
continue;
|
|
17975
|
+
}
|
|
17976
|
+
const textLines = this.configuration.getTextLines(data, targetId);
|
|
17977
|
+
if (!data.handles.textBox.hasMoved) {
|
|
17978
|
+
const canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_14__.getTextBoxCoordsCanvas)(canvasCoordinates);
|
|
17979
|
+
data.handles.textBox.worldPosition =
|
|
17980
|
+
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
17981
|
+
}
|
|
17982
|
+
const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
|
|
17983
|
+
const textBoxUID = '1';
|
|
17984
|
+
const boundingBox = (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_11__.drawLinkedTextBox)(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, canvasCoordinates, {}, options);
|
|
17985
|
+
const { x: left, y: top, width, height } = boundingBox;
|
|
17986
|
+
data.handles.textBox.worldBoundingBox = {
|
|
17987
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
17988
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
17989
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
17990
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
17991
|
+
};
|
|
17992
|
+
}
|
|
17993
|
+
return renderStatus;
|
|
17994
|
+
};
|
|
17995
|
+
this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(this._calculateCachedStats, 100, { trailing: true });
|
|
17996
|
+
}
|
|
17997
|
+
handleSelectedCallback(evt, annotation, handle) {
|
|
17998
|
+
const eventDetail = evt.detail;
|
|
17999
|
+
const { element } = eventDetail;
|
|
18000
|
+
const { data } = annotation;
|
|
18001
|
+
annotation.highlighted = true;
|
|
18002
|
+
let movingTextBox = false;
|
|
18003
|
+
let handleIndex;
|
|
18004
|
+
if (handle.worldPosition) {
|
|
18005
|
+
movingTextBox = true;
|
|
18006
|
+
}
|
|
18007
|
+
else {
|
|
18008
|
+
handleIndex = data.handles.points.findIndex((p) => p === handle);
|
|
18009
|
+
}
|
|
18010
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_13__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
18011
|
+
this.editData = {
|
|
18012
|
+
annotation,
|
|
18013
|
+
viewportIdsToRender,
|
|
18014
|
+
handleIndex,
|
|
18015
|
+
movingTextBox,
|
|
18016
|
+
};
|
|
18017
|
+
this._activateModify(element);
|
|
18018
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_16__.hideElementCursor)(element);
|
|
18019
|
+
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__.getEnabledElement)(element);
|
|
18020
|
+
const { renderingEngine } = enabledElement;
|
|
18021
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_15__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
18022
|
+
evt.preventDefault();
|
|
18023
|
+
}
|
|
18024
|
+
_calculateLength(pos1, pos2) {
|
|
18025
|
+
const dx = pos1[0] - pos2[0];
|
|
18026
|
+
const dy = pos1[1] - pos2[1];
|
|
18027
|
+
const dz = pos1[2] - pos2[2];
|
|
18028
|
+
return Math.sqrt(dx * dx + dy * dy + dz * dz);
|
|
18029
|
+
}
|
|
18030
|
+
_calculateCachedStats(annotation, renderingEngine, enabledElement) {
|
|
18031
|
+
const data = annotation.data;
|
|
18032
|
+
const { element } = enabledElement.viewport;
|
|
18033
|
+
const worldPos1 = data.handles.points[0];
|
|
17520
18034
|
const worldPos2 = data.handles.points[1];
|
|
17521
18035
|
const { cachedStats } = data;
|
|
17522
18036
|
const targetIds = Object.keys(cachedStats);
|
|
@@ -17570,12 +18084,12 @@ LengthTool.toolName = 'Length';
|
|
|
17570
18084
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17571
18085
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17572
18086
|
/* harmony export */ });
|
|
17573
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
18087
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
17574
18088
|
/* harmony import */ var _LivewireContourTool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60682);
|
|
17575
18089
|
/* harmony import */ var _utilities_livewire_LiveWirePath__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27479);
|
|
17576
18090
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36705);
|
|
17577
18091
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68096);
|
|
17578
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
18092
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25876);
|
|
17579
18093
|
|
|
17580
18094
|
|
|
17581
18095
|
|
|
@@ -17676,9 +18190,9 @@ LivewireContourSegmentationTool.toolName = 'LivewireContourSegmentationTool';
|
|
|
17676
18190
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
17677
18191
|
/* harmony export */ });
|
|
17678
18192
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
17679
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
18193
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
17680
18194
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
17681
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
18195
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25876);
|
|
17682
18196
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33232);
|
|
17683
18197
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(68096);
|
|
17684
18198
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23118);
|
|
@@ -18205,7 +18719,7 @@ LivewireContourTool.toolName = 'LivewireContour';
|
|
|
18205
18719
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
18206
18720
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18207
18721
|
/* harmony export */ });
|
|
18208
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
18722
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
18209
18723
|
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32140);
|
|
18210
18724
|
/* harmony import */ var _PlanarFreehandROITool__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22455);
|
|
18211
18725
|
|
|
@@ -18249,12 +18763,12 @@ PlanarFreehandContourSegmentationTool.toolName =
|
|
|
18249
18763
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18250
18764
|
/* harmony export */ });
|
|
18251
18765
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
18252
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
18766
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
18253
18767
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
18254
18768
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(86614);
|
|
18255
18769
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36705);
|
|
18256
18770
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(39661);
|
|
18257
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
18771
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25876);
|
|
18258
18772
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33232);
|
|
18259
18773
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(68096);
|
|
18260
18774
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(46966);
|
|
@@ -18625,7 +19139,7 @@ ProbeTool.toolName = 'Probe';
|
|
|
18625
19139
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
18626
19140
|
/* harmony export */ });
|
|
18627
19141
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93382);
|
|
18628
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
19142
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
18629
19143
|
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(39661);
|
|
18630
19144
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42975);
|
|
18631
19145
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(90685);
|
|
@@ -18633,7 +19147,7 @@ ProbeTool.toolName = 'Probe';
|
|
|
18633
19147
|
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11163);
|
|
18634
19148
|
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(41836);
|
|
18635
19149
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(36705);
|
|
18636
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(
|
|
19150
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(25876);
|
|
18637
19151
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(33232);
|
|
18638
19152
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(68096);
|
|
18639
19153
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(46966);
|
|
@@ -19200,7 +19714,7 @@ RectangleROITool.toolName = 'RectangleROI';
|
|
|
19200
19714
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19201
19715
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19202
19716
|
/* harmony export */ });
|
|
19203
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
19717
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
19204
19718
|
/* harmony import */ var _SplineROITool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18215);
|
|
19205
19719
|
|
|
19206
19720
|
|
|
@@ -19229,10 +19743,10 @@ SplineContourSegmentationTool.toolName = 'SplineContourSegmentationTool';
|
|
|
19229
19743
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19230
19744
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19231
19745
|
/* harmony export */ });
|
|
19232
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
19746
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
19233
19747
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
19234
19748
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
19235
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
19749
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(25876);
|
|
19236
19750
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(33232);
|
|
19237
19751
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(68096);
|
|
19238
19752
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23118);
|
|
@@ -19983,12 +20497,12 @@ SplineROITool.toolName = 'SplineROI';
|
|
|
19983
20497
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
19984
20498
|
/* harmony export */ });
|
|
19985
20499
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68096);
|
|
19986
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
20500
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
19987
20501
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
19988
20502
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90685);
|
|
19989
20503
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(86614);
|
|
19990
20504
|
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(36705);
|
|
19991
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
20505
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25876);
|
|
19992
20506
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(33232);
|
|
19993
20507
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46966);
|
|
19994
20508
|
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(42975);
|
|
@@ -20471,11 +20985,11 @@ UltrasoundDirectionalTool.toolName = 'UltrasoundDirectionalTool';
|
|
|
20471
20985
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20472
20986
|
/* harmony export */ });
|
|
20473
20987
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(72076);
|
|
20474
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
20988
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(12651);
|
|
20475
20989
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
20476
20990
|
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(90685);
|
|
20477
20991
|
/* harmony import */ var _stateManagement__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50097);
|
|
20478
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
20992
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25876);
|
|
20479
20993
|
/* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33232);
|
|
20480
20994
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68096);
|
|
20481
20995
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(46966);
|
|
@@ -20959,7 +21473,7 @@ VideoRedactionTool.toolName = 'VideoRedaction';
|
|
|
20959
21473
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20960
21474
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20961
21475
|
/* harmony export */ });
|
|
20962
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
21476
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
20963
21477
|
/* harmony import */ var _BaseTool__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(78552);
|
|
20964
21478
|
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
20965
21479
|
/* harmony import */ var _utilities_triggerAnnotationRender__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(64307);
|
|
@@ -21035,7 +21549,7 @@ AnnotationDisplayTool.toolName = 'AnnotationDisplayTool';
|
|
|
21035
21549
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21036
21550
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
21037
21551
|
/* harmony export */ });
|
|
21038
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
21552
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
21039
21553
|
/* harmony import */ var _enums_ToolModes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22712);
|
|
21040
21554
|
|
|
21041
21555
|
|
|
@@ -21197,7 +21711,7 @@ BaseTool.toolName = 'BaseTool';
|
|
|
21197
21711
|
/* unused harmony exports render, removeSegmentationRepresentation */
|
|
21198
21712
|
/* harmony import */ var _kitware_vtk_js_Common_DataModel_PiecewiseFunction__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44031);
|
|
21199
21713
|
/* harmony import */ var _kitware_vtk_js_Rendering_Core_ColorTransferFunction__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5193);
|
|
21200
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
21714
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(12651);
|
|
21201
21715
|
/* harmony import */ var _enums_SegmentationRepresentations__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74297);
|
|
21202
21716
|
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(14305);
|
|
21203
21717
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27078);
|
|
@@ -21496,6 +22010,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
21496
22010
|
qL: () => (/* reexport */ DragProbeTool/* default */.Z),
|
|
21497
22011
|
$3: () => (/* reexport */ EllipticalROITool/* default */.Z),
|
|
21498
22012
|
Ki: () => (/* reexport */ AnnotationEraserTool/* default */.Z),
|
|
22013
|
+
UH: () => (/* reexport */ HeightTool/* default */.Z),
|
|
21499
22014
|
FE: () => (/* reexport */ KeyImageTool/* default */.Z),
|
|
21500
22015
|
LW: () => (/* reexport */ LengthTool/* default */.Z),
|
|
21501
22016
|
g5: () => (/* reexport */ LivewireContourSegmentationTool/* default */.Z),
|
|
@@ -21579,6 +22094,8 @@ var SculptorTool = __webpack_require__(86684);
|
|
|
21579
22094
|
var BidirectionalTool = __webpack_require__(56611);
|
|
21580
22095
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/LengthTool.js
|
|
21581
22096
|
var LengthTool = __webpack_require__(3098);
|
|
22097
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/HeightTool.js
|
|
22098
|
+
var HeightTool = __webpack_require__(76131);
|
|
21582
22099
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/ProbeTool.js
|
|
21583
22100
|
var ProbeTool = __webpack_require__(86479);
|
|
21584
22101
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/annotation/DragProbeTool.js
|
|
@@ -21621,14 +22138,14 @@ var RectangleScissorsTool = __webpack_require__(13354);
|
|
|
21621
22138
|
var CircleScissorsTool = __webpack_require__(30809);
|
|
21622
22139
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/SphereScissorsTool.js
|
|
21623
22140
|
var SphereScissorsTool = __webpack_require__(30862);
|
|
21624
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
21625
|
-
var esm = __webpack_require__(
|
|
22141
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
22142
|
+
var esm = __webpack_require__(12651);
|
|
21626
22143
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/index.js
|
|
21627
22144
|
var stateManagement = __webpack_require__(50097);
|
|
21628
22145
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/stateManagement/annotation/annotationLocking.js
|
|
21629
22146
|
var annotationLocking = __webpack_require__(11163);
|
|
21630
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/index.js +
|
|
21631
|
-
var drawingSvg = __webpack_require__(
|
|
22147
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/drawingSvg/index.js + 19 modules
|
|
22148
|
+
var drawingSvg = __webpack_require__(25876);
|
|
21632
22149
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewportFilters/index.js + 4 modules
|
|
21633
22150
|
var viewportFilters = __webpack_require__(46966);
|
|
21634
22151
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/cursors/elementCursor.js
|
|
@@ -21786,12 +22303,26 @@ class RectangleROIThresholdTool extends RectangleROITool/* default */.Z {
|
|
|
21786
22303
|
RectangleROIThresholdTool.toolName = 'RectangleROIThreshold';
|
|
21787
22304
|
/* harmony default export */ const segmentation_RectangleROIThresholdTool = (RectangleROIThresholdTool);
|
|
21788
22305
|
|
|
22306
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getCalibratedUnits.js
|
|
22307
|
+
var getCalibratedUnits = __webpack_require__(39661);
|
|
21789
22308
|
// EXTERNAL MODULE: ../../../node_modules/gl-matrix/esm/index.js + 1 modules
|
|
21790
22309
|
var gl_matrix_esm = __webpack_require__(72076);
|
|
21791
22310
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/throttle.js
|
|
21792
22311
|
var throttle = __webpack_require__(90685);
|
|
22312
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/drawing/index.js + 1 modules
|
|
22313
|
+
var drawing = __webpack_require__(20724);
|
|
22314
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/planar/getWorldWidthAndHeightFromCorners.js
|
|
22315
|
+
var getWorldWidthAndHeightFromCorners = __webpack_require__(88582);
|
|
21793
22316
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/index.js + 1 modules
|
|
21794
22317
|
var utilities = __webpack_require__(42975);
|
|
22318
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getModalityUnit.js
|
|
22319
|
+
var getModalityUnit = __webpack_require__(15607);
|
|
22320
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/viewport/isViewportPreScaled.js
|
|
22321
|
+
var isViewportPreScaled = __webpack_require__(20752);
|
|
22322
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/basic/index.js + 2 modules
|
|
22323
|
+
var basic = __webpack_require__(51053);
|
|
22324
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/planar/index.js
|
|
22325
|
+
var planar = __webpack_require__(44037);
|
|
21795
22326
|
;// CONCATENATED MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js
|
|
21796
22327
|
|
|
21797
22328
|
|
|
@@ -21806,6 +22337,13 @@ var utilities = __webpack_require__(42975);
|
|
|
21806
22337
|
|
|
21807
22338
|
|
|
21808
22339
|
|
|
22340
|
+
|
|
22341
|
+
|
|
22342
|
+
|
|
22343
|
+
|
|
22344
|
+
|
|
22345
|
+
|
|
22346
|
+
|
|
21809
22347
|
|
|
21810
22348
|
const { transformWorldToIndex } = esm.utilities;
|
|
21811
22349
|
class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z {
|
|
@@ -21813,6 +22351,9 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21813
22351
|
configuration: {
|
|
21814
22352
|
numSlicesToPropagate: 10,
|
|
21815
22353
|
computePointsInsideVolume: false,
|
|
22354
|
+
getTextLines: defaultGetTextLines,
|
|
22355
|
+
statsCalculator: basic.BasicStatsCalculator,
|
|
22356
|
+
showTextBox: false,
|
|
21816
22357
|
},
|
|
21817
22358
|
}) {
|
|
21818
22359
|
super(toolProps, defaultToolProps);
|
|
@@ -21835,12 +22376,9 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21835
22376
|
imageVolume = esm.cache.getVolume(volumeId);
|
|
21836
22377
|
referencedImageId = esm.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
|
|
21837
22378
|
}
|
|
21838
|
-
if (!referencedImageId) {
|
|
21839
|
-
throw new Error('This tool does not work on non-acquisition planes');
|
|
21840
|
-
}
|
|
21841
|
-
const startIndex = viewport.getCurrentImageIdIndex();
|
|
21842
22379
|
const spacingInNormal = esm.utilities.getSpacingInNormalDirection(imageVolume, viewPlaneNormal);
|
|
21843
|
-
const
|
|
22380
|
+
const startCoord = this._getStartCoordinate(worldPos, viewPlaneNormal);
|
|
22381
|
+
const endCoord = this._getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal);
|
|
21844
22382
|
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
21845
22383
|
const annotation = {
|
|
21846
22384
|
highlighted: true,
|
|
@@ -21857,18 +22395,24 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21857
22395
|
},
|
|
21858
22396
|
data: {
|
|
21859
22397
|
label: '',
|
|
21860
|
-
|
|
21861
|
-
|
|
22398
|
+
startCoordinate: startCoord,
|
|
22399
|
+
endCoordinate: endCoord,
|
|
21862
22400
|
cachedStats: {
|
|
21863
22401
|
pointsInVolume: [],
|
|
21864
22402
|
projectionPoints: [],
|
|
21865
22403
|
projectionPointsImageIds: [referencedImageId],
|
|
22404
|
+
statistics: [],
|
|
21866
22405
|
},
|
|
21867
22406
|
handles: {
|
|
21868
22407
|
textBox: {
|
|
21869
22408
|
hasMoved: false,
|
|
21870
|
-
worldPosition:
|
|
21871
|
-
worldBoundingBox:
|
|
22409
|
+
worldPosition: [0, 0, 0],
|
|
22410
|
+
worldBoundingBox: {
|
|
22411
|
+
topLeft: [0, 0, 0],
|
|
22412
|
+
topRight: [0, 0, 0],
|
|
22413
|
+
bottomLeft: [0, 0, 0],
|
|
22414
|
+
bottomRight: [0, 0, 0],
|
|
22415
|
+
},
|
|
21872
22416
|
},
|
|
21873
22417
|
points: [
|
|
21874
22418
|
[...worldPos],
|
|
@@ -21919,7 +22463,7 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21919
22463
|
const targetId = this.getTargetId(enabledElement.viewport);
|
|
21920
22464
|
const imageVolume = esm.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
|
|
21921
22465
|
if (this.configuration.calculatePointsInsideVolume) {
|
|
21922
|
-
this._computePointsInsideVolume(annotation, imageVolume, enabledElement);
|
|
22466
|
+
this._computePointsInsideVolume(annotation, targetId, imageVolume, enabledElement);
|
|
21923
22467
|
}
|
|
21924
22468
|
(0,triggerAnnotationRenderForViewportIds/* default */.Z)(enabledElement.renderingEngine, viewportIdsToRender);
|
|
21925
22469
|
if (newAnnotation) {
|
|
@@ -21929,11 +22473,11 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21929
22473
|
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
21930
22474
|
let renderStatus = false;
|
|
21931
22475
|
const { viewport } = enabledElement;
|
|
21932
|
-
|
|
22476
|
+
let annotations = (0,stateManagement/* getAnnotations */.fy)(this.getToolName(), viewport.element);
|
|
21933
22477
|
if (!annotations?.length) {
|
|
21934
22478
|
return renderStatus;
|
|
21935
22479
|
}
|
|
21936
|
-
|
|
22480
|
+
annotations = (0,planar.filterAnnotationsWithinSamePlane)(annotations, viewport.getCamera());
|
|
21937
22481
|
const styleSpecifier = {
|
|
21938
22482
|
toolGroupId: this.toolGroupId,
|
|
21939
22483
|
toolName: this.getToolName(),
|
|
@@ -21942,22 +22486,37 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21942
22486
|
for (let i = 0; i < annotations.length; i++) {
|
|
21943
22487
|
const annotation = annotations[i];
|
|
21944
22488
|
const { annotationUID, data } = annotation;
|
|
21945
|
-
const {
|
|
22489
|
+
const { startCoordinate, endCoordinate } = data;
|
|
21946
22490
|
const { points, activeHandleIndex } = data.handles;
|
|
21947
22491
|
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
21948
22492
|
styleSpecifier.annotationUID = annotationUID;
|
|
21949
22493
|
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
21950
22494
|
const lineDash = this.getStyle('lineDash', styleSpecifier, annotation);
|
|
21951
22495
|
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
21952
|
-
|
|
21953
|
-
|
|
22496
|
+
const focalPoint = viewport.getCamera().focalPoint;
|
|
22497
|
+
const viewplaneNormal = viewport.getCamera().viewPlaneNormal;
|
|
22498
|
+
let startCoord = startCoordinate;
|
|
22499
|
+
let endCoord = endCoordinate;
|
|
22500
|
+
if (Array.isArray(startCoordinate)) {
|
|
22501
|
+
startCoord = this._getCoordinateForViewplaneNormal(startCoord, viewplaneNormal);
|
|
22502
|
+
}
|
|
22503
|
+
if (Array.isArray(endCoordinate)) {
|
|
22504
|
+
endCoord = this._getCoordinateForViewplaneNormal(endCoord, viewplaneNormal);
|
|
22505
|
+
}
|
|
22506
|
+
const roundedStartCoord = esm.utilities.roundToPrecision(startCoord);
|
|
22507
|
+
const roundedEndCoord = esm.utilities.roundToPrecision(endCoord);
|
|
22508
|
+
const coord = this._getCoordinateForViewplaneNormal(focalPoint, viewplaneNormal);
|
|
22509
|
+
const roundedCoord = esm.utilities.roundToPrecision(coord);
|
|
22510
|
+
if (roundedCoord < Math.min(roundedStartCoord, roundedEndCoord) ||
|
|
22511
|
+
roundedCoord > Math.max(roundedStartCoord, roundedEndCoord)) {
|
|
21954
22512
|
continue;
|
|
21955
22513
|
}
|
|
21956
22514
|
if (annotation.invalidated) {
|
|
21957
22515
|
this._throttledCalculateCachedStats(annotation, enabledElement);
|
|
21958
22516
|
}
|
|
21959
22517
|
let firstOrLastSlice = false;
|
|
21960
|
-
if (
|
|
22518
|
+
if (roundedCoord === roundedStartCoord ||
|
|
22519
|
+
roundedCoord === roundedEndCoord) {
|
|
21961
22520
|
firstOrLastSlice = true;
|
|
21962
22521
|
}
|
|
21963
22522
|
if (!viewport.getRenderingEngine()) {
|
|
@@ -21991,6 +22550,42 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
21991
22550
|
lineWidth,
|
|
21992
22551
|
});
|
|
21993
22552
|
renderStatus = true;
|
|
22553
|
+
if (this.configuration.showTextBox &&
|
|
22554
|
+
this.configuration.calculatePointsInsideVolume) {
|
|
22555
|
+
const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
22556
|
+
if (!options.visibility) {
|
|
22557
|
+
data.handles.textBox = {
|
|
22558
|
+
hasMoved: false,
|
|
22559
|
+
worldPosition: [0, 0, 0],
|
|
22560
|
+
worldBoundingBox: {
|
|
22561
|
+
topLeft: [0, 0, 0],
|
|
22562
|
+
topRight: [0, 0, 0],
|
|
22563
|
+
bottomLeft: [0, 0, 0],
|
|
22564
|
+
bottomRight: [0, 0, 0],
|
|
22565
|
+
},
|
|
22566
|
+
};
|
|
22567
|
+
continue;
|
|
22568
|
+
}
|
|
22569
|
+
const textLines = this.configuration.getTextLines(data);
|
|
22570
|
+
if (!textLines || textLines.length === 0) {
|
|
22571
|
+
continue;
|
|
22572
|
+
}
|
|
22573
|
+
if (!data.handles.textBox.hasMoved) {
|
|
22574
|
+
const canvasTextBoxCoords = (0,drawing.getTextBoxCoordsCanvas)(canvasCoordinates);
|
|
22575
|
+
data.handles.textBox.worldPosition =
|
|
22576
|
+
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
22577
|
+
}
|
|
22578
|
+
const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
|
|
22579
|
+
const textBoxUID = '1';
|
|
22580
|
+
const boundingBox = (0,drawingSvg.drawLinkedTextBox)(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, canvasCoordinates, {}, options);
|
|
22581
|
+
const { x: left, y: top, width, height } = boundingBox;
|
|
22582
|
+
data.handles.textBox.worldBoundingBox = {
|
|
22583
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
22584
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
22585
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
22586
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
22587
|
+
};
|
|
22588
|
+
}
|
|
21994
22589
|
}
|
|
21995
22590
|
return renderStatus;
|
|
21996
22591
|
};
|
|
@@ -22000,17 +22595,26 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
22000
22595
|
const { data, metadata } = annotation;
|
|
22001
22596
|
const { viewPlaneNormal, spacingInNormal } = metadata;
|
|
22002
22597
|
const { imageData } = imageVolume;
|
|
22003
|
-
const {
|
|
22598
|
+
const { startCoordinate, endCoordinate } = data;
|
|
22004
22599
|
const { points } = data.handles;
|
|
22005
22600
|
const startIJK = transformWorldToIndex(imageData, points[0]);
|
|
22006
|
-
|
|
22007
|
-
throw new Error('Start slice does not match');
|
|
22008
|
-
}
|
|
22009
|
-
const endIJK = gl_matrix_esm/* vec3.fromValues */.R3.fromValues(startIJK[0], startIJK[1], endSlice);
|
|
22601
|
+
const endIJK = transformWorldToIndex(imageData, points[0]);
|
|
22010
22602
|
const startWorld = gl_matrix_esm/* vec3.create */.R3.create();
|
|
22011
22603
|
imageData.indexToWorldVec3(startIJK, startWorld);
|
|
22012
22604
|
const endWorld = gl_matrix_esm/* vec3.create */.R3.create();
|
|
22013
22605
|
imageData.indexToWorldVec3(endIJK, endWorld);
|
|
22606
|
+
if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 2) {
|
|
22607
|
+
startWorld[2] = startCoordinate;
|
|
22608
|
+
endWorld[2] = endCoordinate;
|
|
22609
|
+
}
|
|
22610
|
+
else if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 0) {
|
|
22611
|
+
startWorld[0] = startCoordinate;
|
|
22612
|
+
endWorld[0] = endCoordinate;
|
|
22613
|
+
}
|
|
22614
|
+
else if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 1) {
|
|
22615
|
+
startWorld[1] = startCoordinate;
|
|
22616
|
+
endWorld[1] = endCoordinate;
|
|
22617
|
+
}
|
|
22014
22618
|
const distance = gl_matrix_esm/* vec3.distance */.R3.distance(startWorld, endWorld);
|
|
22015
22619
|
const newProjectionPoints = [];
|
|
22016
22620
|
for (let dist = 0; dist < distance; dist += spacingInNormal) {
|
|
@@ -22021,34 +22625,45 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
22021
22625
|
}));
|
|
22022
22626
|
}
|
|
22023
22627
|
data.cachedStats.projectionPoints = newProjectionPoints;
|
|
22024
|
-
const projectionPointsImageIds = [];
|
|
22025
|
-
for (const RectanglePoints of newProjectionPoints) {
|
|
22026
|
-
const imageId = esm.utilities.getClosestImageId(imageVolume, RectanglePoints[0], viewPlaneNormal);
|
|
22027
|
-
projectionPointsImageIds.push(imageId);
|
|
22028
|
-
}
|
|
22029
|
-
data.cachedStats.projectionPointsImageIds = projectionPointsImageIds;
|
|
22030
22628
|
}
|
|
22031
|
-
_computePointsInsideVolume(annotation, imageVolume, enabledElement) {
|
|
22032
|
-
const { data } = annotation;
|
|
22629
|
+
_computePointsInsideVolume(annotation, targetId, imageVolume, enabledElement) {
|
|
22630
|
+
const { data, metadata } = annotation;
|
|
22631
|
+
const { viewPlaneNormal, viewUp } = metadata;
|
|
22632
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
22033
22633
|
const projectionPoints = data.cachedStats.projectionPoints;
|
|
22034
22634
|
const pointsInsideVolume = [[]];
|
|
22635
|
+
const image = this.getTargetIdImage(targetId, renderingEngine);
|
|
22636
|
+
const worldPos1 = data.handles.points[0];
|
|
22637
|
+
const worldPos2 = data.handles.points[3];
|
|
22638
|
+
const { worldWidth, worldHeight } = (0,getWorldWidthAndHeightFromCorners/* default */.Z)(viewPlaneNormal, viewUp, worldPos1, worldPos2);
|
|
22639
|
+
const measureInfo = (0,getCalibratedUnits/* getCalibratedLengthUnitsAndScale */.mh)(image, data.habdles);
|
|
22640
|
+
const area = Math.abs(worldWidth * worldHeight) /
|
|
22641
|
+
(measureInfo.scale * measureInfo.scale);
|
|
22642
|
+
const modalityUnitOptions = {
|
|
22643
|
+
isPreScaled: (0,isViewportPreScaled/* isViewportPreScaled */.P)(viewport, targetId),
|
|
22644
|
+
isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
|
|
22645
|
+
};
|
|
22646
|
+
const modalityUnit = (0,getModalityUnit/* getModalityUnit */.F)(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
|
|
22035
22647
|
for (let i = 0; i < projectionPoints.length; i++) {
|
|
22036
22648
|
if (!imageVolume) {
|
|
22037
22649
|
continue;
|
|
22038
22650
|
}
|
|
22039
22651
|
const projectionPoint = projectionPoints[i][0];
|
|
22040
|
-
const worldPos1 = data.handles.points[0];
|
|
22041
|
-
const worldPos2 = data.handles.points[3];
|
|
22042
22652
|
const { dimensions, imageData } = imageVolume;
|
|
22043
22653
|
const worldPos1Index = transformWorldToIndex(imageData, worldPos1);
|
|
22044
22654
|
const worldProjectionPointIndex = transformWorldToIndex(imageData, projectionPoint);
|
|
22655
|
+
const indexOfProjection = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
22045
22656
|
worldPos1Index[0] = Math.floor(worldPos1Index[0]);
|
|
22046
22657
|
worldPos1Index[1] = Math.floor(worldPos1Index[1]);
|
|
22047
|
-
worldPos1Index[2] = Math.floor(
|
|
22658
|
+
worldPos1Index[2] = Math.floor(worldPos1Index[2]);
|
|
22659
|
+
worldPos1Index[indexOfProjection] =
|
|
22660
|
+
worldProjectionPointIndex[indexOfProjection];
|
|
22048
22661
|
const worldPos2Index = transformWorldToIndex(imageData, worldPos2);
|
|
22049
22662
|
worldPos2Index[0] = Math.floor(worldPos2Index[0]);
|
|
22050
22663
|
worldPos2Index[1] = Math.floor(worldPos2Index[1]);
|
|
22051
|
-
worldPos2Index[2] = Math.floor(
|
|
22664
|
+
worldPos2Index[2] = Math.floor(worldPos2Index[2]);
|
|
22665
|
+
worldPos2Index[indexOfProjection] =
|
|
22666
|
+
worldProjectionPointIndex[indexOfProjection];
|
|
22052
22667
|
if (this._isInsideVolume(worldPos1Index, worldPos2Index, dimensions)) {
|
|
22053
22668
|
this.isHandleOutsideImage = false;
|
|
22054
22669
|
const iMin = Math.min(worldPos1Index[0], worldPos2Index[0]);
|
|
@@ -22062,11 +22677,22 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
22062
22677
|
[jMin, jMax],
|
|
22063
22678
|
[kMin, kMax],
|
|
22064
22679
|
];
|
|
22065
|
-
const pointsInShape = (0,utilities.pointInShapeCallback)(imageData, () => true,
|
|
22680
|
+
const pointsInShape = (0,utilities.pointInShapeCallback)(imageData, () => true, this.configuration.statsCalculator.statsCallback, boundsIJK);
|
|
22066
22681
|
pointsInsideVolume.push(pointsInShape);
|
|
22067
22682
|
}
|
|
22068
22683
|
}
|
|
22684
|
+
const stats = this.configuration.statsCalculator.getStatistics();
|
|
22069
22685
|
data.cachedStats.pointsInVolume = pointsInsideVolume;
|
|
22686
|
+
data.cachedStats.statistics = {
|
|
22687
|
+
Modality: metadata.Modality,
|
|
22688
|
+
area,
|
|
22689
|
+
mean: stats.mean?.value,
|
|
22690
|
+
stdDev: stats.stdDev?.value,
|
|
22691
|
+
max: stats.max?.value,
|
|
22692
|
+
statsArray: stats.array,
|
|
22693
|
+
areaUnit: measureInfo.areaUnits,
|
|
22694
|
+
modalityUnit,
|
|
22695
|
+
};
|
|
22070
22696
|
}
|
|
22071
22697
|
_calculateCachedStatsTool(annotation, enabledElement) {
|
|
22072
22698
|
const data = annotation.data;
|
|
@@ -22079,25 +22705,44 @@ class RectangleROIStartEndThresholdTool extends RectangleROITool/* default */.Z
|
|
|
22079
22705
|
(0,state/* triggerAnnotationModified */.hg)(annotation, viewport.element);
|
|
22080
22706
|
return cachedStats;
|
|
22081
22707
|
}
|
|
22082
|
-
|
|
22708
|
+
_getStartCoordinate(worldPos, viewPlaneNormal) {
|
|
22709
|
+
const startPos = worldPos;
|
|
22710
|
+
const startCoord = this._getCoordinateForViewplaneNormal(startPos, viewPlaneNormal);
|
|
22711
|
+
return startCoord;
|
|
22712
|
+
}
|
|
22713
|
+
_getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal) {
|
|
22083
22714
|
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
22084
22715
|
const endPos = gl_matrix_esm/* vec3.create */.R3.create();
|
|
22085
22716
|
gl_matrix_esm/* vec3.scaleAndAdd */.R3.scaleAndAdd(endPos, worldPos, viewPlaneNormal, numSlicesToPropagate * spacingInNormal);
|
|
22086
|
-
const
|
|
22087
|
-
|
|
22088
|
-
|
|
22089
|
-
|
|
22090
|
-
|
|
22091
|
-
|
|
22092
|
-
|
|
22093
|
-
|
|
22094
|
-
|
|
22095
|
-
|
|
22096
|
-
|
|
22097
|
-
|
|
22098
|
-
|
|
22099
|
-
|
|
22717
|
+
const endCoord = this._getCoordinateForViewplaneNormal(endPos, viewPlaneNormal);
|
|
22718
|
+
return endCoord;
|
|
22719
|
+
}
|
|
22720
|
+
_getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) {
|
|
22721
|
+
const viewplaneNormalAbs = [
|
|
22722
|
+
Math.abs(viewPlaneNormal[0]),
|
|
22723
|
+
Math.abs(viewPlaneNormal[1]),
|
|
22724
|
+
Math.abs(viewPlaneNormal[2]),
|
|
22725
|
+
];
|
|
22726
|
+
const indexOfDirection = viewplaneNormalAbs.indexOf(Math.max(...viewplaneNormalAbs));
|
|
22727
|
+
return indexOfDirection;
|
|
22728
|
+
}
|
|
22729
|
+
_getCoordinateForViewplaneNormal(pos, viewPlaneNormal) {
|
|
22730
|
+
const indexOfDirection = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
22731
|
+
return pos[indexOfDirection];
|
|
22732
|
+
}
|
|
22733
|
+
}
|
|
22734
|
+
function defaultGetTextLines(data) {
|
|
22735
|
+
const cachedVolumeStats = data.cachedStats.statistics;
|
|
22736
|
+
const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
|
|
22737
|
+
if (mean === undefined) {
|
|
22738
|
+
return;
|
|
22100
22739
|
}
|
|
22740
|
+
const textLines = [];
|
|
22741
|
+
textLines.push(`Area: ${(0,utilities.roundNumber)(area)} ${areaUnit}`);
|
|
22742
|
+
textLines.push(`Mean: ${(0,utilities.roundNumber)(mean)} ${modalityUnit}`);
|
|
22743
|
+
textLines.push(`Max: ${(0,utilities.roundNumber)(max)} ${modalityUnit}`);
|
|
22744
|
+
textLines.push(`Std Dev: ${(0,utilities.roundNumber)(stdDev)} ${modalityUnit}`);
|
|
22745
|
+
return textLines;
|
|
22101
22746
|
}
|
|
22102
22747
|
RectangleROIStartEndThresholdTool.toolName = 'RectangleROIStartEndThreshold';
|
|
22103
22748
|
/* harmony default export */ const segmentation_RectangleROIStartEndThresholdTool = (RectangleROIStartEndThresholdTool);
|
|
@@ -22165,6 +22810,7 @@ var SegmentSelectTool = __webpack_require__(45986);
|
|
|
22165
22810
|
|
|
22166
22811
|
|
|
22167
22812
|
|
|
22813
|
+
|
|
22168
22814
|
|
|
22169
22815
|
|
|
22170
22816
|
/***/ }),
|
|
@@ -22175,7 +22821,7 @@ var SegmentSelectTool = __webpack_require__(45986);
|
|
|
22175
22821
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22176
22822
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
22177
22823
|
/* harmony export */ });
|
|
22178
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
22824
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
22179
22825
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
22180
22826
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(93382);
|
|
22181
22827
|
/* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92596);
|
|
@@ -22183,7 +22829,7 @@ var SegmentSelectTool = __webpack_require__(45986);
|
|
|
22183
22829
|
/* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(62309);
|
|
22184
22830
|
/* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(62455);
|
|
22185
22831
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(68096);
|
|
22186
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(
|
|
22832
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25876);
|
|
22187
22833
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23118);
|
|
22188
22834
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(66878);
|
|
22189
22835
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(95482);
|
|
@@ -22652,22 +23298,37 @@ BrushTool.toolName = 'Brush';
|
|
|
22652
23298
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22653
23299
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
22654
23300
|
/* harmony export */ });
|
|
22655
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
23301
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
22656
23302
|
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72076);
|
|
22657
|
-
/* harmony import */ var
|
|
22658
|
-
/* harmony import */ var
|
|
22659
|
-
/* harmony import */ var
|
|
22660
|
-
/* harmony import */ var
|
|
22661
|
-
/* harmony import */ var
|
|
22662
|
-
/* harmony import */ var
|
|
22663
|
-
/* harmony import */ var
|
|
22664
|
-
/* harmony import */ var
|
|
22665
|
-
/* harmony import */ var
|
|
22666
|
-
/* harmony import */ var
|
|
22667
|
-
/* harmony import */ var
|
|
22668
|
-
/* harmony import */ var
|
|
22669
|
-
/* harmony import */ var
|
|
22670
|
-
/* harmony import */ var
|
|
23303
|
+
/* harmony import */ var _stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(86614);
|
|
23304
|
+
/* harmony import */ var _stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11163);
|
|
23305
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(25876);
|
|
23306
|
+
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(46966);
|
|
23307
|
+
/* harmony import */ var _utilities_planar_getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(21259);
|
|
23308
|
+
/* harmony import */ var _utilities_drawing__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(20724);
|
|
23309
|
+
/* harmony import */ var _utilities_throttle__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(90685);
|
|
23310
|
+
/* harmony import */ var _stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(41836);
|
|
23311
|
+
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(23118);
|
|
23312
|
+
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(66878);
|
|
23313
|
+
/* harmony import */ var _stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(36705);
|
|
23314
|
+
/* harmony import */ var _annotation_CircleROITool__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(87248);
|
|
23315
|
+
/* harmony import */ var _utilities_math_circle__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(57776);
|
|
23316
|
+
/* harmony import */ var _utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(39661);
|
|
23317
|
+
/* harmony import */ var _utilities_getModalityUnit__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(15607);
|
|
23318
|
+
/* harmony import */ var _utilities_viewport_isViewportPreScaled__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(20752);
|
|
23319
|
+
/* harmony import */ var _utilities_math_ellipse__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(92600);
|
|
23320
|
+
/* harmony import */ var _utilities__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(42975);
|
|
23321
|
+
/* harmony import */ var _utilities_math_basic__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(51053);
|
|
23322
|
+
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(11677);
|
|
23323
|
+
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_21__);
|
|
23324
|
+
/* harmony import */ var _utilities_planar__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(44037);
|
|
23325
|
+
|
|
23326
|
+
|
|
23327
|
+
|
|
23328
|
+
|
|
23329
|
+
|
|
23330
|
+
|
|
23331
|
+
|
|
22671
23332
|
|
|
22672
23333
|
|
|
22673
23334
|
|
|
@@ -22685,12 +23346,15 @@ BrushTool.toolName = 'Brush';
|
|
|
22685
23346
|
|
|
22686
23347
|
|
|
22687
23348
|
const { transformWorldToIndex } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
22688
|
-
class CircleROIStartEndThresholdTool extends
|
|
23349
|
+
class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_IMPORTED_MODULE_13__/* ["default"] */ .Z {
|
|
22689
23350
|
constructor(toolProps = {}, defaultToolProps = {
|
|
22690
23351
|
supportedInteractionTypes: ['Mouse', 'Touch'],
|
|
22691
23352
|
configuration: {
|
|
22692
23353
|
numSlicesToPropagate: 10,
|
|
22693
23354
|
calculatePointsInsideVolume: false,
|
|
23355
|
+
getTextLines: defaultGetTextLines,
|
|
23356
|
+
statsCalculator: _utilities_math_basic__WEBPACK_IMPORTED_MODULE_20__.BasicStatsCalculator,
|
|
23357
|
+
showTextBox: false,
|
|
22694
23358
|
},
|
|
22695
23359
|
}) {
|
|
22696
23360
|
super(toolProps, defaultToolProps);
|
|
@@ -22715,8 +23379,8 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22715
23379
|
referencedImageId = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getClosestImageId(imageVolume, worldPos, viewPlaneNormal);
|
|
22716
23380
|
}
|
|
22717
23381
|
const spacingInNormal = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.getSpacingInNormalDirection(imageVolume, viewPlaneNormal);
|
|
22718
|
-
const
|
|
22719
|
-
const
|
|
23382
|
+
const startCoord = this._getStartCoordinate(worldPos, spacingInNormal, viewPlaneNormal);
|
|
23383
|
+
const endCoord = this._getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal);
|
|
22720
23384
|
const FrameOfReferenceUID = viewport.getFrameOfReferenceUID();
|
|
22721
23385
|
const annotation = {
|
|
22722
23386
|
highlighted: true,
|
|
@@ -22733,13 +23397,18 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22733
23397
|
},
|
|
22734
23398
|
data: {
|
|
22735
23399
|
label: '',
|
|
22736
|
-
|
|
22737
|
-
|
|
23400
|
+
startCoordinate: startCoord,
|
|
23401
|
+
endCoordinate: endCoord,
|
|
22738
23402
|
handles: {
|
|
22739
23403
|
textBox: {
|
|
22740
23404
|
hasMoved: false,
|
|
22741
|
-
worldPosition:
|
|
22742
|
-
worldBoundingBox:
|
|
23405
|
+
worldPosition: [0, 0, 0],
|
|
23406
|
+
worldBoundingBox: {
|
|
23407
|
+
topLeft: [0, 0, 0],
|
|
23408
|
+
topRight: [0, 0, 0],
|
|
23409
|
+
bottomLeft: [0, 0, 0],
|
|
23410
|
+
bottomRight: [0, 0, 0],
|
|
23411
|
+
},
|
|
22743
23412
|
},
|
|
22744
23413
|
points: [[...worldPos], [...worldPos]],
|
|
22745
23414
|
activeHandleIndex: null,
|
|
@@ -22747,12 +23416,14 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22747
23416
|
cachedStats: {
|
|
22748
23417
|
pointsInVolume: [],
|
|
22749
23418
|
projectionPoints: [],
|
|
23419
|
+
statistics: [],
|
|
22750
23420
|
},
|
|
22751
23421
|
labelmapUID: null,
|
|
22752
23422
|
},
|
|
22753
23423
|
};
|
|
22754
|
-
|
|
22755
|
-
|
|
23424
|
+
this._computeProjectionPoints(annotation, imageVolume);
|
|
23425
|
+
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.addAnnotation)(annotation, element);
|
|
23426
|
+
const viewportIdsToRender = (0,_utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_5__.getViewportIdsWithToolToRender)(element, this.getToolName());
|
|
22756
23427
|
this.editData = {
|
|
22757
23428
|
annotation,
|
|
22758
23429
|
viewportIdsToRender,
|
|
@@ -22760,9 +23431,9 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22760
23431
|
hasMoved: false,
|
|
22761
23432
|
};
|
|
22762
23433
|
this._activateDraw(element);
|
|
22763
|
-
(0,
|
|
23434
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_10__.hideElementCursor)(element);
|
|
22764
23435
|
evt.preventDefault();
|
|
22765
|
-
(0,
|
|
23436
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(renderingEngine, viewportIdsToRender);
|
|
22766
23437
|
return annotation;
|
|
22767
23438
|
};
|
|
22768
23439
|
this._endCallback = (evt) => {
|
|
@@ -22777,32 +23448,32 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22777
23448
|
data.handles.activeHandleIndex = null;
|
|
22778
23449
|
this._deactivateModify(element);
|
|
22779
23450
|
this._deactivateDraw(element);
|
|
22780
|
-
(0,
|
|
23451
|
+
(0,_cursors_elementCursor__WEBPACK_IMPORTED_MODULE_10__.resetElementCursor)(element);
|
|
22781
23452
|
const enabledElement = (0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.getEnabledElement)(element);
|
|
22782
23453
|
this.editData = null;
|
|
22783
23454
|
this.isDrawing = false;
|
|
22784
23455
|
if (this.isHandleOutsideImage &&
|
|
22785
23456
|
this.configuration.preventHandleOutsideImage) {
|
|
22786
|
-
(0,
|
|
23457
|
+
(0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.removeAnnotation)(annotation.annotationUID);
|
|
22787
23458
|
}
|
|
22788
23459
|
const targetId = this.getTargetId(enabledElement.viewport);
|
|
22789
23460
|
const imageVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
|
|
22790
23461
|
if (this.configuration.calculatePointsInsideVolume) {
|
|
22791
|
-
this._computePointsInsideVolume(annotation, imageVolume, enabledElement);
|
|
23462
|
+
this._computePointsInsideVolume(annotation, imageVolume, targetId, enabledElement);
|
|
22792
23463
|
}
|
|
22793
|
-
(0,
|
|
23464
|
+
(0,_utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_11__/* ["default"] */ .Z)(enabledElement.renderingEngine, viewportIdsToRender);
|
|
22794
23465
|
if (newAnnotation) {
|
|
22795
|
-
(0,
|
|
23466
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_12__/* .triggerAnnotationCompleted */ .F$)(annotation);
|
|
22796
23467
|
}
|
|
22797
23468
|
};
|
|
22798
23469
|
this.renderAnnotation = (enabledElement, svgDrawingHelper) => {
|
|
22799
23470
|
let renderStatus = false;
|
|
22800
23471
|
const { viewport } = enabledElement;
|
|
22801
|
-
|
|
23472
|
+
let annotations = (0,_stateManagement_annotation_annotationState__WEBPACK_IMPORTED_MODULE_2__.getAnnotations)(this.getToolName(), viewport.element);
|
|
22802
23473
|
if (!annotations?.length) {
|
|
22803
23474
|
return renderStatus;
|
|
22804
23475
|
}
|
|
22805
|
-
|
|
23476
|
+
annotations = (0,_utilities_planar__WEBPACK_IMPORTED_MODULE_22__.filterAnnotationsWithinSamePlane)(annotations, viewport.getCamera());
|
|
22806
23477
|
const styleSpecifier = {
|
|
22807
23478
|
toolGroupId: this.toolGroupId,
|
|
22808
23479
|
toolName: this.getToolName(),
|
|
@@ -22811,7 +23482,7 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22811
23482
|
for (let i = 0; i < annotations.length; i++) {
|
|
22812
23483
|
const annotation = annotations[i];
|
|
22813
23484
|
const { annotationUID, data } = annotation;
|
|
22814
|
-
const {
|
|
23485
|
+
const { startCoordinate, endCoordinate } = data;
|
|
22815
23486
|
const { points, activeHandleIndex } = data.handles;
|
|
22816
23487
|
styleSpecifier.annotationUID = annotationUID;
|
|
22817
23488
|
const lineWidth = this.getStyle('lineWidth', styleSpecifier, annotation);
|
|
@@ -22819,18 +23490,33 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22819
23490
|
const color = this.getStyle('color', styleSpecifier, annotation);
|
|
22820
23491
|
const canvasCoordinates = points.map((p) => viewport.worldToCanvas(p));
|
|
22821
23492
|
const center = canvasCoordinates[0];
|
|
22822
|
-
const radius = (0,
|
|
23493
|
+
const radius = (0,_utilities_math_circle__WEBPACK_IMPORTED_MODULE_14__/* .getCanvasCircleRadius */ .t)(canvasCoordinates);
|
|
22823
23494
|
const { centerPointRadius } = this.configuration;
|
|
22824
|
-
|
|
22825
|
-
|
|
23495
|
+
const canvasCorners = (0,_utilities_math_circle__WEBPACK_IMPORTED_MODULE_14__/* .getCanvasCircleCorners */ .$)(canvasCoordinates);
|
|
23496
|
+
const focalPoint = viewport.getCamera().focalPoint;
|
|
23497
|
+
const viewplaneNormal = viewport.getCamera().viewPlaneNormal;
|
|
23498
|
+
let startCoord = startCoordinate;
|
|
23499
|
+
let endCoord = endCoordinate;
|
|
23500
|
+
if (Array.isArray(startCoordinate)) {
|
|
23501
|
+
startCoord = this._getCoordinateForViewplaneNormal(startCoord, viewplaneNormal);
|
|
23502
|
+
}
|
|
23503
|
+
if (Array.isArray(endCoordinate)) {
|
|
23504
|
+
endCoord = this._getCoordinateForViewplaneNormal(endCoord, viewplaneNormal);
|
|
23505
|
+
}
|
|
23506
|
+
const roundedStartCoord = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.roundToPrecision(startCoord);
|
|
23507
|
+
const roundedEndCoord = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.roundToPrecision(endCoord);
|
|
23508
|
+
const coord = this._getCoordinateForViewplaneNormal(focalPoint, viewplaneNormal);
|
|
23509
|
+
const roundedCoord = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.roundToPrecision(coord);
|
|
23510
|
+
if (roundedCoord < Math.min(roundedStartCoord, roundedEndCoord) ||
|
|
23511
|
+
roundedCoord > Math.max(roundedStartCoord, roundedEndCoord)) {
|
|
22826
23512
|
continue;
|
|
22827
23513
|
}
|
|
22828
23514
|
if (annotation.invalidated) {
|
|
22829
23515
|
this._throttledCalculateCachedStats(annotation, enabledElement);
|
|
22830
23516
|
}
|
|
22831
|
-
const
|
|
23517
|
+
const middleCoord = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.roundToPrecision((startCoord + endCoord) / 2);
|
|
22832
23518
|
let isMiddleSlice = false;
|
|
22833
|
-
if (
|
|
23519
|
+
if (roundedCoord === middleCoord) {
|
|
22834
23520
|
isMiddleSlice = true;
|
|
22835
23521
|
}
|
|
22836
23522
|
if (!viewport.getRenderingEngine()) {
|
|
@@ -22838,10 +23524,10 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22838
23524
|
return renderStatus;
|
|
22839
23525
|
}
|
|
22840
23526
|
let activeHandleCanvasCoords;
|
|
22841
|
-
if (!(0,
|
|
23527
|
+
if (!(0,_stateManagement_annotation_annotationVisibility__WEBPACK_IMPORTED_MODULE_9__.isAnnotationVisible)(annotationUID)) {
|
|
22842
23528
|
continue;
|
|
22843
23529
|
}
|
|
22844
|
-
if (!(0,
|
|
23530
|
+
if (!(0,_stateManagement_annotation_annotationLocking__WEBPACK_IMPORTED_MODULE_3__.isAnnotationLocked)(annotation) &&
|
|
22845
23531
|
!this.editData &&
|
|
22846
23532
|
activeHandleIndex !== null &&
|
|
22847
23533
|
isMiddleSlice) {
|
|
@@ -22849,23 +23535,28 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22849
23535
|
}
|
|
22850
23536
|
if (activeHandleCanvasCoords) {
|
|
22851
23537
|
const handleGroupUID = '0';
|
|
22852
|
-
(0,
|
|
23538
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawHandles)(svgDrawingHelper, annotationUID, handleGroupUID, activeHandleCanvasCoords, {
|
|
22853
23539
|
color,
|
|
22854
23540
|
});
|
|
22855
23541
|
}
|
|
22856
23542
|
let lineWidthToUse = lineWidth;
|
|
23543
|
+
let lineDashToUse = lineDash;
|
|
22857
23544
|
if (isMiddleSlice) {
|
|
22858
|
-
lineWidthToUse =
|
|
23545
|
+
lineWidthToUse = lineWidth;
|
|
23546
|
+
lineDashToUse = [];
|
|
23547
|
+
}
|
|
23548
|
+
else {
|
|
23549
|
+
lineDashToUse = [5, 5];
|
|
22859
23550
|
}
|
|
22860
23551
|
const circleUID = '0';
|
|
22861
|
-
(0,
|
|
23552
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawCircle)(svgDrawingHelper, annotationUID, circleUID, center, radius, {
|
|
22862
23553
|
color,
|
|
22863
|
-
lineDash,
|
|
23554
|
+
lineDash: lineDashToUse,
|
|
22864
23555
|
lineWidth: lineWidthToUse,
|
|
22865
23556
|
});
|
|
22866
23557
|
if (centerPointRadius > 0) {
|
|
22867
23558
|
if (radius > 3 * centerPointRadius) {
|
|
22868
|
-
(0,
|
|
23559
|
+
(0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawCircle)(svgDrawingHelper, annotationUID, `${circleUID}-center`, center, centerPointRadius, {
|
|
22869
23560
|
color,
|
|
22870
23561
|
lineDash,
|
|
22871
23562
|
lineWidth,
|
|
@@ -22873,31 +23564,83 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22873
23564
|
}
|
|
22874
23565
|
}
|
|
22875
23566
|
renderStatus = true;
|
|
23567
|
+
if (this.configuration.showTextBox == true &&
|
|
23568
|
+
this.configuration.calculatePointsInsideVolume == true) {
|
|
23569
|
+
const options = this.getLinkedTextBoxStyle(styleSpecifier, annotation);
|
|
23570
|
+
if (!options.visibility) {
|
|
23571
|
+
data.handles.textBox = {
|
|
23572
|
+
hasMoved: false,
|
|
23573
|
+
worldPosition: [0, 0, 0],
|
|
23574
|
+
worldBoundingBox: {
|
|
23575
|
+
topLeft: [0, 0, 0],
|
|
23576
|
+
topRight: [0, 0, 0],
|
|
23577
|
+
bottomLeft: [0, 0, 0],
|
|
23578
|
+
bottomRight: [0, 0, 0],
|
|
23579
|
+
},
|
|
23580
|
+
};
|
|
23581
|
+
continue;
|
|
23582
|
+
}
|
|
23583
|
+
const textLines = this.configuration.getTextLines(data);
|
|
23584
|
+
if (!textLines || textLines.length === 0) {
|
|
23585
|
+
continue;
|
|
23586
|
+
}
|
|
23587
|
+
let canvasTextBoxCoords;
|
|
23588
|
+
if (!data.handles.textBox.hasMoved) {
|
|
23589
|
+
canvasTextBoxCoords = (0,_utilities_drawing__WEBPACK_IMPORTED_MODULE_7__.getTextBoxCoordsCanvas)(canvasCorners);
|
|
23590
|
+
data.handles.textBox.worldPosition =
|
|
23591
|
+
viewport.canvasToWorld(canvasTextBoxCoords);
|
|
23592
|
+
}
|
|
23593
|
+
const textBoxPosition = viewport.worldToCanvas(data.handles.textBox.worldPosition);
|
|
23594
|
+
const textBoxUID = '1';
|
|
23595
|
+
const boundingBox = (0,_drawingSvg__WEBPACK_IMPORTED_MODULE_4__.drawLinkedTextBox)(svgDrawingHelper, annotationUID, textBoxUID, textLines, textBoxPosition, canvasCoordinates, {}, options);
|
|
23596
|
+
const { x: left, y: top, width, height } = boundingBox;
|
|
23597
|
+
data.handles.textBox.worldBoundingBox = {
|
|
23598
|
+
topLeft: viewport.canvasToWorld([left, top]),
|
|
23599
|
+
topRight: viewport.canvasToWorld([left + width, top]),
|
|
23600
|
+
bottomLeft: viewport.canvasToWorld([left, top + height]),
|
|
23601
|
+
bottomRight: viewport.canvasToWorld([left + width, top + height]),
|
|
23602
|
+
};
|
|
23603
|
+
}
|
|
22876
23604
|
}
|
|
22877
23605
|
return renderStatus;
|
|
22878
23606
|
};
|
|
22879
|
-
this._throttledCalculateCachedStats = (0,
|
|
23607
|
+
this._throttledCalculateCachedStats = (0,_utilities_throttle__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Z)(this._calculateCachedStatsTool, 100, { trailing: true });
|
|
22880
23608
|
}
|
|
22881
23609
|
_computeProjectionPoints(annotation, imageVolume) {
|
|
22882
23610
|
const { data, metadata } = annotation;
|
|
22883
23611
|
const { viewPlaneNormal, spacingInNormal } = metadata;
|
|
22884
23612
|
const { imageData } = imageVolume;
|
|
22885
|
-
const {
|
|
23613
|
+
const { startCoordinate, endCoordinate } = data;
|
|
22886
23614
|
const { points } = data.handles;
|
|
22887
23615
|
const startIJK = transformWorldToIndex(imageData, points[0]);
|
|
22888
|
-
|
|
22889
|
-
|
|
22890
|
-
throw new Error('Start slice does not match');
|
|
22891
|
-
}
|
|
22892
|
-
const endIJK = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.fromValues */ .R3.fromValues(startIJK[0], startIJK[1], endSlice);
|
|
23616
|
+
const endIJK = transformWorldToIndex(imageData, points[0]);
|
|
23617
|
+
const handlesToStart = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_21___default()(points);
|
|
22893
23618
|
const startWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
22894
23619
|
imageData.indexToWorldVec3(startIJK, startWorld);
|
|
22895
23620
|
const endWorld = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
22896
23621
|
imageData.indexToWorldVec3(endIJK, endWorld);
|
|
23622
|
+
if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 2) {
|
|
23623
|
+
startWorld[2] = startCoordinate;
|
|
23624
|
+
endWorld[2] = endCoordinate;
|
|
23625
|
+
handlesToStart[0][2] = startCoordinate;
|
|
23626
|
+
handlesToStart[1][2] = startCoordinate;
|
|
23627
|
+
}
|
|
23628
|
+
else if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 0) {
|
|
23629
|
+
startWorld[0] = startCoordinate;
|
|
23630
|
+
endWorld[0] = endCoordinate;
|
|
23631
|
+
handlesToStart[0][0] = startCoordinate;
|
|
23632
|
+
handlesToStart[1][0] = startCoordinate;
|
|
23633
|
+
}
|
|
23634
|
+
else if (this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) == 1) {
|
|
23635
|
+
startWorld[1] = startCoordinate;
|
|
23636
|
+
endWorld[1] = endCoordinate;
|
|
23637
|
+
handlesToStart[0][1] = startCoordinate;
|
|
23638
|
+
handlesToStart[1][1] = startCoordinate;
|
|
23639
|
+
}
|
|
22897
23640
|
const distance = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.distance */ .R3.distance(startWorld, endWorld);
|
|
22898
23641
|
const newProjectionPoints = [];
|
|
22899
23642
|
for (let dist = 0; dist < distance; dist += spacingInNormal) {
|
|
22900
|
-
newProjectionPoints.push(
|
|
23643
|
+
newProjectionPoints.push(handlesToStart.map((point) => {
|
|
22901
23644
|
const newPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
22902
23645
|
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(newPoint, point, viewPlaneNormal, dist);
|
|
22903
23646
|
return Array.from(newPoint);
|
|
@@ -22905,32 +23648,54 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22905
23648
|
}
|
|
22906
23649
|
data.cachedStats.projectionPoints = newProjectionPoints;
|
|
22907
23650
|
}
|
|
22908
|
-
_computePointsInsideVolume(annotation, imageVolume, enabledElement) {
|
|
22909
|
-
const { data } = annotation;
|
|
22910
|
-
const {
|
|
23651
|
+
_computePointsInsideVolume(annotation, imageVolume, targetId, enabledElement) {
|
|
23652
|
+
const { data, metadata } = annotation;
|
|
23653
|
+
const { viewPlaneNormal, viewUp } = metadata;
|
|
23654
|
+
const { viewport, renderingEngine } = enabledElement;
|
|
22911
23655
|
const projectionPoints = data.cachedStats.projectionPoints;
|
|
22912
23656
|
const pointsInsideVolume = [[]];
|
|
23657
|
+
const image = this.getTargetIdImage(targetId, renderingEngine);
|
|
23658
|
+
const canvasCoordinates = data.handles.points.map((p) => viewport.worldToCanvas(p));
|
|
23659
|
+
const [topLeftCanvas, bottomRightCanvas] = ((0,_utilities_math_circle__WEBPACK_IMPORTED_MODULE_14__/* .getCanvasCircleCorners */ .$)(canvasCoordinates));
|
|
23660
|
+
const pos1 = viewport.canvasToWorld(topLeftCanvas);
|
|
23661
|
+
const pos2 = viewport.canvasToWorld(bottomRightCanvas);
|
|
23662
|
+
const { worldWidth, worldHeight } = (0,_utilities_planar_getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .Z)(viewPlaneNormal, viewUp, pos1, pos2);
|
|
23663
|
+
const measureInfo = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_15__/* .getCalibratedLengthUnitsAndScale */ .mh)(image, data.handles);
|
|
23664
|
+
const aspect = (0,_utilities_getCalibratedUnits__WEBPACK_IMPORTED_MODULE_15__/* .getCalibratedAspect */ .G6)(image);
|
|
23665
|
+
const area = Math.abs(Math.PI *
|
|
23666
|
+
(worldWidth / measureInfo.scale / 2) *
|
|
23667
|
+
(worldHeight / aspect / measureInfo.scale / 2));
|
|
23668
|
+
const modalityUnitOptions = {
|
|
23669
|
+
isPreScaled: (0,_utilities_viewport_isViewportPreScaled__WEBPACK_IMPORTED_MODULE_17__/* .isViewportPreScaled */ .P)(viewport, targetId),
|
|
23670
|
+
isSuvScaled: this.isSuvScaled(viewport, targetId, annotation.metadata.referencedImageId),
|
|
23671
|
+
};
|
|
23672
|
+
const modalityUnit = (0,_utilities_getModalityUnit__WEBPACK_IMPORTED_MODULE_16__/* .getModalityUnit */ .F)(metadata.Modality, annotation.metadata.referencedImageId, modalityUnitOptions);
|
|
22913
23673
|
for (let i = 0; i < projectionPoints.length; i++) {
|
|
22914
23674
|
if (!imageVolume) {
|
|
22915
23675
|
continue;
|
|
22916
23676
|
}
|
|
22917
23677
|
const centerWorld = projectionPoints[i][0];
|
|
22918
23678
|
const canvasCoordinates = projectionPoints[i].map((p) => viewport.worldToCanvas(p));
|
|
22919
|
-
const [topLeftCanvas, bottomRightCanvas] = ((0,
|
|
23679
|
+
const [topLeftCanvas, bottomRightCanvas] = ((0,_utilities_math_circle__WEBPACK_IMPORTED_MODULE_14__/* .getCanvasCircleCorners */ .$)(canvasCoordinates));
|
|
22920
23680
|
const topLeftWorld = viewport.canvasToWorld(topLeftCanvas);
|
|
22921
23681
|
const bottomRightWorld = viewport.canvasToWorld(bottomRightCanvas);
|
|
22922
23682
|
const worldPos1 = topLeftWorld;
|
|
22923
23683
|
const worldPos2 = bottomRightWorld;
|
|
22924
23684
|
const { dimensions, imageData } = imageVolume;
|
|
22925
23685
|
const worldPos1Index = transformWorldToIndex(imageData, worldPos1);
|
|
22926
|
-
const
|
|
23686
|
+
const worldProjectionPointIndex = transformWorldToIndex(imageData, centerWorld);
|
|
23687
|
+
const indexOfProjection = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
22927
23688
|
worldPos1Index[0] = Math.floor(worldPos1Index[0]);
|
|
22928
23689
|
worldPos1Index[1] = Math.floor(worldPos1Index[1]);
|
|
22929
|
-
worldPos1Index[2] = Math.floor(
|
|
23690
|
+
worldPos1Index[2] = Math.floor(worldPos1Index[2]);
|
|
23691
|
+
worldPos1Index[indexOfProjection] =
|
|
23692
|
+
worldProjectionPointIndex[indexOfProjection];
|
|
22930
23693
|
const worldPos2Index = transformWorldToIndex(imageData, worldPos2);
|
|
22931
23694
|
worldPos2Index[0] = Math.floor(worldPos2Index[0]);
|
|
22932
23695
|
worldPos2Index[1] = Math.floor(worldPos2Index[1]);
|
|
22933
|
-
worldPos2Index[2] = Math.floor(
|
|
23696
|
+
worldPos2Index[2] = Math.floor(worldPos2Index[2]);
|
|
23697
|
+
worldPos2Index[indexOfProjection] =
|
|
23698
|
+
worldProjectionPointIndex[indexOfProjection];
|
|
22934
23699
|
if (this._isInsideVolume(worldPos1Index, worldPos2Index, dimensions)) {
|
|
22935
23700
|
const iMin = Math.min(worldPos1Index[0], worldPos2Index[0]);
|
|
22936
23701
|
const iMax = Math.max(worldPos1Index[0], worldPos2Index[0]);
|
|
@@ -22950,61 +23715,76 @@ class CircleROIStartEndThresholdTool extends _annotation_CircleROITool__WEBPACK_
|
|
|
22950
23715
|
yRadius: Math.abs(topLeftWorld[1] - bottomRightWorld[1]) / 2,
|
|
22951
23716
|
zRadius: Math.abs(topLeftWorld[2] - bottomRightWorld[2]) / 2,
|
|
22952
23717
|
};
|
|
22953
|
-
const pointsInShape = (0,
|
|
23718
|
+
const pointsInShape = (0,_utilities__WEBPACK_IMPORTED_MODULE_19__.pointInShapeCallback)(imageData, (pointLPS) => (0,_utilities_math_ellipse__WEBPACK_IMPORTED_MODULE_18__.pointInEllipse)(ellipseObj, pointLPS), this.configuration.statsCalculator.statsCallback, boundsIJK);
|
|
22954
23719
|
pointsInsideVolume.push(pointsInShape);
|
|
22955
23720
|
}
|
|
22956
23721
|
}
|
|
23722
|
+
const stats = this.configuration.statsCalculator.getStatistics();
|
|
22957
23723
|
data.cachedStats.pointsInVolume = pointsInsideVolume;
|
|
23724
|
+
data.cachedStats.statistics = {
|
|
23725
|
+
Modality: metadata.Modality,
|
|
23726
|
+
area,
|
|
23727
|
+
mean: stats.mean?.value,
|
|
23728
|
+
stdDev: stats.stdDev?.value,
|
|
23729
|
+
max: stats.max?.value,
|
|
23730
|
+
statsArray: stats.array,
|
|
23731
|
+
areaUnit: measureInfo.areaUnits,
|
|
23732
|
+
modalityUnit,
|
|
23733
|
+
};
|
|
22958
23734
|
}
|
|
22959
23735
|
_calculateCachedStatsTool(annotation, enabledElement) {
|
|
22960
23736
|
const data = annotation.data;
|
|
22961
|
-
const {
|
|
23737
|
+
const { viewport } = enabledElement;
|
|
22962
23738
|
const { cachedStats } = data;
|
|
22963
23739
|
const targetId = this.getTargetId(viewport);
|
|
22964
23740
|
const imageVolume = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.cache.getVolume(targetId.split(/volumeId:|\?/)[1]);
|
|
22965
23741
|
this._computeProjectionPoints(annotation, imageVolume);
|
|
22966
23742
|
annotation.invalidated = false;
|
|
22967
|
-
|
|
22968
|
-
const eventDetail = {
|
|
22969
|
-
annotation,
|
|
22970
|
-
viewportId,
|
|
22971
|
-
renderingEngineId,
|
|
22972
|
-
};
|
|
22973
|
-
(0,_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.triggerEvent)(_cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.eventTarget, eventType, eventDetail);
|
|
23743
|
+
(0,_stateManagement_annotation_helpers_state__WEBPACK_IMPORTED_MODULE_12__/* .triggerAnnotationModified */ .hg)(annotation, viewport.element);
|
|
22974
23744
|
return cachedStats;
|
|
22975
23745
|
}
|
|
22976
|
-
|
|
23746
|
+
_getStartCoordinate(worldPos, spacingInNormal, viewPlaneNormal) {
|
|
22977
23747
|
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
22978
23748
|
const numSlicesToPropagateFromStart = Math.round(numSlicesToPropagate / 2);
|
|
22979
23749
|
const startPos = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
22980
23750
|
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(startPos, worldPos, viewPlaneNormal, numSlicesToPropagateFromStart * -spacingInNormal);
|
|
22981
|
-
const
|
|
22982
|
-
return
|
|
23751
|
+
const startCoord = this._getCoordinateForViewplaneNormal(startPos, viewPlaneNormal);
|
|
23752
|
+
return startCoord;
|
|
22983
23753
|
}
|
|
22984
|
-
|
|
23754
|
+
_getEndCoordinate(worldPos, spacingInNormal, viewPlaneNormal) {
|
|
22985
23755
|
const numSlicesToPropagate = this.configuration.numSlicesToPropagate;
|
|
22986
|
-
const
|
|
23756
|
+
const numSlicesToPropagateToEnd = numSlicesToPropagate - Math.round(numSlicesToPropagate / 2);
|
|
22987
23757
|
const endPos = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .R3.create();
|
|
22988
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(endPos, worldPos, viewPlaneNormal,
|
|
22989
|
-
const
|
|
22990
|
-
return
|
|
23758
|
+
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.scaleAndAdd */ .R3.scaleAndAdd(endPos, worldPos, viewPlaneNormal, numSlicesToPropagateToEnd * spacingInNormal);
|
|
23759
|
+
const endCoord = this._getCoordinateForViewplaneNormal(endPos, viewPlaneNormal);
|
|
23760
|
+
return endCoord;
|
|
22991
23761
|
}
|
|
22992
|
-
|
|
22993
|
-
const
|
|
22994
|
-
|
|
22995
|
-
|
|
22996
|
-
|
|
22997
|
-
|
|
22998
|
-
|
|
22999
|
-
|
|
23000
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.sub */ .R3.sub(dir, pos, imagePositionPatient);
|
|
23001
|
-
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .R3.dot(dir, viewPlaneNormal);
|
|
23002
|
-
if (Math.abs(dot) < halfSpacingInNormalDirection) {
|
|
23003
|
-
imageIdIndex = i;
|
|
23004
|
-
}
|
|
23005
|
-
}
|
|
23006
|
-
return imageIdIndex;
|
|
23762
|
+
_getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal) {
|
|
23763
|
+
const viewplaneNormalAbs = [
|
|
23764
|
+
Math.abs(viewPlaneNormal[0]),
|
|
23765
|
+
Math.abs(viewPlaneNormal[1]),
|
|
23766
|
+
Math.abs(viewPlaneNormal[2]),
|
|
23767
|
+
];
|
|
23768
|
+
const indexOfDirection = viewplaneNormalAbs.indexOf(Math.max(...viewplaneNormalAbs));
|
|
23769
|
+
return indexOfDirection;
|
|
23007
23770
|
}
|
|
23771
|
+
_getCoordinateForViewplaneNormal(pos, viewPlaneNormal) {
|
|
23772
|
+
const indexOfDirection = this._getIndexOfCoordinatesForViewplaneNormal(viewPlaneNormal);
|
|
23773
|
+
return pos[indexOfDirection];
|
|
23774
|
+
}
|
|
23775
|
+
}
|
|
23776
|
+
function defaultGetTextLines(data) {
|
|
23777
|
+
const cachedVolumeStats = data.cachedStats.statistics;
|
|
23778
|
+
const { area, mean, max, stdDev, areaUnit, modalityUnit } = cachedVolumeStats;
|
|
23779
|
+
if (mean === undefined) {
|
|
23780
|
+
return;
|
|
23781
|
+
}
|
|
23782
|
+
const textLines = [];
|
|
23783
|
+
textLines.push(`Area: ${(0,_utilities__WEBPACK_IMPORTED_MODULE_19__.roundNumber)(area)} ${areaUnit}`);
|
|
23784
|
+
textLines.push(`Mean: ${(0,_utilities__WEBPACK_IMPORTED_MODULE_19__.roundNumber)(mean)} ${modalityUnit}`);
|
|
23785
|
+
textLines.push(`Max: ${(0,_utilities__WEBPACK_IMPORTED_MODULE_19__.roundNumber)(max)} ${modalityUnit}`);
|
|
23786
|
+
textLines.push(`Std Dev: ${(0,_utilities__WEBPACK_IMPORTED_MODULE_19__.roundNumber)(stdDev)} ${modalityUnit}`);
|
|
23787
|
+
return textLines;
|
|
23008
23788
|
}
|
|
23009
23789
|
CircleROIStartEndThresholdTool.toolName = 'CircleROIStartEndThreshold';
|
|
23010
23790
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CircleROIStartEndThresholdTool);
|
|
@@ -23018,12 +23798,12 @@ CircleROIStartEndThresholdTool.toolName = 'CircleROIStartEndThreshold';
|
|
|
23018
23798
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23019
23799
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23020
23800
|
/* harmony export */ });
|
|
23021
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
23801
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
23022
23802
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
23023
23803
|
/* harmony import */ var _strategies_fillCircle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62309);
|
|
23024
23804
|
/* harmony import */ var _strategies_eraseCircle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62455);
|
|
23025
23805
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68096);
|
|
23026
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
23806
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25876);
|
|
23027
23807
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23118);
|
|
23028
23808
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(66878);
|
|
23029
23809
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95482);
|
|
@@ -23265,7 +24045,7 @@ CircleScissorsTool.toolName = 'CircleScissor';
|
|
|
23265
24045
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23266
24046
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23267
24047
|
/* harmony export */ });
|
|
23268
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
24048
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
23269
24049
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
23270
24050
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(68096);
|
|
23271
24051
|
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(32140);
|
|
@@ -23518,13 +24298,13 @@ PaintFillTool.toolName = 'PaintFill';
|
|
|
23518
24298
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23519
24299
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23520
24300
|
/* harmony export */ });
|
|
23521
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
24301
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
23522
24302
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
23523
24303
|
/* harmony import */ var _strategies_fillRectangle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25429);
|
|
23524
24304
|
/* harmony import */ var _strategies_eraseRectangle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(53760);
|
|
23525
24305
|
/* harmony import */ var _utilities_viewportFilters__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(46966);
|
|
23526
24306
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(68096);
|
|
23527
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
24307
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25876);
|
|
23528
24308
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(23118);
|
|
23529
24309
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(66878);
|
|
23530
24310
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(95482);
|
|
@@ -23765,7 +24545,7 @@ RectangleScissorsTool.toolName = 'RectangleScissor';
|
|
|
23765
24545
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23766
24546
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23767
24547
|
/* harmony export */ });
|
|
23768
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
24548
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
23769
24549
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
23770
24550
|
/* harmony import */ var _stateManagement_segmentation_triggerSegmentationEvents__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(32140);
|
|
23771
24551
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66878);
|
|
@@ -23893,12 +24673,12 @@ SegmentSelectTool.toolName = 'SegmentSelectTool';
|
|
|
23893
24673
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23894
24674
|
/* harmony export */ Z: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23895
24675
|
/* harmony export */ });
|
|
23896
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
24676
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
23897
24677
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(93382);
|
|
23898
24678
|
/* harmony import */ var _strategies_fillSphere__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(92596);
|
|
23899
24679
|
/* harmony import */ var _strategies_eraseSphere__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(57624);
|
|
23900
24680
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68096);
|
|
23901
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
24681
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(25876);
|
|
23902
24682
|
/* harmony import */ var _cursors_elementCursor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(23118);
|
|
23903
24683
|
/* harmony import */ var _utilities_triggerAnnotationRenderForViewportIds__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(66878);
|
|
23904
24684
|
/* harmony import */ var _stateManagement_segmentation__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(95482);
|
|
@@ -24141,7 +24921,7 @@ SphereScissorsTool.toolName = 'SphereScissor';
|
|
|
24141
24921
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24142
24922
|
/* harmony export */ y: () => (/* binding */ isVolumeSegmentation)
|
|
24143
24923
|
/* harmony export */ });
|
|
24144
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
24924
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
24145
24925
|
|
|
24146
24926
|
function isVolumeSegmentation(operationData, viewport) {
|
|
24147
24927
|
const { imageIdReferenceMap } = operationData;
|
|
@@ -24215,7 +24995,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24215
24995
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24216
24996
|
/* harmony export */ Z: () => (/* binding */ getViewportsForAnnotation)
|
|
24217
24997
|
/* harmony export */ });
|
|
24218
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
24998
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
24219
24999
|
|
|
24220
25000
|
const { isEqual } = _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities;
|
|
24221
25001
|
function getViewportsForAnnotation(annotation) {
|
|
@@ -24298,8 +25078,8 @@ __webpack_require__.d(orientation_namespaceObject, {
|
|
|
24298
25078
|
invertOrientationStringLPS: () => (invertOrientationStringLPS/* default */.Z)
|
|
24299
25079
|
});
|
|
24300
25080
|
|
|
24301
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js +
|
|
24302
|
-
var esm = __webpack_require__(
|
|
25081
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/core/dist/esm/index.js + 1 modules
|
|
25082
|
+
var esm = __webpack_require__(12651);
|
|
24303
25083
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/getAnnotationNearPoint.js
|
|
24304
25084
|
var getAnnotationNearPoint = __webpack_require__(62358);
|
|
24305
25085
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/debounce.js
|
|
@@ -24497,7 +25277,7 @@ function _distanceBetween(p1, p2) {
|
|
|
24497
25277
|
/* harmony export */ t7: () => (/* binding */ getUniqueSegmentIndices)
|
|
24498
25278
|
/* harmony export */ });
|
|
24499
25279
|
/* unused harmony export setSegmentationClean */
|
|
24500
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
25280
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
24501
25281
|
/* harmony import */ var _stateManagement_segmentation_segmentationState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(14305);
|
|
24502
25282
|
/* harmony import */ var _tools_segmentation_strategies_utils_stackVolumeCheck__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88439);
|
|
24503
25283
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68096);
|
|
@@ -24691,7 +25471,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24691
25471
|
/* harmony export */ ZW: () => (/* binding */ segmentationRenderingEngine),
|
|
24692
25472
|
/* harmony export */ ih: () => (/* binding */ triggerSegmentationRender)
|
|
24693
25473
|
/* harmony export */ });
|
|
24694
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
25474
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
24695
25475
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
24696
25476
|
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(27078);
|
|
24697
25477
|
/* harmony import */ var _tools__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42486);
|
|
@@ -24815,9 +25595,9 @@ function triggerSegmentationRender(toolGroupId) {
|
|
|
24815
25595
|
/* harmony export */ ZP: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
24816
25596
|
/* harmony export */ });
|
|
24817
25597
|
/* unused harmony export triggerAnnotationRender */
|
|
24818
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
25598
|
+
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12651);
|
|
24819
25599
|
/* harmony import */ var _enums__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68096);
|
|
24820
|
-
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
25600
|
+
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(25876);
|
|
24821
25601
|
/* harmony import */ var _getToolsWithModesForElement__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67298);
|
|
24822
25602
|
|
|
24823
25603
|
|