@ohif/app 3.13.0-beta.2 → 3.13.0-beta.21
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/{1459.bundle.cd67aea5d65062345894.js → 1459.bundle.2f3d935de1ef66d49c9b.js} +5 -6
- package/dist/{147.bundle.37d627289453cb6c3937.js → 147.bundle.15c3dffbc73dab1085f5.js} +6 -5
- package/dist/{1608.bundle.0687c661f1c9edfb3b8a.js → 1608.bundle.7a4a3b49cae10f6ba2cf.js} +8 -8
- package/dist/{1927.bundle.3050588e95f43cf57cdd.js → 1927.bundle.be67b3aafe238ca9f191.js} +27 -38
- package/dist/{1933.bundle.03d69f1ec49e31942aa9.js → 1933.bundle.1b74cba28c11aaa349c1.js} +15 -16
- package/dist/{2018.bundle.0cc66d90549a02692f83.js → 2018.bundle.330c371c2152bc79a68e.js} +18 -19
- package/dist/{6347.bundle.784c48912700f281de1d.js → 2031.bundle.a17bc2d85cef3a9fea57.js} +13 -314
- package/dist/{2108.bundle.e84aa8d858d8c4f2413e.js → 2108.bundle.f1ef8e8746eb3936bb47.js} +567 -556
- package/dist/{213.bundle.c270b9cbfef1c3a6deeb.js → 213.bundle.83766bfd0ad91206ba20.js} +3 -5
- package/dist/{2424.bundle.9a15ea93fa8dfa6a6c29.js → 2424.bundle.8d41a94526449b9c27f2.js} +3 -5
- package/dist/{2516.bundle.1ea0988d309a757bb6da.js → 2516.bundle.f62228e9a800de8d4b31.js} +6 -6
- package/dist/{2701.bundle.12bd01a80a9f8ea4cd94.js → 2701.bundle.8abdc7f6578c00d4539f.js} +6 -6
- package/dist/{2842.bundle.860b9f10fcdd9656947a.js → 2816.bundle.838fa4d72921c026083c.js} +827 -2240
- package/dist/{3081.bundle.9c9d169bf2b4ac6e987f.js → 3081.bundle.69c2ed88c1fc66671e82.js} +237 -176
- package/dist/{1730.bundle.1a3a3ac5087af5ee5cf5.js → 3138.bundle.536017116b2a48fe8f59.js} +10 -304
- package/dist/{3461.bundle.375dd4b31216c8ef6b0c.js → 3461.bundle.b1c56af281517014477c.js} +19 -23
- package/dist/{4202.bundle.5a0f8e4004c5d8a68548.js → 4202.bundle.dd592e5575b8e302689a.js} +4 -4
- package/dist/{4019.bundle.83a604779f7da0101ced.js → 4287.bundle.571587a1d29d54203175.js} +237 -202
- package/dist/{5462.bundle.21beddaca145b7465c72.js → 4406.bundle.573d234b4641d23cf8db.js} +1083 -1308
- package/dist/{1403.bundle.3368c0f92547bc8b3148.js → 4507.bundle.2943a08dea2a96095e86.js} +10 -305
- package/dist/{4819.bundle.2ab7a41dbade682bcee9.js → 4819.bundle.b817d46688ec00d46826.js} +25 -26
- package/dist/{4775.bundle.cb49c11c62965c2807ef.js → 5015.bundle.ea7e3b295cd3ef134df2.js} +27 -331
- package/dist/{5028.bundle.82318fd632945aba4f27.js → 5028.bundle.b75c0bb0fa9a490055bd.js} +7 -9
- package/dist/{5261.bundle.6e1a017f8f1027557f5b.js → 5261.bundle.2655560097e9250eac44.js} +412 -345
- package/dist/{5457.bundle.e9733e0dc7c3ae46ea42.js → 5457.bundle.ea0a729d0bb45314d5ca.js} +16 -23
- package/dist/{5485.bundle.6603ea8ac3b639703e4d.js → 5485.bundle.8248a4caa4411103e190.js} +14 -29
- package/dist/{5491.bundle.2e01dd7ad29e4cc01bc1.js → 5491.bundle.4866d2ecb20dd089e071.js} +54 -51
- package/dist/{5802.bundle.3bf5e6b3ab330a594a47.js → 5802.bundle.70600f8f701ac920b932.js} +74 -16
- package/dist/5802.css +1 -1
- package/dist/{5830.bundle.b073c265c4fcea1afff3.js → 5830.bundle.791019deddd536980a11.js} +3 -3
- package/dist/{5858.bundle.ff6b340cf7457db76a1a.js → 5858.bundle.466e58128de344ab53f3.js} +90 -86
- package/dist/{6027.bundle.3e52391c5f4432911512.js → 6027.bundle.b9a666f05ac57e742979.js} +3 -5
- package/dist/{997.bundle.822b33e561263084e18c.js → 6280.bundle.6574101421b8a4ab6777.js} +1532 -952
- package/dist/{6354.bundle.c387737dc09c9cab4ff2.js → 6354.bundle.d8a592b03e9a5b7a66c2.js} +102 -96
- package/dist/{6376.bundle.9cb74d7bc08476e2f1a7.js → 6376.bundle.839c708f2fc41e76ee58.js} +6 -6
- package/dist/{6409.bundle.b36048896cb11c8571fb.js → 6409.bundle.24edbaa283b7c521b8f7.js} +73 -73
- package/dist/6939.bundle.41fbdef87597b5172ec6.js +3 -3
- package/dist/{7159.bundle.a5991a5d4f0dd8f1c95f.js → 7159.bundle.fb9df255868960f69765.js} +7 -5
- package/dist/{7190.bundle.e8f0193e0e06472f795c.js → 7190.bundle.6314b558746e394aeb0e.js} +40 -40
- package/dist/{732.bundle.6978ac30a1e36abf06db.js → 732.bundle.ea6f9d8504e37e01a208.js} +5 -13
- package/dist/{7431.bundle.b01791d10e6cf9f503b0.js → 7431.bundle.e6f5f5835a3c49e2309c.js} +28 -28
- package/dist/{7639.bundle.831b85eb99f966cefcb2.js → 7639.bundle.2e179ab85c66a6def98f.js} +3 -5
- package/dist/7758.bundle.c8d106364298e7d288f0.js +3 -3
- package/dist/{8094.bundle.5c44190a325ac23e3e5c.js → 8094.bundle.148a66619607e37cbf19.js} +3 -4
- package/dist/{8305.bundle.437d4dd008a2139dc96a.js → 8305.bundle.e621bc861f8c16092e7c.js} +9 -11
- package/dist/{6163.bundle.77ac55484671ce6159e6.js → 8499.bundle.59df69e1919739d6e444.js} +5 -300
- package/dist/8499.css +2 -0
- package/dist/{85.bundle.503f33be60625a46580d.js → 85.bundle.14430d53b13d7ff9f8a8.js} +3 -5
- package/dist/{8558.bundle.71c7bf070f41c6647704.js → 8558.bundle.288aabeb7473ee9d7312.js} +11 -309
- package/dist/{8583.bundle.4cb5dea918f010b8e56b.js → 8583.bundle.d0773ead34455cfa28d7.js} +16 -19
- package/dist/{4410.bundle.c5224cd7d6238a7d4660.js → 8665.bundle.056dcd3e86743de2526c.js} +3456 -1444
- package/dist/{9195.bundle.5c13bd1aef828d802142.js → 9195.bundle.902ab556e8909fa878a1.js} +95 -113
- package/dist/{7412.bundle.fab1742191b7fe937330.js → 9205.bundle.dca4f040999d069f1cc5.js} +3378 -1074
- package/dist/{3584.bundle.8cc0750425513433e9cc.js → 933.bundle.c8f45e1f380ad5a34e07.js} +264 -2219
- package/dist/{9845.bundle.255e7c7f7a88193b4e47.js → 9845.bundle.d52e8993eb5cde995219.js} +6 -6
- package/dist/{9862.bundle.3a8958a82c572015d25d.js → 9862.bundle.4704bce0c5b039dfdec3.js} +6 -4
- package/dist/{9927.bundle.9fdb8b442eb22aa97e73.js → 9927.bundle.006c8d2dda07109c4749.js} +3 -5
- package/dist/{app.bundle.7777a62215a4f90957f2.js → app.bundle.38dca800f336facdb28b.js} +65533 -64635
- package/dist/app.bundle.css +3 -3
- package/dist/{compute.bundle.64280c7af19ff567465f.js → compute.bundle.6bc9d64acadd16a85f59.js} +10 -22
- package/dist/{histogram-worker.bundle.d4e40a8018d2698b072e.js → histogram-worker.bundle.5b679ce4142c803c80a4.js} +11 -23
- package/dist/index.html +1 -1
- package/dist/{interpolation.bundle.c70cb95d164dc494e6dc.js → interpolation.bundle.072a28b303f2dbafe05c.js} +14 -26
- package/dist/{polySeg.bundle.a5aa9130b4191253c410.js → polySeg.bundle.41c40b57dd1b265fb425.js} +8 -20
- package/dist/sw.js +1 -1
- package/package.json +22 -21
- package/dist/3343.bundle.d7578ce8f75d158c0bab.js +0 -297
- /package/dist/{1730.css → 3138.css} +0 -0
- /package/dist/{3343.css → 4972.css} +0 -0
- /package/dist/{6163.css → 7829.css} +0 -0
|
@@ -1,8 +1,31 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[
|
|
2
|
+
(globalThis["webpackChunk"] = globalThis["webpackChunk"] || []).push([[933],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
5
|
-
|
|
4
|
+
/***/ 75183
|
|
5
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
|
+
|
|
7
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
8
|
+
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
9
|
+
/* harmony export */ });
|
|
10
|
+
var ChangeTypes;
|
|
11
|
+
(function (ChangeTypes) {
|
|
12
|
+
ChangeTypes["Interaction"] = "Interaction";
|
|
13
|
+
ChangeTypes["HandlesUpdated"] = "HandlesUpdated";
|
|
14
|
+
ChangeTypes["StatsUpdated"] = "StatsUpdated";
|
|
15
|
+
ChangeTypes["InitialSetup"] = "InitialSetup";
|
|
16
|
+
ChangeTypes["Completed"] = "Completed";
|
|
17
|
+
ChangeTypes["InterpolationUpdated"] = "InterpolationUpdated";
|
|
18
|
+
ChangeTypes["History"] = "History";
|
|
19
|
+
ChangeTypes["MetadataReferenceModified"] = "MetadataReferenceModified";
|
|
20
|
+
ChangeTypes["LabelChange"] = "LabelChange";
|
|
21
|
+
})(ChangeTypes || (ChangeTypes = {}));
|
|
22
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ChangeTypes);
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/***/ },
|
|
26
|
+
|
|
27
|
+
/***/ 74690
|
|
28
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6
29
|
|
|
7
30
|
|
|
8
31
|
// EXPORTS
|
|
@@ -17,8 +40,8 @@ var enums = __webpack_require__(29857);
|
|
|
17
40
|
var eventListeners = __webpack_require__(21418);
|
|
18
41
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/mouse/mouseDownListener.js
|
|
19
42
|
var mouseDownListener = __webpack_require__(68014);
|
|
20
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js +
|
|
21
|
-
var ToolGroupManager = __webpack_require__(
|
|
43
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 7 modules
|
|
44
|
+
var ToolGroupManager = __webpack_require__(7754);
|
|
22
45
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.js
|
|
23
46
|
|
|
24
47
|
|
|
@@ -135,10 +158,10 @@ function keyUp(evt) {
|
|
|
135
158
|
|
|
136
159
|
|
|
137
160
|
|
|
138
|
-
/***/ }
|
|
161
|
+
/***/ },
|
|
139
162
|
|
|
140
|
-
/***/ 40100
|
|
141
|
-
|
|
163
|
+
/***/ 40100
|
|
164
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
142
165
|
|
|
143
166
|
|
|
144
167
|
// EXPORTS
|
|
@@ -183,8 +206,8 @@ var filterToolsWithAnnotationsForElement = __webpack_require__(57725);
|
|
|
183
206
|
var filterMoveableAnnotationTools = __webpack_require__(25972);
|
|
184
207
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 18 modules
|
|
185
208
|
var eventListeners = __webpack_require__(21418);
|
|
186
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js +
|
|
187
|
-
var ToolGroupManager = __webpack_require__(
|
|
209
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 7 modules
|
|
210
|
+
var ToolGroupManager = __webpack_require__(7754);
|
|
188
211
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getMouseModifier.js
|
|
189
212
|
var getMouseModifier = __webpack_require__(76910);
|
|
190
213
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js
|
|
@@ -499,17 +522,17 @@ function mouseWheel(evt) {
|
|
|
499
522
|
|
|
500
523
|
|
|
501
524
|
|
|
502
|
-
/***/ }
|
|
525
|
+
/***/ },
|
|
503
526
|
|
|
504
|
-
/***/ 96198
|
|
505
|
-
|
|
527
|
+
/***/ 96198
|
|
528
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
506
529
|
|
|
507
530
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
508
531
|
/* harmony export */ A: () => (/* binding */ customCallbackHandler)
|
|
509
532
|
/* harmony export */ });
|
|
510
533
|
/* harmony import */ var _store_state__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85204);
|
|
511
534
|
/* harmony import */ var _enums_ToolModes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(49892);
|
|
512
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
535
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7754);
|
|
513
536
|
|
|
514
537
|
|
|
515
538
|
|
|
@@ -542,15 +565,15 @@ function customCallbackHandler(handlerType, customFunction, evt) {
|
|
|
542
565
|
}
|
|
543
566
|
|
|
544
567
|
|
|
545
|
-
/***/ }
|
|
568
|
+
/***/ },
|
|
546
569
|
|
|
547
|
-
/***/ 70333
|
|
548
|
-
|
|
570
|
+
/***/ 70333
|
|
571
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
549
572
|
|
|
550
573
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
551
574
|
/* harmony export */ A: () => (/* binding */ getToolsWithModesForMouseEvent)
|
|
552
575
|
/* harmony export */ });
|
|
553
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
576
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7754);
|
|
554
577
|
|
|
555
578
|
function getToolsWithModesForMouseEvent(evt, modesFilter, evtButton) {
|
|
556
579
|
const { renderingEngineId, viewportId } = evt.detail;
|
|
@@ -576,10 +599,10 @@ function getToolsWithModesForMouseEvent(evt, modesFilter, evtButton) {
|
|
|
576
599
|
}
|
|
577
600
|
|
|
578
601
|
|
|
579
|
-
/***/ }
|
|
602
|
+
/***/ },
|
|
580
603
|
|
|
581
|
-
/***/ 84971
|
|
582
|
-
|
|
604
|
+
/***/ 84971
|
|
605
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
583
606
|
|
|
584
607
|
|
|
585
608
|
// EXPORTS
|
|
@@ -612,8 +635,8 @@ var filterMoveableAnnotationTools = __webpack_require__(25972);
|
|
|
612
635
|
var getMouseModifier = __webpack_require__(76910);
|
|
613
636
|
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/eventListeners/index.js + 18 modules
|
|
614
637
|
var eventListeners = __webpack_require__(21418);
|
|
615
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js +
|
|
616
|
-
var ToolGroupManager = __webpack_require__(
|
|
638
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/store/ToolGroupManager/index.js + 7 modules
|
|
639
|
+
var ToolGroupManager = __webpack_require__(7754);
|
|
617
640
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.js
|
|
618
641
|
|
|
619
642
|
|
|
@@ -810,10 +833,10 @@ const touchPress = customCallbackHandler/* default */.A.bind(null, 'Touch', 'tou
|
|
|
810
833
|
|
|
811
834
|
|
|
812
835
|
|
|
813
|
-
/***/ }
|
|
836
|
+
/***/ },
|
|
814
837
|
|
|
815
|
-
/***/ 39595
|
|
816
|
-
|
|
838
|
+
/***/ 39595
|
|
839
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
817
840
|
|
|
818
841
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
819
842
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -834,10 +857,10 @@ function disable(element) {
|
|
|
834
857
|
});
|
|
835
858
|
|
|
836
859
|
|
|
837
|
-
/***/ }
|
|
860
|
+
/***/ },
|
|
838
861
|
|
|
839
|
-
/***/ 40776
|
|
840
|
-
|
|
862
|
+
/***/ 40776
|
|
863
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
841
864
|
|
|
842
865
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
843
866
|
/* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
@@ -912,10 +935,10 @@ function resetModifierKey() {
|
|
|
912
935
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (keyListener);
|
|
913
936
|
|
|
914
937
|
|
|
915
|
-
/***/ }
|
|
938
|
+
/***/ },
|
|
916
939
|
|
|
917
|
-
/***/ 99019
|
|
918
|
-
|
|
940
|
+
/***/ 99019
|
|
941
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
919
942
|
|
|
920
943
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
921
944
|
/* harmony export */ A: () => (/* binding */ getMouseEventPoints)
|
|
@@ -954,10 +977,10 @@ function _clientToPoint(evt) {
|
|
|
954
977
|
}
|
|
955
978
|
|
|
956
979
|
|
|
957
|
-
/***/ }
|
|
980
|
+
/***/ },
|
|
958
981
|
|
|
959
|
-
/***/ 91099
|
|
960
|
-
|
|
982
|
+
/***/ 91099
|
|
983
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
961
984
|
|
|
962
985
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
963
986
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -999,10 +1022,10 @@ function mouseDoubleClickListener(evt) {
|
|
|
999
1022
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mouseDoubleClickListener);
|
|
1000
1023
|
|
|
1001
1024
|
|
|
1002
|
-
/***/ }
|
|
1025
|
+
/***/ },
|
|
1003
1026
|
|
|
1004
|
-
/***/ 68014
|
|
1005
|
-
|
|
1027
|
+
/***/ 68014
|
|
1028
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1006
1029
|
|
|
1007
1030
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1008
1031
|
/* harmony export */ Ay: () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
@@ -1280,10 +1303,10 @@ function mouseDoubleClickIgnoreListener(evt) {
|
|
|
1280
1303
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mouseDownListener);
|
|
1281
1304
|
|
|
1282
1305
|
|
|
1283
|
-
/***/ }
|
|
1306
|
+
/***/ },
|
|
1284
1307
|
|
|
1285
|
-
/***/ 41343
|
|
1286
|
-
|
|
1308
|
+
/***/ 41343
|
|
1309
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1287
1310
|
|
|
1288
1311
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1289
1312
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -1321,10 +1344,10 @@ function mouseMoveListener(evt) {
|
|
|
1321
1344
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mouseMoveListener);
|
|
1322
1345
|
|
|
1323
1346
|
|
|
1324
|
-
/***/ }
|
|
1347
|
+
/***/ },
|
|
1325
1348
|
|
|
1326
|
-
/***/ 41666
|
|
1327
|
-
|
|
1349
|
+
/***/ 41666
|
|
1350
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1328
1351
|
|
|
1329
1352
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1330
1353
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -1378,10 +1401,10 @@ function enable(element) {
|
|
|
1378
1401
|
});
|
|
1379
1402
|
|
|
1380
1403
|
|
|
1381
|
-
/***/ }
|
|
1404
|
+
/***/ },
|
|
1382
1405
|
|
|
1383
|
-
/***/ 82603
|
|
1384
|
-
|
|
1406
|
+
/***/ 82603
|
|
1407
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1385
1408
|
|
|
1386
1409
|
|
|
1387
1410
|
// EXPORTS
|
|
@@ -1722,10 +1745,10 @@ function _updateTouchEventsLastPoints(element, lastPoints) {
|
|
|
1722
1745
|
/* harmony default export */ const touch_touchStartListener = (touchStartListener);
|
|
1723
1746
|
|
|
1724
1747
|
|
|
1725
|
-
/***/ }
|
|
1748
|
+
/***/ },
|
|
1726
1749
|
|
|
1727
|
-
/***/ 17806
|
|
1728
|
-
|
|
1750
|
+
/***/ 17806
|
|
1751
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1729
1752
|
|
|
1730
1753
|
|
|
1731
1754
|
// EXPORTS
|
|
@@ -1826,10 +1849,10 @@ function wheelListener(evt) {
|
|
|
1826
1849
|
/* harmony default export */ const wheel_wheelListener = (wheelListener);
|
|
1827
1850
|
|
|
1828
1851
|
|
|
1829
|
-
/***/ }
|
|
1852
|
+
/***/ },
|
|
1830
1853
|
|
|
1831
|
-
/***/ 6802
|
|
1832
|
-
|
|
1854
|
+
/***/ 6802
|
|
1855
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1833
1856
|
|
|
1834
1857
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1835
1858
|
/* harmony export */ O8: () => (/* reexport safe */ _annotation_annotationState__WEBPACK_IMPORTED_MODULE_3__.removeAnnotation),
|
|
@@ -1850,10 +1873,10 @@ function wheelListener(evt) {
|
|
|
1850
1873
|
|
|
1851
1874
|
|
|
1852
1875
|
|
|
1853
|
-
/***/ }
|
|
1876
|
+
/***/ },
|
|
1854
1877
|
|
|
1855
|
-
/***/ 6273
|
|
1856
|
-
|
|
1878
|
+
/***/ 6273
|
|
1879
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1857
1880
|
|
|
1858
1881
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1859
1882
|
/* harmony export */ p: () => (/* binding */ convertStackToVolumeLabelmap)
|
|
@@ -1869,10 +1892,10 @@ async function convertStackToVolumeLabelmap(args) {
|
|
|
1869
1892
|
}
|
|
1870
1893
|
|
|
1871
1894
|
|
|
1872
|
-
/***/ }
|
|
1895
|
+
/***/ },
|
|
1873
1896
|
|
|
1874
|
-
/***/ 98149
|
|
1875
|
-
|
|
1897
|
+
/***/ 98149
|
|
1898
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1876
1899
|
|
|
1877
1900
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1878
1901
|
/* harmony export */ X: () => (/* binding */ updateStackSegmentationState)
|
|
@@ -1915,10 +1938,10 @@ async function updateStackSegmentationState({ segmentationId, viewportId, imageI
|
|
|
1915
1938
|
}
|
|
1916
1939
|
|
|
1917
1940
|
|
|
1918
|
-
/***/ }
|
|
1941
|
+
/***/ },
|
|
1919
1942
|
|
|
1920
|
-
/***/ 25972
|
|
1921
|
-
|
|
1943
|
+
/***/ 25972
|
|
1944
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1922
1945
|
|
|
1923
1946
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1924
1947
|
/* harmony export */ A: () => (/* binding */ filterMoveableAnnotationTools)
|
|
@@ -1945,10 +1968,10 @@ function filterMoveableAnnotationTools(element, ToolAndAnnotations, canvasCoords
|
|
|
1945
1968
|
}
|
|
1946
1969
|
|
|
1947
1970
|
|
|
1948
|
-
/***/ }
|
|
1971
|
+
/***/ },
|
|
1949
1972
|
|
|
1950
|
-
/***/ 57725
|
|
1951
|
-
|
|
1973
|
+
/***/ 57725
|
|
1974
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1952
1975
|
|
|
1953
1976
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1954
1977
|
/* harmony export */ A: () => (/* binding */ filterToolsWithAnnotationsForElement)
|
|
@@ -1978,10 +2001,10 @@ function filterToolsWithAnnotationsForElement(element, tools) {
|
|
|
1978
2001
|
}
|
|
1979
2002
|
|
|
1980
2003
|
|
|
1981
|
-
/***/ }
|
|
2004
|
+
/***/ },
|
|
1982
2005
|
|
|
1983
|
-
/***/ 35486
|
|
1984
|
-
|
|
2006
|
+
/***/ 35486
|
|
2007
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1985
2008
|
|
|
1986
2009
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1987
2010
|
/* harmony export */ A: () => (/* binding */ filterToolsWithMoveableHandles)
|
|
@@ -2009,10 +2032,10 @@ function filterToolsWithMoveableHandles(element, ToolAndAnnotations, canvasCoord
|
|
|
2009
2032
|
}
|
|
2010
2033
|
|
|
2011
2034
|
|
|
2012
|
-
/***/ }
|
|
2035
|
+
/***/ },
|
|
2013
2036
|
|
|
2014
|
-
/***/ 16175
|
|
2015
|
-
|
|
2037
|
+
/***/ 16175
|
|
2038
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2016
2039
|
|
|
2017
2040
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2018
2041
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -2021,7 +2044,7 @@ function filterToolsWithMoveableHandles(element, ToolAndAnnotations, canvasCoord
|
|
|
2021
2044
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15327);
|
|
2022
2045
|
/* harmony import */ var _distancePointToContour__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(13271);
|
|
2023
2046
|
/* harmony import */ var _drawingSvg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74347);
|
|
2024
|
-
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
2047
|
+
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(85895);
|
|
2025
2048
|
|
|
2026
2049
|
|
|
2027
2050
|
|
|
@@ -2101,10 +2124,10 @@ class CircleSculptCursor {
|
|
|
2101
2124
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CircleSculptCursor);
|
|
2102
2125
|
|
|
2103
2126
|
|
|
2104
|
-
/***/ }
|
|
2127
|
+
/***/ },
|
|
2105
2128
|
|
|
2106
|
-
/***/ 10639
|
|
2107
|
-
|
|
2129
|
+
/***/ 10639
|
|
2130
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2108
2131
|
|
|
2109
2132
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2110
2133
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -2401,15 +2424,15 @@ GrowCutBaseTool.toolName = 'GrowCutBaseTool';
|
|
|
2401
2424
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (GrowCutBaseTool);
|
|
2402
2425
|
|
|
2403
2426
|
|
|
2404
|
-
/***/ }
|
|
2427
|
+
/***/ },
|
|
2405
2428
|
|
|
2406
|
-
/***/ 13271
|
|
2407
|
-
|
|
2429
|
+
/***/ 13271
|
|
2430
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2408
2431
|
|
|
2409
2432
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2410
2433
|
/* harmony export */ X: () => (/* binding */ distancePointToContour)
|
|
2411
2434
|
/* harmony export */ });
|
|
2412
|
-
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2435
|
+
/* harmony import */ var _utilities_math__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(85895);
|
|
2413
2436
|
|
|
2414
2437
|
const distancePointToContour = (viewport, annotation, coords) => {
|
|
2415
2438
|
if (!annotation?.data?.contour?.polyline?.length) {
|
|
@@ -2430,10 +2453,10 @@ const distancePointToContour = (viewport, annotation, coords) => {
|
|
|
2430
2453
|
};
|
|
2431
2454
|
|
|
2432
2455
|
|
|
2433
|
-
/***/ }
|
|
2456
|
+
/***/ },
|
|
2434
2457
|
|
|
2435
|
-
/***/ 47347
|
|
2436
|
-
|
|
2458
|
+
/***/ 47347
|
|
2459
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2437
2460
|
|
|
2438
2461
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2439
2462
|
/* harmony export */ M: () => (/* binding */ eraseInsideRectangle)
|
|
@@ -2455,132 +2478,16 @@ function eraseOutsideRectangle(enabledElement, operationData) {
|
|
|
2455
2478
|
}
|
|
2456
2479
|
|
|
2457
2480
|
|
|
2458
|
-
/***/ }
|
|
2459
|
-
|
|
2460
|
-
/***/ 5565:
|
|
2461
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
2462
|
-
|
|
2463
|
-
__webpack_require__.r(__webpack_exports__);
|
|
2464
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2465
|
-
/* harmony export */ checkStandardBasis: () => (/* binding */ checkStandardBasis),
|
|
2466
|
-
/* harmony export */ inverse3x3Matrix: () => (/* binding */ inverse3x3Matrix),
|
|
2467
|
-
/* harmony export */ rotatePoints: () => (/* binding */ rotatePoints)
|
|
2468
|
-
/* harmony export */ });
|
|
2469
|
-
function validate3x3Matrix(matrix) {
|
|
2470
|
-
if (!Array.isArray(matrix) || matrix.length !== 9) {
|
|
2471
|
-
throw new Error('Matrix must be an array of 9 numbers');
|
|
2472
|
-
}
|
|
2473
|
-
if (!matrix.every((n) => typeof n === 'number' && !isNaN(n))) {
|
|
2474
|
-
throw new Error('Matrix must contain only valid numbers');
|
|
2475
|
-
}
|
|
2476
|
-
}
|
|
2477
|
-
function inverse3x3Matrix(matrix) {
|
|
2478
|
-
validate3x3Matrix(matrix);
|
|
2479
|
-
const mat = [
|
|
2480
|
-
[matrix[0], matrix[1], matrix[2]],
|
|
2481
|
-
[matrix[3], matrix[4], matrix[5]],
|
|
2482
|
-
[matrix[6], matrix[7], matrix[8]],
|
|
2483
|
-
];
|
|
2484
|
-
const determinant = mat[0][0] * (mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1]) -
|
|
2485
|
-
mat[0][1] * (mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0]) +
|
|
2486
|
-
mat[0][2] * (mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0]);
|
|
2487
|
-
if (Math.abs(determinant) < 1e-10) {
|
|
2488
|
-
throw new Error('Matrix is not invertible (determinant is zero)');
|
|
2489
|
-
}
|
|
2490
|
-
const adjugate = [
|
|
2491
|
-
[
|
|
2492
|
-
mat[1][1] * mat[2][2] - mat[1][2] * mat[2][1],
|
|
2493
|
-
-(mat[0][1] * mat[2][2] - mat[0][2] * mat[2][1]),
|
|
2494
|
-
mat[0][1] * mat[1][2] - mat[0][2] * mat[1][1],
|
|
2495
|
-
],
|
|
2496
|
-
[
|
|
2497
|
-
-(mat[1][0] * mat[2][2] - mat[1][2] * mat[2][0]),
|
|
2498
|
-
mat[0][0] * mat[2][2] - mat[0][2] * mat[2][0],
|
|
2499
|
-
-(mat[0][0] * mat[1][2] - mat[0][2] * mat[1][0]),
|
|
2500
|
-
],
|
|
2501
|
-
[
|
|
2502
|
-
mat[1][0] * mat[2][1] - mat[1][1] * mat[2][0],
|
|
2503
|
-
-(mat[0][0] * mat[2][1] - mat[0][1] * mat[2][0]),
|
|
2504
|
-
mat[0][0] * mat[1][1] - mat[0][1] * mat[1][0],
|
|
2505
|
-
],
|
|
2506
|
-
];
|
|
2507
|
-
const inverse = [];
|
|
2508
|
-
for (let i = 0; i < 3; i++) {
|
|
2509
|
-
for (let j = 0; j < 3; j++) {
|
|
2510
|
-
inverse.push(adjugate[i][j] / determinant);
|
|
2511
|
-
}
|
|
2512
|
-
}
|
|
2513
|
-
return inverse;
|
|
2514
|
-
}
|
|
2515
|
-
function normalizeVector(v) {
|
|
2516
|
-
const magnitude = Math.sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
|
|
2517
|
-
return v.map((component) => component / magnitude);
|
|
2518
|
-
}
|
|
2519
|
-
function checkStandardBasis(directions) {
|
|
2520
|
-
validate3x3Matrix(directions);
|
|
2521
|
-
const xVector = directions.slice(0, 3);
|
|
2522
|
-
const yVector = directions.slice(3, 6);
|
|
2523
|
-
const zVector = directions.slice(6, 9);
|
|
2524
|
-
const normalizedX = normalizeVector(xVector);
|
|
2525
|
-
const normalizedY = normalizeVector(yVector);
|
|
2526
|
-
const normalizedZ = normalizeVector(zVector);
|
|
2527
|
-
const standardBasis = {
|
|
2528
|
-
x: [1, 0, 0],
|
|
2529
|
-
y: [0, 1, 0],
|
|
2530
|
-
z: [0, 0, 1],
|
|
2531
|
-
};
|
|
2532
|
-
const epsilon = 1e-10;
|
|
2533
|
-
const isStandard = normalizedX.every((val, i) => Math.abs(val - standardBasis.x[i]) < epsilon) &&
|
|
2534
|
-
normalizedY.every((val, i) => Math.abs(val - standardBasis.y[i]) < epsilon) &&
|
|
2535
|
-
normalizedZ.every((val, i) => Math.abs(val - standardBasis.z[i]) < epsilon);
|
|
2536
|
-
const rotationMatrix = isStandard
|
|
2537
|
-
? [...standardBasis.x, ...standardBasis.y, ...standardBasis.z]
|
|
2538
|
-
: inverse3x3Matrix([...normalizedX, ...normalizedY, ...normalizedZ]);
|
|
2539
|
-
return {
|
|
2540
|
-
isStandard,
|
|
2541
|
-
rotationMatrix,
|
|
2542
|
-
};
|
|
2543
|
-
}
|
|
2544
|
-
function rotatePoint(point, origin, rotationMatrix) {
|
|
2545
|
-
const x = point[0] - origin[0];
|
|
2546
|
-
const y = point[1] - origin[1];
|
|
2547
|
-
const z = point[2] - origin[2];
|
|
2548
|
-
return [
|
|
2549
|
-
rotationMatrix[0] * x +
|
|
2550
|
-
rotationMatrix[1] * y +
|
|
2551
|
-
rotationMatrix[2] * z +
|
|
2552
|
-
origin[0],
|
|
2553
|
-
rotationMatrix[3] * x +
|
|
2554
|
-
rotationMatrix[4] * y +
|
|
2555
|
-
rotationMatrix[5] * z +
|
|
2556
|
-
origin[1],
|
|
2557
|
-
rotationMatrix[6] * x +
|
|
2558
|
-
rotationMatrix[7] * y +
|
|
2559
|
-
rotationMatrix[8] * z +
|
|
2560
|
-
origin[2],
|
|
2561
|
-
];
|
|
2562
|
-
}
|
|
2563
|
-
function rotatePoints(rotationMatrix, origin, points) {
|
|
2564
|
-
const rotatedPoints = [];
|
|
2565
|
-
for (let i = 0; i < points.length; i += 3) {
|
|
2566
|
-
const point = points.slice(i, i + 3);
|
|
2567
|
-
const rotated = rotatePoint(point, origin, rotationMatrix);
|
|
2568
|
-
rotatedPoints.push(...rotated);
|
|
2569
|
-
}
|
|
2570
|
-
return rotatedPoints;
|
|
2571
|
-
}
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
/***/ }),
|
|
2481
|
+
/***/ },
|
|
2575
2482
|
|
|
2576
|
-
/***/ 39848
|
|
2577
|
-
|
|
2483
|
+
/***/ 39848
|
|
2484
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2578
2485
|
|
|
2579
2486
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2580
2487
|
/* harmony export */ A: () => (/* binding */ getToolsWithModesForElement)
|
|
2581
2488
|
/* harmony export */ });
|
|
2582
2489
|
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
2583
|
-
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
2490
|
+
/* harmony import */ var _store_ToolGroupManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7754);
|
|
2584
2491
|
|
|
2585
2492
|
|
|
2586
2493
|
function getToolsWithModesForElement(element, modesFilter) {
|
|
@@ -2607,10 +2514,10 @@ function getToolsWithModesForElement(element, modesFilter) {
|
|
|
2607
2514
|
}
|
|
2608
2515
|
|
|
2609
2516
|
|
|
2610
|
-
/***/ }
|
|
2517
|
+
/***/ },
|
|
2611
2518
|
|
|
2612
|
-
/***/ 22658
|
|
2613
|
-
|
|
2519
|
+
/***/ 22658
|
|
2520
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2614
2521
|
|
|
2615
2522
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2616
2523
|
/* harmony export */ j: () => (/* binding */ getVOIMultipliers)
|
|
@@ -2638,10 +2545,10 @@ function getVOIMultipliers(viewport, volumeId, options) {
|
|
|
2638
2545
|
|
|
2639
2546
|
|
|
2640
2547
|
|
|
2641
|
-
/***/ }
|
|
2548
|
+
/***/ },
|
|
2642
2549
|
|
|
2643
|
-
/***/ 38776
|
|
2644
|
-
|
|
2550
|
+
/***/ 38776
|
|
2551
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2645
2552
|
|
|
2646
2553
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2647
2554
|
/* harmony export */ j: () => (/* binding */ LivewirePath)
|
|
@@ -2719,10 +2626,10 @@ class LivewirePath {
|
|
|
2719
2626
|
}
|
|
2720
2627
|
|
|
2721
2628
|
|
|
2722
|
-
/***/ }
|
|
2629
|
+
/***/ },
|
|
2723
2630
|
|
|
2724
|
-
/***/ 78044
|
|
2725
|
-
|
|
2631
|
+
/***/ 78044
|
|
2632
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2726
2633
|
|
|
2727
2634
|
|
|
2728
2635
|
// EXPORTS
|
|
@@ -3120,251 +3027,49 @@ class LivewireScissors {
|
|
|
3120
3027
|
}
|
|
3121
3028
|
|
|
3122
3029
|
|
|
3123
|
-
/***/ }
|
|
3124
|
-
|
|
3125
|
-
/***/ 88638:
|
|
3126
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3127
|
-
|
|
3128
|
-
// ESM COMPAT FLAG
|
|
3129
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3130
|
-
|
|
3131
|
-
// EXPORTS
|
|
3132
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
3133
|
-
distanceToPoint: () => (/* reexport */ distanceToPoint),
|
|
3134
|
-
distanceToPointSquared: () => (/* reexport */ distanceToPointSquared),
|
|
3135
|
-
intersectAABB: () => (/* reexport */ intersectAABB)
|
|
3136
|
-
});
|
|
3137
|
-
|
|
3138
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/intersectAABB.js
|
|
3139
|
-
function intersectAABB(aabb1, aabb2) {
|
|
3140
|
-
return (aabb1.minX <= aabb2.maxX &&
|
|
3141
|
-
aabb1.maxX >= aabb2.minX &&
|
|
3142
|
-
aabb1.minY <= aabb2.maxY &&
|
|
3143
|
-
aabb1.maxY >= aabb2.minY);
|
|
3144
|
-
}
|
|
3145
|
-
|
|
3146
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/distanceToPointSquared.js
|
|
3147
|
-
function distanceToPointSquared(aabb, point) {
|
|
3148
|
-
const aabbWidth = aabb.maxX - aabb.minX;
|
|
3149
|
-
const aabbHeight = aabb.maxY - aabb.minY;
|
|
3150
|
-
const aabbSize = [aabbWidth, aabbHeight];
|
|
3151
|
-
const aabbCenter = [
|
|
3152
|
-
aabb.minX + aabbWidth / 2,
|
|
3153
|
-
aabb.minY + aabbHeight / 2,
|
|
3154
|
-
];
|
|
3155
|
-
const translatedPoint = [
|
|
3156
|
-
Math.abs(point[0] - aabbCenter[0]),
|
|
3157
|
-
Math.abs(point[1] - aabbCenter[1]),
|
|
3158
|
-
];
|
|
3159
|
-
const dx = translatedPoint[0] - aabbSize[0] * 0.5;
|
|
3160
|
-
const dy = translatedPoint[1] - aabbSize[1] * 0.5;
|
|
3161
|
-
if (dx > 0 && dy > 0) {
|
|
3162
|
-
return dx * dx + dy * dy;
|
|
3163
|
-
}
|
|
3164
|
-
const dist = Math.max(dx, 0) + Math.max(dy, 0);
|
|
3165
|
-
return dist * dist;
|
|
3166
|
-
}
|
|
3167
|
-
|
|
3168
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/distanceToPoint.js
|
|
3169
|
-
|
|
3170
|
-
function distanceToPoint(aabb, point) {
|
|
3171
|
-
return Math.sqrt(distanceToPointSquared(aabb, point));
|
|
3172
|
-
}
|
|
3173
|
-
|
|
3174
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/aabb/index.js
|
|
3175
|
-
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
/***/ }),
|
|
3181
|
-
|
|
3182
|
-
/***/ 25963:
|
|
3183
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3184
|
-
|
|
3185
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3186
|
-
/* harmony export */ A: () => (/* binding */ angleBetweenLines)
|
|
3187
|
-
/* harmony export */ });
|
|
3188
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
|
|
3189
|
-
|
|
3190
|
-
function angleBetween3DLines(line1, line2) {
|
|
3191
|
-
const [p1, p2] = line1;
|
|
3192
|
-
const [p3, p4] = line2;
|
|
3193
|
-
const v1 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.sub */ .eR.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create(), p2, p1);
|
|
3194
|
-
const v2 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.sub */ .eR.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create(), p3, p4);
|
|
3195
|
-
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.dot */ .eR.dot(v1, v2);
|
|
3196
|
-
const v1Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.length */ .eR.length(v1);
|
|
3197
|
-
const v2Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.length */ .eR.length(v2);
|
|
3198
|
-
const cos = dot / (v1Length * v2Length);
|
|
3199
|
-
const radian = Math.acos(cos);
|
|
3200
|
-
return (radian * 180) / Math.PI;
|
|
3201
|
-
}
|
|
3202
|
-
function angleBetween2DLines(line1, line2) {
|
|
3203
|
-
const [p1, p2] = line1;
|
|
3204
|
-
const [p3, p4] = line2;
|
|
3205
|
-
const v1 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.sub */ .Zc.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p2, p1);
|
|
3206
|
-
const v2 = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.sub */ .Zc.sub(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p3, p4);
|
|
3207
|
-
const dot = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.dot */ .Zc.dot(v1, v2);
|
|
3208
|
-
const v1Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.length */ .Zc.length(v1);
|
|
3209
|
-
const v2Length = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.length */ .Zc.length(v2);
|
|
3210
|
-
const cos = dot / (v1Length * v2Length);
|
|
3211
|
-
return Math.acos(cos) * (180 / Math.PI);
|
|
3212
|
-
}
|
|
3213
|
-
function angleBetweenLines(line1, line2) {
|
|
3214
|
-
const is3D = line1[0].length === 3;
|
|
3215
|
-
return is3D
|
|
3216
|
-
? angleBetween3DLines(line1, line2)
|
|
3217
|
-
: angleBetween2DLines(line1, line2);
|
|
3218
|
-
}
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
/***/ }),
|
|
3222
|
-
|
|
3223
|
-
/***/ 83923:
|
|
3224
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3225
|
-
|
|
3226
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3227
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3228
|
-
/* harmony export */ angleBetweenLines: () => (/* reexport safe */ _angleBetweenLines__WEBPACK_IMPORTED_MODULE_0__.A)
|
|
3229
|
-
/* harmony export */ });
|
|
3230
|
-
/* harmony import */ var _angleBetweenLines__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25963);
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
/***/ }),
|
|
3236
|
-
|
|
3237
|
-
/***/ 28364:
|
|
3238
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3239
|
-
|
|
3240
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3241
|
-
/* harmony export */ I: () => (/* binding */ InstanceCalculator),
|
|
3242
|
-
/* harmony export */ t: () => (/* binding */ Calculator)
|
|
3243
|
-
/* harmony export */ });
|
|
3244
|
-
class Calculator {
|
|
3245
|
-
}
|
|
3246
|
-
class InstanceCalculator {
|
|
3247
|
-
constructor(options) {
|
|
3248
|
-
this.storePointData = options.storePointData;
|
|
3249
|
-
}
|
|
3250
|
-
getStatistics() {
|
|
3251
|
-
console.debug('InstanceCalculator getStatistics called');
|
|
3252
|
-
}
|
|
3253
|
-
}
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
/***/ }),
|
|
3030
|
+
/***/ },
|
|
3257
3031
|
|
|
3258
|
-
/***/
|
|
3259
|
-
|
|
3032
|
+
/***/ 11256
|
|
3033
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3260
3034
|
|
|
3261
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3262
3035
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3263
|
-
/* harmony export */
|
|
3264
|
-
/* harmony export */ Calculator: () => (/* reexport safe */ _Calculator__WEBPACK_IMPORTED_MODULE_1__.t),
|
|
3265
|
-
/* harmony export */ InstanceBasicStatsCalculator: () => (/* reexport safe */ _BasicStatsCalculator__WEBPACK_IMPORTED_MODULE_0__.B),
|
|
3266
|
-
/* harmony export */ InstanceCalculator: () => (/* reexport safe */ _Calculator__WEBPACK_IMPORTED_MODULE_1__.I)
|
|
3036
|
+
/* harmony export */ A: () => (/* binding */ getCanvasCircleCorners)
|
|
3267
3037
|
/* harmony export */ });
|
|
3268
|
-
/* harmony import */ var
|
|
3269
|
-
/* harmony import */ var _Calculator__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28364);
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
/***/ }),
|
|
3276
|
-
|
|
3277
|
-
/***/ 77081:
|
|
3278
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3279
|
-
|
|
3280
|
-
// ESM COMPAT FLAG
|
|
3281
|
-
__webpack_require__.r(__webpack_exports__);
|
|
3282
|
-
|
|
3283
|
-
// EXPORTS
|
|
3284
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
3285
|
-
getCanvasCircleCorners: () => (/* reexport */ getCanvasCircleCorners),
|
|
3286
|
-
getCanvasCircleRadius: () => (/* reexport */ getCanvasCircleRadius)
|
|
3287
|
-
});
|
|
3288
|
-
|
|
3289
|
-
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/index.js + 3 modules
|
|
3290
|
-
var point = __webpack_require__(82216);
|
|
3291
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/circle/getCanvasCircleRadius.js
|
|
3292
|
-
|
|
3293
|
-
function getCanvasCircleRadius(circleCanvasPoints) {
|
|
3294
|
-
const [center, end] = circleCanvasPoints;
|
|
3295
|
-
return (0,point.distanceToPoint)(center, end);
|
|
3296
|
-
}
|
|
3297
|
-
|
|
3298
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/circle/getCanvasCircleCorners.js
|
|
3038
|
+
/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5767);
|
|
3299
3039
|
|
|
3300
3040
|
function getCanvasCircleCorners(circleCanvasPoints) {
|
|
3301
3041
|
const [center, end] = circleCanvasPoints;
|
|
3302
|
-
const radius = (0,
|
|
3042
|
+
const radius = (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPoint)(center, end);
|
|
3303
3043
|
const topLeft = [center[0] - radius, center[1] - radius];
|
|
3304
3044
|
const bottomRight = [center[0] + radius, center[1] + radius];
|
|
3305
3045
|
return [topLeft, bottomRight];
|
|
3306
3046
|
}
|
|
3307
3047
|
|
|
3308
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/circle/index.js
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
3048
|
|
|
3049
|
+
/***/ },
|
|
3312
3050
|
|
|
3051
|
+
/***/ 76090
|
|
3052
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3313
3053
|
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3054
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3055
|
+
/* harmony export */ A: () => (/* binding */ getCanvasCircleRadius)
|
|
3056
|
+
/* harmony export */ });
|
|
3057
|
+
/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5767);
|
|
3318
3058
|
|
|
3319
|
-
|
|
3320
|
-
|
|
3059
|
+
function getCanvasCircleRadius(circleCanvasPoints) {
|
|
3060
|
+
const [center, end] = circleCanvasPoints;
|
|
3061
|
+
return (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPoint)(center, end);
|
|
3062
|
+
}
|
|
3321
3063
|
|
|
3322
|
-
// EXPORTS
|
|
3323
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
3324
|
-
getCanvasEllipseCorners: () => (/* reexport */ getCanvasEllipseCorners),
|
|
3325
|
-
pointInEllipse: () => (/* reexport */ pointInEllipse),
|
|
3326
|
-
precalculatePointInEllipse: () => (/* reexport */ precalculatePointInEllipse)
|
|
3327
|
-
});
|
|
3328
3064
|
|
|
3329
|
-
|
|
3330
|
-
function pointInEllipse(ellipse, pointLPS, inverts = {}) {
|
|
3331
|
-
if (!inverts.precalculated) {
|
|
3332
|
-
precalculatePointInEllipse(ellipse, inverts);
|
|
3333
|
-
}
|
|
3334
|
-
return inverts.precalculated(pointLPS);
|
|
3335
|
-
}
|
|
3336
|
-
const precalculatePointInEllipse = (ellipse, inverts = {}) => {
|
|
3337
|
-
const { xRadius, yRadius, zRadius } = ellipse;
|
|
3338
|
-
if (inverts.invXRadiusSq === undefined ||
|
|
3339
|
-
inverts.invYRadiusSq === undefined ||
|
|
3340
|
-
inverts.invZRadiusSq === undefined) {
|
|
3341
|
-
inverts.invXRadiusSq = xRadius !== 0 ? 1 / xRadius ** 2 : 0;
|
|
3342
|
-
inverts.invYRadiusSq = yRadius !== 0 ? 1 / yRadius ** 2 : 0;
|
|
3343
|
-
inverts.invZRadiusSq = zRadius !== 0 ? 1 / zRadius ** 2 : 0;
|
|
3344
|
-
}
|
|
3345
|
-
const { invXRadiusSq, invYRadiusSq, invZRadiusSq } = inverts;
|
|
3346
|
-
const { center } = ellipse;
|
|
3347
|
-
const [centerL, centerP, centerS] = center;
|
|
3348
|
-
inverts.precalculated = (pointLPS) => {
|
|
3349
|
-
const dx = pointLPS[0] - centerL;
|
|
3350
|
-
let inside = dx * dx * invXRadiusSq;
|
|
3351
|
-
if (inside > 1) {
|
|
3352
|
-
return false;
|
|
3353
|
-
}
|
|
3354
|
-
const dy = pointLPS[1] - centerP;
|
|
3355
|
-
inside += dy * dy * invYRadiusSq;
|
|
3356
|
-
if (inside > 1) {
|
|
3357
|
-
return false;
|
|
3358
|
-
}
|
|
3359
|
-
const dz = pointLPS[2] - centerS;
|
|
3360
|
-
inside += dz * dz * invZRadiusSq;
|
|
3361
|
-
return inside <= 1;
|
|
3362
|
-
};
|
|
3363
|
-
return inverts;
|
|
3364
|
-
};
|
|
3065
|
+
/***/ },
|
|
3365
3066
|
|
|
3067
|
+
/***/ 2222
|
|
3068
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3366
3069
|
|
|
3367
|
-
|
|
3070
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3071
|
+
/* harmony export */ A: () => (/* binding */ getCanvasEllipseCorners)
|
|
3072
|
+
/* harmony export */ });
|
|
3368
3073
|
function getCanvasEllipseCorners(ellipseCanvasPoints) {
|
|
3369
3074
|
const [bottom, top, left, right] = ellipseCanvasPoints;
|
|
3370
3075
|
const topLeft = [left[0], top[1]];
|
|
@@ -3372,16 +3077,11 @@ function getCanvasEllipseCorners(ellipseCanvasPoints) {
|
|
|
3372
3077
|
return [topLeft, bottomRight];
|
|
3373
3078
|
}
|
|
3374
3079
|
|
|
3375
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/ellipse/index.js
|
|
3376
|
-
|
|
3377
3080
|
|
|
3081
|
+
/***/ },
|
|
3378
3082
|
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
/***/ }),
|
|
3382
|
-
|
|
3383
|
-
/***/ 17787:
|
|
3384
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3083
|
+
/***/ 17787
|
|
3084
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3385
3085
|
|
|
3386
3086
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3387
3087
|
/* harmony export */ IM: () => (/* binding */ clipInterval),
|
|
@@ -3492,93 +3192,10 @@ function calculateInnerFanPercentage(center, outerFanPairs, innerFanPairs) {
|
|
|
3492
3192
|
}
|
|
3493
3193
|
|
|
3494
3194
|
|
|
3495
|
-
/***/ }
|
|
3496
|
-
|
|
3497
|
-
/***/ 18989:
|
|
3498
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3499
|
-
|
|
3500
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3501
|
-
/* harmony export */ A: () => (/* binding */ distanceToPointSquared)
|
|
3502
|
-
/* harmony export */ });
|
|
3503
|
-
/* harmony import */ var _distanceToPointSquaredInfo__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(73149);
|
|
3504
|
-
|
|
3505
|
-
function distanceToPointSquared(lineStart, lineEnd, point) {
|
|
3506
|
-
return (0,_distanceToPointSquaredInfo__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(lineStart, lineEnd, point).distanceSquared;
|
|
3507
|
-
}
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
/***/ }),
|
|
3511
|
-
|
|
3512
|
-
/***/ 73149:
|
|
3513
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3514
|
-
|
|
3515
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3516
|
-
/* harmony export */ A: () => (/* binding */ distanceToPointSquaredInfo)
|
|
3517
|
-
/* harmony export */ });
|
|
3518
|
-
/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82216);
|
|
3519
|
-
|
|
3520
|
-
function distanceToPointSquaredInfo(lineStart, lineEnd, point) {
|
|
3521
|
-
let closestPoint;
|
|
3522
|
-
const distanceSquared = (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared)(lineStart, lineEnd);
|
|
3523
|
-
if (lineStart[0] === lineEnd[0] && lineStart[1] === lineEnd[1]) {
|
|
3524
|
-
closestPoint = lineStart;
|
|
3525
|
-
}
|
|
3526
|
-
if (!closestPoint) {
|
|
3527
|
-
const dotProduct = ((point[0] - lineStart[0]) * (lineEnd[0] - lineStart[0]) +
|
|
3528
|
-
(point[1] - lineStart[1]) * (lineEnd[1] - lineStart[1])) /
|
|
3529
|
-
distanceSquared;
|
|
3530
|
-
if (dotProduct < 0) {
|
|
3531
|
-
closestPoint = lineStart;
|
|
3532
|
-
}
|
|
3533
|
-
else if (dotProduct > 1) {
|
|
3534
|
-
closestPoint = lineEnd;
|
|
3535
|
-
}
|
|
3536
|
-
else {
|
|
3537
|
-
closestPoint = [
|
|
3538
|
-
lineStart[0] + dotProduct * (lineEnd[0] - lineStart[0]),
|
|
3539
|
-
lineStart[1] + dotProduct * (lineEnd[1] - lineStart[1]),
|
|
3540
|
-
];
|
|
3541
|
-
}
|
|
3542
|
-
}
|
|
3543
|
-
return {
|
|
3544
|
-
point: [...closestPoint],
|
|
3545
|
-
distanceSquared: (0,_point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared)(point, closestPoint),
|
|
3546
|
-
};
|
|
3547
|
-
}
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
/***/ }),
|
|
3551
|
-
|
|
3552
|
-
/***/ 91818:
|
|
3553
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3554
|
-
|
|
3555
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3556
|
-
/* harmony export */ A: () => (/* binding */ isPointOnLineSegment)
|
|
3557
|
-
/* harmony export */ });
|
|
3558
|
-
const ORIENTATION_TOLERANCE = 1e-2;
|
|
3559
|
-
function isPointOnLineSegment(lineStart, lineEnd, point) {
|
|
3560
|
-
const minX = lineStart[0] <= lineEnd[0] ? lineStart[0] : lineEnd[0];
|
|
3561
|
-
const maxX = lineStart[0] >= lineEnd[0] ? lineStart[0] : lineEnd[0];
|
|
3562
|
-
const minY = lineStart[1] <= lineEnd[1] ? lineStart[1] : lineEnd[1];
|
|
3563
|
-
const maxY = lineStart[1] >= lineEnd[1] ? lineStart[1] : lineEnd[1];
|
|
3564
|
-
const aabbContainsPoint = point[0] >= minX - ORIENTATION_TOLERANCE &&
|
|
3565
|
-
point[0] <= maxX + ORIENTATION_TOLERANCE &&
|
|
3566
|
-
point[1] >= minY - ORIENTATION_TOLERANCE &&
|
|
3567
|
-
point[1] <= maxY + ORIENTATION_TOLERANCE;
|
|
3568
|
-
if (!aabbContainsPoint) {
|
|
3569
|
-
return false;
|
|
3570
|
-
}
|
|
3571
|
-
const orientation = (lineEnd[1] - lineStart[1]) * (point[0] - lineEnd[0]) -
|
|
3572
|
-
(lineEnd[0] - lineStart[0]) * (point[1] - lineEnd[1]);
|
|
3573
|
-
const absOrientation = orientation >= 0 ? orientation : -orientation;
|
|
3574
|
-
return absOrientation <= ORIENTATION_TOLERANCE;
|
|
3575
|
-
}
|
|
3576
|
-
|
|
3577
|
-
|
|
3578
|
-
/***/ }),
|
|
3195
|
+
/***/ },
|
|
3579
3196
|
|
|
3580
|
-
/***/ 82983
|
|
3581
|
-
|
|
3197
|
+
/***/ 82983
|
|
3198
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3582
3199
|
|
|
3583
3200
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3584
3201
|
/* harmony export */ f: () => (/* binding */ midPoint2)
|
|
@@ -3600,10 +3217,10 @@ const midPoint2 = midPoint;
|
|
|
3600
3217
|
|
|
3601
3218
|
|
|
3602
3219
|
|
|
3603
|
-
/***/ }
|
|
3220
|
+
/***/ },
|
|
3604
3221
|
|
|
3605
|
-
/***/
|
|
3606
|
-
|
|
3222
|
+
/***/ 5767
|
|
3223
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3607
3224
|
|
|
3608
3225
|
// ESM COMPAT FLAG
|
|
3609
3226
|
__webpack_require__.r(__webpack_exports__);
|
|
@@ -3611,1191 +3228,108 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3611
3228
|
// EXPORTS
|
|
3612
3229
|
__webpack_require__.d(__webpack_exports__, {
|
|
3613
3230
|
distanceToPoint: () => (/* reexport */ distanceToPoint),
|
|
3614
|
-
distanceToPointSquared: () => (/* reexport */ distanceToPointSquared),
|
|
3615
|
-
mirror: () => (/* reexport */ mirror)
|
|
3231
|
+
distanceToPointSquared: () => (/* reexport */ distanceToPointSquared/* default */.A),
|
|
3232
|
+
mirror: () => (/* reexport */ mirror/* default */.A)
|
|
3616
3233
|
});
|
|
3617
3234
|
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
if (p1.length !== p2.length) {
|
|
3621
|
-
throw Error('Both points should have the same dimensionality');
|
|
3622
|
-
}
|
|
3623
|
-
const [x1, y1, z1 = 0] = p1;
|
|
3624
|
-
const [x2, y2, z2 = 0] = p2;
|
|
3625
|
-
const dx = x2 - x1;
|
|
3626
|
-
const dy = y2 - y1;
|
|
3627
|
-
const dz = z2 - z1;
|
|
3628
|
-
return dx * dx + dy * dy + dz * dz;
|
|
3629
|
-
}
|
|
3630
|
-
|
|
3235
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/distanceToPointSquared.js
|
|
3236
|
+
var distanceToPointSquared = __webpack_require__(31489);
|
|
3631
3237
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/distanceToPoint.js
|
|
3632
3238
|
|
|
3633
3239
|
function distanceToPoint(p1, p2) {
|
|
3634
|
-
return Math.sqrt(distanceToPointSquared(p1, p2));
|
|
3635
|
-
}
|
|
3636
|
-
|
|
3637
|
-
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/mirror.js
|
|
3638
|
-
function mirror(mirrorPoint, staticPoint) {
|
|
3639
|
-
const [x1, y1] = mirrorPoint;
|
|
3640
|
-
const [x2, y2] = staticPoint;
|
|
3641
|
-
const newX = 2 * x2 - x1;
|
|
3642
|
-
const newY = 2 * y2 - y1;
|
|
3643
|
-
return [newX, newY];
|
|
3240
|
+
return Math.sqrt((0,distanceToPointSquared/* default */.A)(p1, p2));
|
|
3644
3241
|
}
|
|
3645
3242
|
|
|
3243
|
+
// EXTERNAL MODULE: ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/mirror.js
|
|
3244
|
+
var mirror = __webpack_require__(83483);
|
|
3646
3245
|
;// ../../../node_modules/@cornerstonejs/tools/dist/esm/utilities/math/point/index.js
|
|
3647
3246
|
|
|
3648
3247
|
|
|
3649
3248
|
|
|
3650
3249
|
|
|
3651
3250
|
|
|
3652
|
-
/***/ }
|
|
3251
|
+
/***/ },
|
|
3653
3252
|
|
|
3654
|
-
/***/
|
|
3655
|
-
|
|
3253
|
+
/***/ 98122
|
|
3254
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3656
3255
|
|
|
3657
3256
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3658
|
-
/* harmony export */ A: () => (
|
|
3257
|
+
/* harmony export */ A: () => (/* binding */ getAABB)
|
|
3659
3258
|
/* harmony export */ });
|
|
3660
|
-
|
|
3661
|
-
|
|
3662
|
-
|
|
3663
|
-
|
|
3664
|
-
|
|
3665
|
-
|
|
3666
|
-
|
|
3667
|
-
|
|
3668
|
-
|
|
3669
|
-
|
|
3670
|
-
|
|
3671
|
-
|
|
3672
|
-
|
|
3673
|
-
|
|
3674
|
-
|
|
3675
|
-
|
|
3676
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.subtract */ .eR.subtract(worldPosDiff, newWorldPos, lastWorldPos);
|
|
3677
|
-
const xDist = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(worldPosDiff, xDir));
|
|
3678
|
-
const yDist = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(worldPosDiff, yDir));
|
|
3679
|
-
const numPointsToAdd = Math.max(Math.floor(xDist / spacing[0]), Math.floor(yDist / spacing[0]));
|
|
3680
|
-
if (numPointsToAdd > 1) {
|
|
3681
|
-
const lastCanvasPoint = canvasPoints[canvasPoints.length - 1];
|
|
3682
|
-
const canvasDist = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dist */ .Zc.dist(lastCanvasPoint, newCanvasPoint);
|
|
3683
|
-
const canvasDir = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create();
|
|
3684
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(canvasDir, newCanvasPoint, lastCanvasPoint);
|
|
3685
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.set */ .Zc.set(canvasDir, canvasDir[0] / canvasDist, canvasDir[1] / canvasDist);
|
|
3686
|
-
const distPerPoint = canvasDist / numPointsToAdd;
|
|
3687
|
-
for (let i = 1; i <= numPointsToAdd; i++) {
|
|
3688
|
-
canvasPoints.push([
|
|
3689
|
-
lastCanvasPoint[0] + distPerPoint * canvasDir[0] * i,
|
|
3690
|
-
lastCanvasPoint[1] + distPerPoint * canvasDir[1] * i,
|
|
3691
|
-
]);
|
|
3259
|
+
function getAABB(polyline, options) {
|
|
3260
|
+
let polylineToUse = polyline;
|
|
3261
|
+
const numDimensions = options?.numDimensions || 2;
|
|
3262
|
+
const is3D = numDimensions === 3;
|
|
3263
|
+
if (!Array.isArray(polyline[0])) {
|
|
3264
|
+
const currentPolyline = polyline;
|
|
3265
|
+
const totalPoints = currentPolyline.length / numDimensions;
|
|
3266
|
+
polylineToUse = new Array(currentPolyline.length / numDimensions);
|
|
3267
|
+
for (let i = 0, len = totalPoints; i < len; i++) {
|
|
3268
|
+
polylineToUse[i] = [
|
|
3269
|
+
currentPolyline[i * numDimensions],
|
|
3270
|
+
currentPolyline[i * numDimensions + 1],
|
|
3271
|
+
];
|
|
3272
|
+
if (is3D) {
|
|
3273
|
+
polylineToUse[i].push(currentPolyline[i * numDimensions + 2]);
|
|
3274
|
+
}
|
|
3692
3275
|
}
|
|
3693
3276
|
}
|
|
3694
|
-
|
|
3695
|
-
|
|
3277
|
+
let minX = Infinity;
|
|
3278
|
+
let minY = Infinity;
|
|
3279
|
+
let maxX = -Infinity;
|
|
3280
|
+
let maxY = -Infinity;
|
|
3281
|
+
let minZ = Infinity;
|
|
3282
|
+
let maxZ = -Infinity;
|
|
3283
|
+
polylineToUse = polylineToUse;
|
|
3284
|
+
for (let i = 0, len = polylineToUse.length; i < len; i++) {
|
|
3285
|
+
const [x, y, z] = polylineToUse[i];
|
|
3286
|
+
minX = minX < x ? minX : x;
|
|
3287
|
+
minY = minY < y ? minY : y;
|
|
3288
|
+
maxX = maxX > x ? maxX : x;
|
|
3289
|
+
maxY = maxY > y ? maxY : y;
|
|
3290
|
+
if (is3D) {
|
|
3291
|
+
minZ = minZ < z ? minZ : z;
|
|
3292
|
+
maxZ = maxZ > z ? maxZ : z;
|
|
3293
|
+
}
|
|
3696
3294
|
}
|
|
3697
|
-
return
|
|
3698
|
-
}
|
|
3699
|
-
|
|
3295
|
+
return is3D
|
|
3296
|
+
? { minX, maxX, minY, maxY, minZ, maxZ }
|
|
3297
|
+
: { minX, maxX, minY, maxY };
|
|
3298
|
+
}
|
|
3700
3299
|
|
|
3701
3300
|
|
|
3702
|
-
/***/ }
|
|
3301
|
+
/***/ },
|
|
3703
3302
|
|
|
3704
|
-
/***/
|
|
3705
|
-
|
|
3303
|
+
/***/ 50932
|
|
3304
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3706
3305
|
|
|
3707
3306
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3708
|
-
/* harmony export */ A: () => (/* binding */
|
|
3307
|
+
/* harmony export */ A: () => (/* binding */ getLineSegmentIntersectionsCoordinates)
|
|
3709
3308
|
/* harmony export */ });
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
const
|
|
3716
|
-
const
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
line1MinY > line2MaxY ||
|
|
3723
|
-
line1MaxY < line2MinY) {
|
|
3724
|
-
return false;
|
|
3725
|
-
}
|
|
3726
|
-
const orient = [
|
|
3727
|
-
orientation(p1, q1, p2),
|
|
3728
|
-
orientation(p1, q1, q2),
|
|
3729
|
-
orientation(p2, q2, p1),
|
|
3730
|
-
orientation(p2, q2, q1),
|
|
3731
|
-
];
|
|
3732
|
-
if (orient[0] !== orient[1] && orient[2] !== orient[3]) {
|
|
3733
|
-
return true;
|
|
3734
|
-
}
|
|
3735
|
-
if (orient[0] === 0 && onSegment(p1, p2, q1)) {
|
|
3736
|
-
result = true;
|
|
3737
|
-
}
|
|
3738
|
-
else if (orient[1] === 0 && onSegment(p1, q2, q1)) {
|
|
3739
|
-
result = true;
|
|
3740
|
-
}
|
|
3741
|
-
else if (orient[2] === 0 && onSegment(p2, p1, q2)) {
|
|
3742
|
-
result = true;
|
|
3743
|
-
}
|
|
3744
|
-
else if (orient[3] === 0 && onSegment(p2, q1, q2)) {
|
|
3745
|
-
result = true;
|
|
3309
|
+
/* harmony import */ var _getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37135);
|
|
3310
|
+
/* harmony import */ var _getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10812);
|
|
3311
|
+
|
|
3312
|
+
|
|
3313
|
+
function getLineSegmentIntersectionsCoordinates(points, p1, q1, closed = true) {
|
|
3314
|
+
const result = [];
|
|
3315
|
+
const polylineIndexes = (0,_getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(points, p1, q1, closed);
|
|
3316
|
+
for (let i = 0; i < polylineIndexes.length; i++) {
|
|
3317
|
+
const p2 = points[polylineIndexes[i][0]];
|
|
3318
|
+
const q2 = points[polylineIndexes[i][1]];
|
|
3319
|
+
const intersection = (0,_getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(p1, q1, p2, q2);
|
|
3320
|
+
result.push(intersection);
|
|
3746
3321
|
}
|
|
3747
3322
|
return result;
|
|
3748
3323
|
}
|
|
3749
|
-
function orientation(p, q, r) {
|
|
3750
|
-
const orientationValue = (q[1] - p[1]) * (r[0] - q[0]) - (q[0] - p[0]) * (r[1] - q[1]);
|
|
3751
|
-
if (orientationValue === 0) {
|
|
3752
|
-
return 0;
|
|
3753
|
-
}
|
|
3754
|
-
return orientationValue > 0 ? 1 : 2;
|
|
3755
|
-
}
|
|
3756
|
-
function onSegment(p, q, r) {
|
|
3757
|
-
if (q[0] <= Math.max(p[0], r[0]) &&
|
|
3758
|
-
q[0] >= Math.min(p[0], r[0]) &&
|
|
3759
|
-
q[1] <= Math.max(p[1], r[1]) &&
|
|
3760
|
-
q[1] >= Math.min(p[1], r[1])) {
|
|
3761
|
-
return true;
|
|
3762
|
-
}
|
|
3763
|
-
return false;
|
|
3764
|
-
}
|
|
3765
3324
|
|
|
3766
3325
|
|
|
3767
|
-
/***/ }
|
|
3326
|
+
/***/ },
|
|
3768
3327
|
|
|
3769
|
-
/***/
|
|
3770
|
-
|
|
3328
|
+
/***/ 8361
|
|
3329
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3771
3330
|
|
|
3772
3331
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3773
|
-
/* harmony export */
|
|
3774
|
-
/* harmony export */ });
|
|
3775
|
-
/* harmony import */ var _point__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82216);
|
|
3776
|
-
/* harmony import */ var _getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(37135);
|
|
3777
|
-
/* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(46513);
|
|
3778
|
-
/* harmony import */ var _containsPoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(42436);
|
|
3779
|
-
/* harmony import */ var _intersectPolyline__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(405);
|
|
3780
|
-
/* harmony import */ var _getNormal2__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(11377);
|
|
3781
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3823);
|
|
3782
|
-
/* harmony import */ var _getLinesIntersection__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(10812);
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3786
|
-
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
var PolylinePointType;
|
|
3792
|
-
(function (PolylinePointType) {
|
|
3793
|
-
PolylinePointType[PolylinePointType["Vertex"] = 0] = "Vertex";
|
|
3794
|
-
PolylinePointType[PolylinePointType["Intersection"] = 1] = "Intersection";
|
|
3795
|
-
})(PolylinePointType || (PolylinePointType = {}));
|
|
3796
|
-
var PolylinePointPosition;
|
|
3797
|
-
(function (PolylinePointPosition) {
|
|
3798
|
-
PolylinePointPosition[PolylinePointPosition["Outside"] = -1] = "Outside";
|
|
3799
|
-
PolylinePointPosition[PolylinePointPosition["Edge"] = 0] = "Edge";
|
|
3800
|
-
PolylinePointPosition[PolylinePointPosition["Inside"] = 1] = "Inside";
|
|
3801
|
-
})(PolylinePointPosition || (PolylinePointPosition = {}));
|
|
3802
|
-
var PolylinePointDirection;
|
|
3803
|
-
(function (PolylinePointDirection) {
|
|
3804
|
-
PolylinePointDirection[PolylinePointDirection["Exiting"] = -1] = "Exiting";
|
|
3805
|
-
PolylinePointDirection[PolylinePointDirection["Unknown"] = 0] = "Unknown";
|
|
3806
|
-
PolylinePointDirection[PolylinePointDirection["Entering"] = 1] = "Entering";
|
|
3807
|
-
})(PolylinePointDirection || (PolylinePointDirection = {}));
|
|
3808
|
-
function ensuresNextPointers(polylinePoints) {
|
|
3809
|
-
for (let i = 0, len = polylinePoints.length; i < len; i++) {
|
|
3810
|
-
const currentPoint = polylinePoints[i];
|
|
3811
|
-
if (!currentPoint.next) {
|
|
3812
|
-
currentPoint.next = polylinePoints[i === len - 1 ? 0 : i + 1];
|
|
3813
|
-
}
|
|
3814
|
-
}
|
|
3815
|
-
}
|
|
3816
|
-
function getSourceAndTargetPointsList(targetPolyline, sourcePolyline) {
|
|
3817
|
-
const targetPolylinePoints = [];
|
|
3818
|
-
const sourcePolylinePoints = [];
|
|
3819
|
-
const sourceIntersectionsCache = new Map();
|
|
3820
|
-
const isFirstPointInside = (0,_containsPoint__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(sourcePolyline, targetPolyline[0]);
|
|
3821
|
-
let intersectionPointDirection = isFirstPointInside
|
|
3822
|
-
? PolylinePointDirection.Exiting
|
|
3823
|
-
: PolylinePointDirection.Entering;
|
|
3824
|
-
for (let i = 0, len = targetPolyline.length; i < len; i++) {
|
|
3825
|
-
const p1 = targetPolyline[i];
|
|
3826
|
-
const pointInside = (0,_containsPoint__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(sourcePolyline, p1);
|
|
3827
|
-
const vertexPoint = {
|
|
3828
|
-
type: PolylinePointType.Vertex,
|
|
3829
|
-
coordinates: p1,
|
|
3830
|
-
position: pointInside
|
|
3831
|
-
? PolylinePointPosition.Inside
|
|
3832
|
-
: PolylinePointPosition.Outside,
|
|
3833
|
-
visited: false,
|
|
3834
|
-
next: null,
|
|
3835
|
-
};
|
|
3836
|
-
targetPolylinePoints.push(vertexPoint);
|
|
3837
|
-
const q1 = targetPolyline[i === len - 1 ? 0 : i + 1];
|
|
3838
|
-
const intersectionsInfo = (0,_getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sourcePolyline, p1, q1).map((intersectedLineSegment) => {
|
|
3839
|
-
const sourceLineSegmentId = intersectedLineSegment[0];
|
|
3840
|
-
const p2 = sourcePolyline[intersectedLineSegment[0]];
|
|
3841
|
-
const q2 = sourcePolyline[intersectedLineSegment[1]];
|
|
3842
|
-
const intersectionCoordinate = (0,_getLinesIntersection__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(p1, q1, p2, q2);
|
|
3843
|
-
const targetStartPointDistSquared = _point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared(p1, intersectionCoordinate);
|
|
3844
|
-
return {
|
|
3845
|
-
sourceLineSegmentId,
|
|
3846
|
-
coordinate: intersectionCoordinate,
|
|
3847
|
-
targetStartPointDistSquared,
|
|
3848
|
-
};
|
|
3849
|
-
});
|
|
3850
|
-
intersectionsInfo.sort((left, right) => left.targetStartPointDistSquared - right.targetStartPointDistSquared);
|
|
3851
|
-
intersectionsInfo.forEach((intersectionInfo) => {
|
|
3852
|
-
const { sourceLineSegmentId, coordinate: intersectionCoordinate } = intersectionInfo;
|
|
3853
|
-
const targetEdgePoint = {
|
|
3854
|
-
type: PolylinePointType.Intersection,
|
|
3855
|
-
coordinates: intersectionCoordinate,
|
|
3856
|
-
position: PolylinePointPosition.Edge,
|
|
3857
|
-
direction: intersectionPointDirection,
|
|
3858
|
-
visited: false,
|
|
3859
|
-
next: null,
|
|
3860
|
-
};
|
|
3861
|
-
const sourceEdgePoint = {
|
|
3862
|
-
...targetEdgePoint,
|
|
3863
|
-
direction: PolylinePointDirection.Unknown,
|
|
3864
|
-
cloned: true,
|
|
3865
|
-
};
|
|
3866
|
-
if (intersectionPointDirection === PolylinePointDirection.Entering) {
|
|
3867
|
-
targetEdgePoint.next = sourceEdgePoint;
|
|
3868
|
-
}
|
|
3869
|
-
else {
|
|
3870
|
-
sourceEdgePoint.next = targetEdgePoint;
|
|
3871
|
-
}
|
|
3872
|
-
let sourceIntersectionPoints = sourceIntersectionsCache.get(sourceLineSegmentId);
|
|
3873
|
-
if (!sourceIntersectionPoints) {
|
|
3874
|
-
sourceIntersectionPoints = [];
|
|
3875
|
-
sourceIntersectionsCache.set(sourceLineSegmentId, sourceIntersectionPoints);
|
|
3876
|
-
}
|
|
3877
|
-
targetPolylinePoints.push(targetEdgePoint);
|
|
3878
|
-
sourceIntersectionPoints.push(sourceEdgePoint);
|
|
3879
|
-
intersectionPointDirection *= -1;
|
|
3880
|
-
});
|
|
3881
|
-
}
|
|
3882
|
-
for (let i = 0, len = sourcePolyline.length; i < len; i++) {
|
|
3883
|
-
const lineSegmentId = i;
|
|
3884
|
-
const p1 = sourcePolyline[i];
|
|
3885
|
-
const vertexPoint = {
|
|
3886
|
-
type: PolylinePointType.Vertex,
|
|
3887
|
-
coordinates: p1,
|
|
3888
|
-
visited: false,
|
|
3889
|
-
next: null,
|
|
3890
|
-
};
|
|
3891
|
-
sourcePolylinePoints.push(vertexPoint);
|
|
3892
|
-
const sourceIntersectionPoints = sourceIntersectionsCache.get(lineSegmentId);
|
|
3893
|
-
if (!sourceIntersectionPoints?.length) {
|
|
3894
|
-
continue;
|
|
3895
|
-
}
|
|
3896
|
-
sourceIntersectionPoints
|
|
3897
|
-
.map((intersectionPoint) => ({
|
|
3898
|
-
intersectionPoint,
|
|
3899
|
-
lineSegStartDistSquared: _point__WEBPACK_IMPORTED_MODULE_0__.distanceToPointSquared(p1, intersectionPoint.coordinates),
|
|
3900
|
-
}))
|
|
3901
|
-
.sort((left, right) => left.lineSegStartDistSquared - right.lineSegStartDistSquared)
|
|
3902
|
-
.map(({ intersectionPoint }) => intersectionPoint)
|
|
3903
|
-
.forEach((intersectionPoint) => sourcePolylinePoints.push(intersectionPoint));
|
|
3904
|
-
}
|
|
3905
|
-
ensuresNextPointers(targetPolylinePoints);
|
|
3906
|
-
ensuresNextPointers(sourcePolylinePoints);
|
|
3907
|
-
return { targetPolylinePoints, sourcePolylinePoints };
|
|
3908
|
-
}
|
|
3909
|
-
function getUnvisitedOutsidePoint(polylinePoints) {
|
|
3910
|
-
for (let i = 0, len = polylinePoints.length; i < len; i++) {
|
|
3911
|
-
const point = polylinePoints[i];
|
|
3912
|
-
if (!point.visited &&
|
|
3913
|
-
point.position === PolylinePointPosition.Outside &&
|
|
3914
|
-
point.type === PolylinePointType.Vertex) {
|
|
3915
|
-
return point;
|
|
3916
|
-
}
|
|
3917
|
-
}
|
|
3918
|
-
for (let i = 0, len = polylinePoints.length; i < len; i++) {
|
|
3919
|
-
const point = polylinePoints[i];
|
|
3920
|
-
if (!point.visited && point.position === PolylinePointPosition.Outside) {
|
|
3921
|
-
return point;
|
|
3922
|
-
}
|
|
3923
|
-
}
|
|
3924
|
-
return undefined;
|
|
3925
|
-
}
|
|
3926
|
-
function mergePolylines(targetPolyline, sourcePolyline) {
|
|
3927
|
-
const targetNormal = (0,_getNormal2__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(targetPolyline);
|
|
3928
|
-
const sourceNormal = (0,_getNormal2__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(sourcePolyline);
|
|
3929
|
-
const dotNormals = gl_matrix__WEBPACK_IMPORTED_MODULE_6__/* .vec3.dot */ .eR.dot(sourceNormal, targetNormal);
|
|
3930
|
-
if (!gl_matrix__WEBPACK_IMPORTED_MODULE_6__/* .glMatrix.equals */ .Fd.equals(1, dotNormals)) {
|
|
3931
|
-
sourcePolyline = sourcePolyline.slice().reverse();
|
|
3932
|
-
}
|
|
3933
|
-
const lineSegmentsIntersect = (0,_intersectPolyline__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(sourcePolyline, targetPolyline);
|
|
3934
|
-
const targetContainedInSource = !lineSegmentsIntersect && (0,_containsPoints__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(sourcePolyline, targetPolyline);
|
|
3935
|
-
if (targetContainedInSource) {
|
|
3936
|
-
return sourcePolyline.slice();
|
|
3937
|
-
}
|
|
3938
|
-
const { targetPolylinePoints } = getSourceAndTargetPointsList(targetPolyline, sourcePolyline);
|
|
3939
|
-
const startPoint = getUnvisitedOutsidePoint(targetPolylinePoints);
|
|
3940
|
-
if (!startPoint) {
|
|
3941
|
-
return targetPolyline.slice();
|
|
3942
|
-
}
|
|
3943
|
-
const mergedPolyline = [startPoint.coordinates];
|
|
3944
|
-
let currentPoint = startPoint.next;
|
|
3945
|
-
let iterationCount = 0;
|
|
3946
|
-
const maxIterations = targetPolyline.length + sourcePolyline.length + 1000;
|
|
3947
|
-
while (currentPoint !== startPoint && iterationCount < maxIterations) {
|
|
3948
|
-
iterationCount++;
|
|
3949
|
-
if (currentPoint.type === PolylinePointType.Intersection &&
|
|
3950
|
-
currentPoint.cloned) {
|
|
3951
|
-
currentPoint = currentPoint.next;
|
|
3952
|
-
continue;
|
|
3953
|
-
}
|
|
3954
|
-
mergedPolyline.push(currentPoint.coordinates);
|
|
3955
|
-
currentPoint = currentPoint.next;
|
|
3956
|
-
if (!currentPoint) {
|
|
3957
|
-
console.warn('Broken linked list detected in mergePolylines, breaking loop');
|
|
3958
|
-
break;
|
|
3959
|
-
}
|
|
3960
|
-
}
|
|
3961
|
-
if (iterationCount >= maxIterations) {
|
|
3962
|
-
console.warn('Maximum iterations reached in mergePolylines, possible infinite loop detected');
|
|
3963
|
-
}
|
|
3964
|
-
return mergedPolyline;
|
|
3965
|
-
}
|
|
3966
|
-
|
|
3967
|
-
|
|
3968
|
-
|
|
3969
|
-
/***/ }),
|
|
3970
|
-
|
|
3971
|
-
/***/ 46513:
|
|
3972
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
3973
|
-
|
|
3974
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3975
|
-
/* harmony export */ A: () => (/* binding */ containsPoint)
|
|
3976
|
-
/* harmony export */ });
|
|
3977
|
-
/* harmony import */ var _isClosed__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19246);
|
|
3978
|
-
|
|
3979
|
-
function containsPoint(polyline, point, options = {
|
|
3980
|
-
closed: undefined,
|
|
3981
|
-
}) {
|
|
3982
|
-
if (polyline.length < 3) {
|
|
3983
|
-
return false;
|
|
3984
|
-
}
|
|
3985
|
-
const numPolylinePoints = polyline.length;
|
|
3986
|
-
let numIntersections = 0;
|
|
3987
|
-
const { closed, holes } = options;
|
|
3988
|
-
if (holes?.length) {
|
|
3989
|
-
for (const hole of holes) {
|
|
3990
|
-
if (containsPoint(hole, point)) {
|
|
3991
|
-
return false;
|
|
3992
|
-
}
|
|
3993
|
-
}
|
|
3994
|
-
}
|
|
3995
|
-
const shouldClose = !(closed === undefined ? (0,_isClosed__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(polyline) : closed);
|
|
3996
|
-
const maxSegmentIndex = polyline.length - (shouldClose ? 1 : 2);
|
|
3997
|
-
for (let i = 0; i <= maxSegmentIndex; i++) {
|
|
3998
|
-
const p1 = polyline[i];
|
|
3999
|
-
const p2Index = i === numPolylinePoints - 1 ? 0 : i + 1;
|
|
4000
|
-
const p2 = polyline[p2Index];
|
|
4001
|
-
const maxX = p1[0] >= p2[0] ? p1[0] : p2[0];
|
|
4002
|
-
const maxY = p1[1] >= p2[1] ? p1[1] : p2[1];
|
|
4003
|
-
const minY = p1[1] <= p2[1] ? p1[1] : p2[1];
|
|
4004
|
-
const mayIntersectLineSegment = point[0] <= maxX && point[1] >= minY && point[1] < maxY;
|
|
4005
|
-
if (mayIntersectLineSegment) {
|
|
4006
|
-
const isVerticalLine = p1[0] === p2[0];
|
|
4007
|
-
let intersects = isVerticalLine;
|
|
4008
|
-
if (!intersects) {
|
|
4009
|
-
const xIntersection = ((point[1] - p1[1]) * (p2[0] - p1[0])) / (p2[1] - p1[1]) + p1[0];
|
|
4010
|
-
intersects = point[0] <= xIntersection;
|
|
4011
|
-
}
|
|
4012
|
-
numIntersections += intersects ? 1 : 0;
|
|
4013
|
-
}
|
|
4014
|
-
}
|
|
4015
|
-
return !!(numIntersections % 2);
|
|
4016
|
-
}
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
/***/ }),
|
|
4020
|
-
|
|
4021
|
-
/***/ 58754:
|
|
4022
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4023
|
-
|
|
4024
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4025
|
-
/* harmony export */ A: () => (/* binding */ convexHull)
|
|
4026
|
-
/* harmony export */ });
|
|
4027
|
-
function convexHull(pts) {
|
|
4028
|
-
if (pts.length < 3) {
|
|
4029
|
-
return pts.slice();
|
|
4030
|
-
}
|
|
4031
|
-
const points = pts
|
|
4032
|
-
.map((p) => [p[0], p[1]])
|
|
4033
|
-
.sort((a, b) => a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]);
|
|
4034
|
-
function cross(o, a, b) {
|
|
4035
|
-
return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
|
|
4036
|
-
}
|
|
4037
|
-
const lower = [];
|
|
4038
|
-
for (const p of points) {
|
|
4039
|
-
while (lower.length >= 2 &&
|
|
4040
|
-
cross(lower[lower.length - 2], lower[lower.length - 1], p) <= 0) {
|
|
4041
|
-
lower.pop();
|
|
4042
|
-
}
|
|
4043
|
-
lower.push(p);
|
|
4044
|
-
}
|
|
4045
|
-
const upper = [];
|
|
4046
|
-
for (let i = points.length - 1; i >= 0; i--) {
|
|
4047
|
-
const p = points[i];
|
|
4048
|
-
while (upper.length >= 2 &&
|
|
4049
|
-
cross(upper[upper.length - 2], upper[upper.length - 1], p) <= 0) {
|
|
4050
|
-
upper.pop();
|
|
4051
|
-
}
|
|
4052
|
-
upper.push(p);
|
|
4053
|
-
}
|
|
4054
|
-
lower.pop();
|
|
4055
|
-
upper.pop();
|
|
4056
|
-
return lower.concat(upper);
|
|
4057
|
-
}
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
/***/ }),
|
|
4061
|
-
|
|
4062
|
-
/***/ 98122:
|
|
4063
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4064
|
-
|
|
4065
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4066
|
-
/* harmony export */ A: () => (/* binding */ getAABB)
|
|
4067
|
-
/* harmony export */ });
|
|
4068
|
-
function getAABB(polyline, options) {
|
|
4069
|
-
let polylineToUse = polyline;
|
|
4070
|
-
const numDimensions = options?.numDimensions || 2;
|
|
4071
|
-
const is3D = numDimensions === 3;
|
|
4072
|
-
if (!Array.isArray(polyline[0])) {
|
|
4073
|
-
const currentPolyline = polyline;
|
|
4074
|
-
const totalPoints = currentPolyline.length / numDimensions;
|
|
4075
|
-
polylineToUse = new Array(currentPolyline.length / numDimensions);
|
|
4076
|
-
for (let i = 0, len = totalPoints; i < len; i++) {
|
|
4077
|
-
polylineToUse[i] = [
|
|
4078
|
-
currentPolyline[i * numDimensions],
|
|
4079
|
-
currentPolyline[i * numDimensions + 1],
|
|
4080
|
-
];
|
|
4081
|
-
if (is3D) {
|
|
4082
|
-
polylineToUse[i].push(currentPolyline[i * numDimensions + 2]);
|
|
4083
|
-
}
|
|
4084
|
-
}
|
|
4085
|
-
}
|
|
4086
|
-
let minX = Infinity;
|
|
4087
|
-
let minY = Infinity;
|
|
4088
|
-
let maxX = -Infinity;
|
|
4089
|
-
let maxY = -Infinity;
|
|
4090
|
-
let minZ = Infinity;
|
|
4091
|
-
let maxZ = -Infinity;
|
|
4092
|
-
polylineToUse = polylineToUse;
|
|
4093
|
-
for (let i = 0, len = polylineToUse.length; i < len; i++) {
|
|
4094
|
-
const [x, y, z] = polylineToUse[i];
|
|
4095
|
-
minX = minX < x ? minX : x;
|
|
4096
|
-
minY = minY < y ? minY : y;
|
|
4097
|
-
maxX = maxX > x ? maxX : x;
|
|
4098
|
-
maxY = maxY > y ? maxY : y;
|
|
4099
|
-
if (is3D) {
|
|
4100
|
-
minZ = minZ < z ? minZ : z;
|
|
4101
|
-
maxZ = maxZ > z ? maxZ : z;
|
|
4102
|
-
}
|
|
4103
|
-
}
|
|
4104
|
-
return is3D
|
|
4105
|
-
? { minX, maxX, minY, maxY, minZ, maxZ }
|
|
4106
|
-
: { minX, maxX, minY, maxY };
|
|
4107
|
-
}
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
/***/ }),
|
|
4111
|
-
|
|
4112
|
-
/***/ 86909:
|
|
4113
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4114
|
-
|
|
4115
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4116
|
-
/* harmony export */ A: () => (/* binding */ getArea)
|
|
4117
|
-
/* harmony export */ });
|
|
4118
|
-
function getArea(points) {
|
|
4119
|
-
const n = points.length;
|
|
4120
|
-
let area = 0.0;
|
|
4121
|
-
let j = n - 1;
|
|
4122
|
-
for (let i = 0; i < n; i++) {
|
|
4123
|
-
area += (points[j][0] + points[i][0]) * (points[j][1] - points[i][1]);
|
|
4124
|
-
j = i;
|
|
4125
|
-
}
|
|
4126
|
-
return Math.abs(area / 2.0);
|
|
4127
|
-
}
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
/***/ }),
|
|
4131
|
-
|
|
4132
|
-
/***/ 32979:
|
|
4133
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4134
|
-
|
|
4135
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4136
|
-
/* harmony export */ A: () => (/* binding */ getClosestLineSegmentIntersection)
|
|
4137
|
-
/* harmony export */ });
|
|
4138
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
|
|
4139
|
-
/* harmony import */ var _areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(56777);
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
function getClosestLineSegmentIntersection(points, p1, q1, closed = true) {
|
|
4143
|
-
let initialQ2Index;
|
|
4144
|
-
let p2Index;
|
|
4145
|
-
if (closed) {
|
|
4146
|
-
p2Index = points.length - 1;
|
|
4147
|
-
initialQ2Index = 0;
|
|
4148
|
-
}
|
|
4149
|
-
else {
|
|
4150
|
-
p2Index = 0;
|
|
4151
|
-
initialQ2Index = 1;
|
|
4152
|
-
}
|
|
4153
|
-
const intersections = [];
|
|
4154
|
-
for (let q2Index = initialQ2Index; q2Index < points.length; q2Index++) {
|
|
4155
|
-
const p2 = points[p2Index];
|
|
4156
|
-
const q2 = points[q2Index];
|
|
4157
|
-
if ((0,_areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(p1, q1, p2, q2)) {
|
|
4158
|
-
intersections.push([p2Index, q2Index]);
|
|
4159
|
-
}
|
|
4160
|
-
p2Index = q2Index;
|
|
4161
|
-
}
|
|
4162
|
-
if (intersections.length === 0) {
|
|
4163
|
-
return;
|
|
4164
|
-
}
|
|
4165
|
-
const distances = [];
|
|
4166
|
-
intersections.forEach((intersection) => {
|
|
4167
|
-
const intersectionPoints = [
|
|
4168
|
-
points[intersection[0]],
|
|
4169
|
-
points[intersection[1]],
|
|
4170
|
-
];
|
|
4171
|
-
const midpoint = [
|
|
4172
|
-
(intersectionPoints[0][0] + intersectionPoints[1][0]) / 2,
|
|
4173
|
-
(intersectionPoints[0][1] + intersectionPoints[1][1]) / 2,
|
|
4174
|
-
];
|
|
4175
|
-
distances.push(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.distance */ .Zc.distance(midpoint, p1));
|
|
4176
|
-
});
|
|
4177
|
-
const minDistance = Math.min(...distances);
|
|
4178
|
-
const indexOfMinDistance = distances.indexOf(minDistance);
|
|
4179
|
-
return {
|
|
4180
|
-
segment: intersections[indexOfMinDistance],
|
|
4181
|
-
distance: minDistance,
|
|
4182
|
-
};
|
|
4183
|
-
}
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
/***/ }),
|
|
4187
|
-
|
|
4188
|
-
/***/ 4338:
|
|
4189
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4190
|
-
|
|
4191
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4192
|
-
/* harmony export */ A: () => (/* binding */ getFirstLineSegmentIntersectionIndexes)
|
|
4193
|
-
/* harmony export */ });
|
|
4194
|
-
/* harmony import */ var _areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56777);
|
|
4195
|
-
|
|
4196
|
-
function getFirstLineSegmentIntersectionIndexes(points, p1, q1, closed = true) {
|
|
4197
|
-
let initialI;
|
|
4198
|
-
let j;
|
|
4199
|
-
if (closed) {
|
|
4200
|
-
j = points.length - 1;
|
|
4201
|
-
initialI = 0;
|
|
4202
|
-
}
|
|
4203
|
-
else {
|
|
4204
|
-
j = 0;
|
|
4205
|
-
initialI = 1;
|
|
4206
|
-
}
|
|
4207
|
-
for (let i = initialI; i < points.length; i++) {
|
|
4208
|
-
const p2 = points[j];
|
|
4209
|
-
const q2 = points[i];
|
|
4210
|
-
if ((0,_areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(p1, q1, p2, q2)) {
|
|
4211
|
-
return [j, i];
|
|
4212
|
-
}
|
|
4213
|
-
j = i;
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
/***/ }),
|
|
4219
|
-
|
|
4220
|
-
/***/ 50932:
|
|
4221
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4222
|
-
|
|
4223
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4224
|
-
/* harmony export */ A: () => (/* binding */ getLineSegmentIntersectionsCoordinates)
|
|
4225
|
-
/* harmony export */ });
|
|
4226
|
-
/* harmony import */ var _getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37135);
|
|
4227
|
-
/* harmony import */ var _getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10812);
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
function getLineSegmentIntersectionsCoordinates(points, p1, q1, closed = true) {
|
|
4231
|
-
const result = [];
|
|
4232
|
-
const polylineIndexes = (0,_getLineSegmentIntersectionsIndexes__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(points, p1, q1, closed);
|
|
4233
|
-
for (let i = 0; i < polylineIndexes.length; i++) {
|
|
4234
|
-
const p2 = points[polylineIndexes[i][0]];
|
|
4235
|
-
const q2 = points[polylineIndexes[i][1]];
|
|
4236
|
-
const intersection = (0,_getLinesIntersection__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(p1, q1, p2, q2);
|
|
4237
|
-
result.push(intersection);
|
|
4238
|
-
}
|
|
4239
|
-
return result;
|
|
4240
|
-
}
|
|
4241
|
-
|
|
4242
|
-
|
|
4243
|
-
/***/ }),
|
|
4244
|
-
|
|
4245
|
-
/***/ 37135:
|
|
4246
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4247
|
-
|
|
4248
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4249
|
-
/* harmony export */ A: () => (/* binding */ getLineSegmentIntersectionsIndexes)
|
|
4250
|
-
/* harmony export */ });
|
|
4251
|
-
/* harmony import */ var _areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56777);
|
|
4252
|
-
|
|
4253
|
-
function getLineSegmentIntersectionsIndexes(polyline, p1, q1, closed = true) {
|
|
4254
|
-
const intersections = [];
|
|
4255
|
-
const numPoints = polyline.length;
|
|
4256
|
-
const maxI = numPoints - (closed ? 1 : 2);
|
|
4257
|
-
for (let i = 0; i <= maxI; i++) {
|
|
4258
|
-
const p2 = polyline[i];
|
|
4259
|
-
const j = i === numPoints - 1 ? 0 : i + 1;
|
|
4260
|
-
const q2 = polyline[j];
|
|
4261
|
-
if ((0,_areLineSegmentsIntersecting__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(p1, q1, p2, q2)) {
|
|
4262
|
-
intersections.push([i, j]);
|
|
4263
|
-
}
|
|
4264
|
-
}
|
|
4265
|
-
return intersections;
|
|
4266
|
-
}
|
|
4267
|
-
|
|
4268
|
-
|
|
4269
|
-
/***/ }),
|
|
4270
|
-
|
|
4271
|
-
/***/ 10812:
|
|
4272
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4273
|
-
|
|
4274
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4275
|
-
/* harmony export */ A: () => (/* binding */ getLinesIntersection)
|
|
4276
|
-
/* harmony export */ });
|
|
4277
|
-
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93258);
|
|
4278
|
-
|
|
4279
|
-
const PARALLEL_LINES_TOLERANCE = 1e-2;
|
|
4280
|
-
function getLinesIntersection(p1, q1, p2, q2) {
|
|
4281
|
-
const diffQ1P1 = [q1[0] - p1[0], q1[1] - p1[1]];
|
|
4282
|
-
const diffQ2P2 = [q2[0] - p2[0], q2[1] - p2[1]];
|
|
4283
|
-
const denominator = diffQ2P2[1] * diffQ1P1[0] - diffQ2P2[0] * diffQ1P1[1];
|
|
4284
|
-
const absDenominator = denominator >= 0 ? denominator : -denominator;
|
|
4285
|
-
if (absDenominator < PARALLEL_LINES_TOLERANCE) {
|
|
4286
|
-
const line1AABB = [
|
|
4287
|
-
p1[0] < q1[0] ? p1[0] : q1[0],
|
|
4288
|
-
p1[0] > q1[0] ? p1[0] : q1[0],
|
|
4289
|
-
p1[1] < q1[1] ? p1[1] : q1[1],
|
|
4290
|
-
p1[1] > q1[1] ? p1[1] : q1[1],
|
|
4291
|
-
];
|
|
4292
|
-
const line2AABB = [
|
|
4293
|
-
p2[0] < q2[0] ? p2[0] : q2[0],
|
|
4294
|
-
p2[0] > q2[0] ? p2[0] : q2[0],
|
|
4295
|
-
p2[1] < q2[1] ? p2[1] : q2[1],
|
|
4296
|
-
p2[1] > q2[1] ? p2[1] : q2[1],
|
|
4297
|
-
];
|
|
4298
|
-
const aabbIntersects = line1AABB[0] <= line2AABB[1] &&
|
|
4299
|
-
line1AABB[1] >= line2AABB[0] &&
|
|
4300
|
-
line1AABB[2] <= line2AABB[3] &&
|
|
4301
|
-
line1AABB[3] >= line2AABB[2];
|
|
4302
|
-
if (!aabbIntersects) {
|
|
4303
|
-
return;
|
|
4304
|
-
}
|
|
4305
|
-
const overlap = _line__WEBPACK_IMPORTED_MODULE_0__.isPointOnLineSegment(p1, q1, p2) ||
|
|
4306
|
-
_line__WEBPACK_IMPORTED_MODULE_0__.isPointOnLineSegment(p1, q1, q2) ||
|
|
4307
|
-
_line__WEBPACK_IMPORTED_MODULE_0__.isPointOnLineSegment(p2, q2, p1);
|
|
4308
|
-
if (!overlap) {
|
|
4309
|
-
return;
|
|
4310
|
-
}
|
|
4311
|
-
const minX = line1AABB[0] > line2AABB[0] ? line1AABB[0] : line2AABB[0];
|
|
4312
|
-
const maxX = line1AABB[1] < line2AABB[1] ? line1AABB[1] : line2AABB[1];
|
|
4313
|
-
const minY = line1AABB[2] > line2AABB[2] ? line1AABB[2] : line2AABB[2];
|
|
4314
|
-
const maxY = line1AABB[3] < line2AABB[3] ? line1AABB[3] : line2AABB[3];
|
|
4315
|
-
const midX = (minX + maxX) * 0.5;
|
|
4316
|
-
const midY = (minY + maxY) * 0.5;
|
|
4317
|
-
return [midX, midY];
|
|
4318
|
-
}
|
|
4319
|
-
let a = p1[1] - p2[1];
|
|
4320
|
-
let b = p1[0] - p2[0];
|
|
4321
|
-
const numerator1 = diffQ2P2[0] * a - diffQ2P2[1] * b;
|
|
4322
|
-
const numerator2 = diffQ1P1[0] * a - diffQ1P1[1] * b;
|
|
4323
|
-
a = numerator1 / denominator;
|
|
4324
|
-
b = numerator2 / denominator;
|
|
4325
|
-
const resultX = p1[0] + a * diffQ1P1[0];
|
|
4326
|
-
const resultY = p1[1] + a * diffQ1P1[1];
|
|
4327
|
-
return [resultX, resultY];
|
|
4328
|
-
}
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
/***/ }),
|
|
4332
|
-
|
|
4333
|
-
/***/ 11377:
|
|
4334
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4335
|
-
|
|
4336
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4337
|
-
/* harmony export */ A: () => (/* binding */ getNormal2)
|
|
4338
|
-
/* harmony export */ });
|
|
4339
|
-
/* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63113);
|
|
4340
|
-
|
|
4341
|
-
function getNormal2(polyline) {
|
|
4342
|
-
const area = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(polyline);
|
|
4343
|
-
return [0, 0, area / Math.abs(area)];
|
|
4344
|
-
}
|
|
4345
|
-
|
|
4346
|
-
|
|
4347
|
-
/***/ }),
|
|
4348
|
-
|
|
4349
|
-
/***/ 43490:
|
|
4350
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4351
|
-
|
|
4352
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4353
|
-
/* harmony export */ A: () => (/* binding */ getNormal3)
|
|
4354
|
-
/* harmony export */ });
|
|
4355
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
|
|
4356
|
-
|
|
4357
|
-
function _getAreaVector(polyline) {
|
|
4358
|
-
const vecArea = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.create */ .eR.create();
|
|
4359
|
-
const refPoint = polyline[0];
|
|
4360
|
-
for (let i = 0, len = polyline.length; i < len; i++) {
|
|
4361
|
-
const p1 = polyline[i];
|
|
4362
|
-
const p2Index = i === len - 1 ? 0 : i + 1;
|
|
4363
|
-
const p2 = polyline[p2Index];
|
|
4364
|
-
const aX = p1[0] - refPoint[0];
|
|
4365
|
-
const aY = p1[1] - refPoint[1];
|
|
4366
|
-
const aZ = p1[2] - refPoint[2];
|
|
4367
|
-
const bX = p2[0] - refPoint[0];
|
|
4368
|
-
const bY = p2[1] - refPoint[1];
|
|
4369
|
-
const bZ = p2[2] - refPoint[2];
|
|
4370
|
-
vecArea[0] += aY * bZ - aZ * bY;
|
|
4371
|
-
vecArea[1] += aZ * bX - aX * bZ;
|
|
4372
|
-
vecArea[2] += aX * bY - aY * bX;
|
|
4373
|
-
}
|
|
4374
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.scale */ .eR.scale(vecArea, vecArea, 0.5);
|
|
4375
|
-
return vecArea;
|
|
4376
|
-
}
|
|
4377
|
-
function getNormal3(polyline) {
|
|
4378
|
-
const vecArea = _getAreaVector(polyline);
|
|
4379
|
-
return gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec3.normalize */ .eR.normalize(vecArea, vecArea);
|
|
4380
|
-
}
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
/***/ }),
|
|
4384
|
-
|
|
4385
|
-
/***/ 61785:
|
|
4386
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4387
|
-
|
|
4388
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4389
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4390
|
-
/* harmony export */ });
|
|
4391
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
4392
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
const EPSILON = 1e-3;
|
|
4396
|
-
const getSubPixelSpacingAndXYDirections = (viewport, subPixelResolution) => {
|
|
4397
|
-
let spacing;
|
|
4398
|
-
let xDir;
|
|
4399
|
-
let yDir;
|
|
4400
|
-
if (viewport instanceof _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.StackViewport) {
|
|
4401
|
-
const imageData = viewport.getImageData();
|
|
4402
|
-
if (!imageData) {
|
|
4403
|
-
return;
|
|
4404
|
-
}
|
|
4405
|
-
xDir = imageData.direction.slice(0, 3);
|
|
4406
|
-
yDir = imageData.direction.slice(3, 6);
|
|
4407
|
-
spacing = imageData.spacing;
|
|
4408
|
-
}
|
|
4409
|
-
else {
|
|
4410
|
-
const imageData = viewport.getImageData();
|
|
4411
|
-
const { direction, spacing: volumeSpacing } = imageData;
|
|
4412
|
-
const { viewPlaneNormal, viewUp } = viewport.getCamera();
|
|
4413
|
-
const iVector = direction.slice(0, 3);
|
|
4414
|
-
const jVector = direction.slice(3, 6);
|
|
4415
|
-
const kVector = direction.slice(6, 9);
|
|
4416
|
-
const viewRight = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.create */ .eR.create();
|
|
4417
|
-
gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.cross */ .eR.cross(viewRight, viewUp, viewPlaneNormal);
|
|
4418
|
-
const absViewRightDotI = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewRight, iVector));
|
|
4419
|
-
const absViewRightDotJ = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewRight, jVector));
|
|
4420
|
-
const absViewRightDotK = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewRight, kVector));
|
|
4421
|
-
let xSpacing;
|
|
4422
|
-
if (Math.abs(1 - absViewRightDotI) < EPSILON) {
|
|
4423
|
-
xSpacing = volumeSpacing[0];
|
|
4424
|
-
xDir = iVector;
|
|
4425
|
-
}
|
|
4426
|
-
else if (Math.abs(1 - absViewRightDotJ) < EPSILON) {
|
|
4427
|
-
xSpacing = volumeSpacing[1];
|
|
4428
|
-
xDir = jVector;
|
|
4429
|
-
}
|
|
4430
|
-
else if (Math.abs(1 - absViewRightDotK) < EPSILON) {
|
|
4431
|
-
xSpacing = volumeSpacing[2];
|
|
4432
|
-
xDir = kVector;
|
|
4433
|
-
}
|
|
4434
|
-
else {
|
|
4435
|
-
throw new Error('No support yet for oblique plane planar contours');
|
|
4436
|
-
}
|
|
4437
|
-
const absViewUpDotI = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewUp, iVector));
|
|
4438
|
-
const absViewUpDotJ = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewUp, jVector));
|
|
4439
|
-
const absViewUpDotK = Math.abs(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec3.dot */ .eR.dot(viewUp, kVector));
|
|
4440
|
-
let ySpacing;
|
|
4441
|
-
if (Math.abs(1 - absViewUpDotI) < EPSILON) {
|
|
4442
|
-
ySpacing = volumeSpacing[0];
|
|
4443
|
-
yDir = iVector;
|
|
4444
|
-
}
|
|
4445
|
-
else if (Math.abs(1 - absViewUpDotJ) < EPSILON) {
|
|
4446
|
-
ySpacing = volumeSpacing[1];
|
|
4447
|
-
yDir = jVector;
|
|
4448
|
-
}
|
|
4449
|
-
else if (Math.abs(1 - absViewUpDotK) < EPSILON) {
|
|
4450
|
-
ySpacing = volumeSpacing[2];
|
|
4451
|
-
yDir = kVector;
|
|
4452
|
-
}
|
|
4453
|
-
else {
|
|
4454
|
-
throw new Error('No support yet for oblique plane planar contours');
|
|
4455
|
-
}
|
|
4456
|
-
spacing = [xSpacing, ySpacing];
|
|
4457
|
-
}
|
|
4458
|
-
const subPixelSpacing = [
|
|
4459
|
-
spacing[0] / subPixelResolution,
|
|
4460
|
-
spacing[1] / subPixelResolution,
|
|
4461
|
-
];
|
|
4462
|
-
return { spacing: subPixelSpacing, xDir, yDir };
|
|
4463
|
-
};
|
|
4464
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (getSubPixelSpacingAndXYDirections);
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
/***/ }),
|
|
4468
|
-
|
|
4469
|
-
/***/ 4239:
|
|
4470
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4471
|
-
|
|
4472
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4473
|
-
/* harmony export */ A: () => (/* binding */ getWindingDirection)
|
|
4474
|
-
/* harmony export */ });
|
|
4475
|
-
/* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(63113);
|
|
4476
|
-
|
|
4477
|
-
function getWindingDirection(polyline) {
|
|
4478
|
-
const signedArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(polyline);
|
|
4479
|
-
return signedArea >= 0 ? 1 : -1;
|
|
4480
|
-
}
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
/***/ }),
|
|
4484
|
-
|
|
4485
|
-
/***/ 405:
|
|
4486
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4487
|
-
|
|
4488
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4489
|
-
/* harmony export */ A: () => (/* binding */ intersectPolyline)
|
|
4490
|
-
/* harmony export */ });
|
|
4491
|
-
/* harmony import */ var _getFirstLineSegmentIntersectionIndexes__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4338);
|
|
4492
|
-
|
|
4493
|
-
function intersectPolyline(sourcePolyline, targetPolyline) {
|
|
4494
|
-
for (let i = 0, sourceLen = sourcePolyline.length; i < sourceLen; i++) {
|
|
4495
|
-
const sourceP1 = sourcePolyline[i];
|
|
4496
|
-
const sourceP2Index = i === sourceLen - 1 ? 0 : i + 1;
|
|
4497
|
-
const sourceP2 = sourcePolyline[sourceP2Index];
|
|
4498
|
-
const intersectionPointIndexes = (0,_getFirstLineSegmentIntersectionIndexes__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(targetPolyline, sourceP1, sourceP2);
|
|
4499
|
-
if (intersectionPointIndexes?.length === 2) {
|
|
4500
|
-
return true;
|
|
4501
|
-
}
|
|
4502
|
-
}
|
|
4503
|
-
return false;
|
|
4504
|
-
}
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
/***/ }),
|
|
4508
|
-
|
|
4509
|
-
/***/ 70112:
|
|
4510
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4511
|
-
|
|
4512
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4513
|
-
/* harmony export */ A: () => (/* binding */ intersectPolylines)
|
|
4514
|
-
/* harmony export */ });
|
|
4515
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
|
|
4516
|
-
/* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(46513);
|
|
4517
|
-
/* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63113);
|
|
4518
|
-
/* harmony import */ var _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36039);
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
function intersectPolylines(mainPolyCoords, clipPolyCoordsInput) {
|
|
4524
|
-
if (mainPolyCoords.length < 3 || clipPolyCoordsInput.length < 3) {
|
|
4525
|
-
return [];
|
|
4526
|
-
}
|
|
4527
|
-
let clipPolyCoords = clipPolyCoordsInput.slice();
|
|
4528
|
-
const mainArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(mainPolyCoords);
|
|
4529
|
-
const clipArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(clipPolyCoords);
|
|
4530
|
-
if (Math.abs(mainArea) < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8 || Math.abs(clipArea) < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8) {
|
|
4531
|
-
return [];
|
|
4532
|
-
}
|
|
4533
|
-
if (mainArea < 0) {
|
|
4534
|
-
mainPolyCoords = mainPolyCoords.slice().reverse();
|
|
4535
|
-
}
|
|
4536
|
-
if (clipArea < 0) {
|
|
4537
|
-
clipPolyCoords = clipPolyCoords.slice().reverse();
|
|
4538
|
-
}
|
|
4539
|
-
const currentClipPolyForPIP = clipPolyCoords;
|
|
4540
|
-
const intersections = [];
|
|
4541
|
-
for (let i = 0; i < mainPolyCoords.length; i++) {
|
|
4542
|
-
const p1 = mainPolyCoords[i];
|
|
4543
|
-
const p2 = mainPolyCoords[(i + 1) % mainPolyCoords.length];
|
|
4544
|
-
for (let j = 0; j < clipPolyCoords.length; j++) {
|
|
4545
|
-
const q1 = clipPolyCoords[j];
|
|
4546
|
-
const q2 = clipPolyCoords[(j + 1) % clipPolyCoords.length];
|
|
4547
|
-
const intersectPt = (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .robustSegmentIntersection */ .O4)(p1, p2, q1, q2);
|
|
4548
|
-
if (intersectPt) {
|
|
4549
|
-
const lenP = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, p2));
|
|
4550
|
-
const lenQ = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, q2));
|
|
4551
|
-
intersections.push({
|
|
4552
|
-
coord: [...intersectPt],
|
|
4553
|
-
seg1Idx: i,
|
|
4554
|
-
seg2Idx: j,
|
|
4555
|
-
alpha1: lenP < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8
|
|
4556
|
-
? 0
|
|
4557
|
-
: Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, intersectPt)) / lenP,
|
|
4558
|
-
alpha2: lenQ < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8
|
|
4559
|
-
? 0
|
|
4560
|
-
: Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, intersectPt)) / lenQ,
|
|
4561
|
-
});
|
|
4562
|
-
}
|
|
4563
|
-
}
|
|
4564
|
-
}
|
|
4565
|
-
if (intersections.length === 0) {
|
|
4566
|
-
if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(currentClipPolyForPIP, mainPolyCoords[0]) &&
|
|
4567
|
-
mainPolyCoords.every((pt) => (0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(currentClipPolyForPIP, pt))) {
|
|
4568
|
-
return [[...mainPolyCoords.map((p) => [...p])]];
|
|
4569
|
-
}
|
|
4570
|
-
if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(mainPolyCoords, clipPolyCoords[0]) &&
|
|
4571
|
-
clipPolyCoords.every((pt) => (0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(mainPolyCoords, pt))) {
|
|
4572
|
-
return [[...clipPolyCoords.map((p) => [...p])]];
|
|
4573
|
-
}
|
|
4574
|
-
return [];
|
|
4575
|
-
}
|
|
4576
|
-
const buildAugmentedList = (polyCoords, polyIndex, allIntersections) => {
|
|
4577
|
-
const augmentedList = [];
|
|
4578
|
-
let nodeIdCounter = 0;
|
|
4579
|
-
for (let i = 0; i < polyCoords.length; i++) {
|
|
4580
|
-
const p1 = polyCoords[i];
|
|
4581
|
-
augmentedList.push({
|
|
4582
|
-
id: `${polyIndex}_v${nodeIdCounter++}`,
|
|
4583
|
-
coordinates: [...p1],
|
|
4584
|
-
type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Vertex,
|
|
4585
|
-
originalPolyIndex: polyIndex,
|
|
4586
|
-
originalVertexIndex: i,
|
|
4587
|
-
next: null,
|
|
4588
|
-
prev: null,
|
|
4589
|
-
isIntersection: false,
|
|
4590
|
-
visited: false,
|
|
4591
|
-
processedInPath: false,
|
|
4592
|
-
intersectionDir: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Unknown,
|
|
4593
|
-
});
|
|
4594
|
-
const segmentIntersections = allIntersections
|
|
4595
|
-
.filter((isect) => (polyIndex === 0 ? isect.seg1Idx : isect.seg2Idx) === i)
|
|
4596
|
-
.sort((a, b) => (polyIndex === 0 ? a.alpha1 : a.alpha2) -
|
|
4597
|
-
(polyIndex === 0 ? b.alpha1 : b.alpha2));
|
|
4598
|
-
for (const isect of segmentIntersections) {
|
|
4599
|
-
if (augmentedList.length > 0 &&
|
|
4600
|
-
(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(augmentedList[augmentedList.length - 1].coordinates, isect.coord)) {
|
|
4601
|
-
const lastNode = augmentedList[augmentedList.length - 1];
|
|
4602
|
-
if (!lastNode.isIntersection) {
|
|
4603
|
-
lastNode.isIntersection = true;
|
|
4604
|
-
lastNode.intersectionInfo = isect;
|
|
4605
|
-
lastNode.alpha = polyIndex === 0 ? isect.alpha1 : isect.alpha2;
|
|
4606
|
-
lastNode.type = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection;
|
|
4607
|
-
}
|
|
4608
|
-
continue;
|
|
4609
|
-
}
|
|
4610
|
-
augmentedList.push({
|
|
4611
|
-
id: `${polyIndex}_i${nodeIdCounter++}`,
|
|
4612
|
-
coordinates: [...isect.coord],
|
|
4613
|
-
type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection,
|
|
4614
|
-
originalPolyIndex: polyIndex,
|
|
4615
|
-
next: null,
|
|
4616
|
-
prev: null,
|
|
4617
|
-
isIntersection: true,
|
|
4618
|
-
visited: false,
|
|
4619
|
-
processedInPath: false,
|
|
4620
|
-
alpha: polyIndex === 0 ? isect.alpha1 : isect.alpha2,
|
|
4621
|
-
intersectionInfo: isect,
|
|
4622
|
-
intersectionDir: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Unknown,
|
|
4623
|
-
});
|
|
4624
|
-
}
|
|
4625
|
-
}
|
|
4626
|
-
const finalList = [];
|
|
4627
|
-
if (augmentedList.length > 0) {
|
|
4628
|
-
finalList.push(augmentedList[0]);
|
|
4629
|
-
for (let i = 1; i < augmentedList.length; i++) {
|
|
4630
|
-
if (!(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(augmentedList[i].coordinates, finalList[finalList.length - 1].coordinates)) {
|
|
4631
|
-
finalList.push(augmentedList[i]);
|
|
4632
|
-
}
|
|
4633
|
-
else {
|
|
4634
|
-
const lastNodeInFinal = finalList[finalList.length - 1];
|
|
4635
|
-
if (augmentedList[i].isIntersection &&
|
|
4636
|
-
augmentedList[i].intersectionInfo) {
|
|
4637
|
-
lastNodeInFinal.isIntersection = true;
|
|
4638
|
-
lastNodeInFinal.intersectionInfo =
|
|
4639
|
-
augmentedList[i].intersectionInfo;
|
|
4640
|
-
lastNodeInFinal.alpha = augmentedList[i].alpha;
|
|
4641
|
-
lastNodeInFinal.type = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection;
|
|
4642
|
-
}
|
|
4643
|
-
}
|
|
4644
|
-
}
|
|
4645
|
-
}
|
|
4646
|
-
if (finalList.length > 1 &&
|
|
4647
|
-
(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(finalList[0].coordinates, finalList[finalList.length - 1].coordinates)) {
|
|
4648
|
-
const firstNode = finalList[0];
|
|
4649
|
-
const lastNodePopped = finalList.pop();
|
|
4650
|
-
if (lastNodePopped.isIntersection &&
|
|
4651
|
-
!firstNode.isIntersection &&
|
|
4652
|
-
lastNodePopped.intersectionInfo) {
|
|
4653
|
-
firstNode.isIntersection = true;
|
|
4654
|
-
firstNode.intersectionInfo = lastNodePopped.intersectionInfo;
|
|
4655
|
-
firstNode.alpha = lastNodePopped.alpha;
|
|
4656
|
-
firstNode.type = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .PolylineNodeType */ .n7.Intersection;
|
|
4657
|
-
}
|
|
4658
|
-
}
|
|
4659
|
-
if (finalList.length > 0) {
|
|
4660
|
-
for (let i = 0; i < finalList.length; i++) {
|
|
4661
|
-
finalList[i].next = finalList[(i + 1) % finalList.length];
|
|
4662
|
-
finalList[i].prev =
|
|
4663
|
-
finalList[(i - 1 + finalList.length) % finalList.length];
|
|
4664
|
-
}
|
|
4665
|
-
}
|
|
4666
|
-
return finalList;
|
|
4667
|
-
};
|
|
4668
|
-
const mainAugmented = buildAugmentedList(mainPolyCoords, 0, intersections);
|
|
4669
|
-
const clipAugmented = buildAugmentedList(clipPolyCoords, 1, intersections);
|
|
4670
|
-
if (mainAugmented.length === 0 || clipAugmented.length === 0) {
|
|
4671
|
-
return [];
|
|
4672
|
-
}
|
|
4673
|
-
mainAugmented.forEach((mainNode) => {
|
|
4674
|
-
if (mainNode.isIntersection && mainNode.intersectionInfo) {
|
|
4675
|
-
const mainIntersectData = mainNode.intersectionInfo;
|
|
4676
|
-
const partnerNode = clipAugmented.find((clipNode) => clipNode.isIntersection &&
|
|
4677
|
-
clipNode.intersectionInfo &&
|
|
4678
|
-
(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(clipNode.coordinates, mainNode.coordinates) &&
|
|
4679
|
-
clipNode.intersectionInfo.seg1Idx === mainIntersectData.seg1Idx &&
|
|
4680
|
-
clipNode.intersectionInfo.seg2Idx === mainIntersectData.seg2Idx);
|
|
4681
|
-
if (partnerNode) {
|
|
4682
|
-
mainNode.partnerNode = partnerNode;
|
|
4683
|
-
partnerNode.partnerNode = mainNode;
|
|
4684
|
-
const v_arrival_main = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), mainNode.coordinates, mainNode.prev.coordinates);
|
|
4685
|
-
const v_departure_clip = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), partnerNode.next.coordinates, partnerNode.coordinates);
|
|
4686
|
-
const crossZ = v_arrival_main[0] * v_departure_clip[1] -
|
|
4687
|
-
v_arrival_main[1] * v_departure_clip[0];
|
|
4688
|
-
if (crossZ > _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8) {
|
|
4689
|
-
mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
|
|
4690
|
-
partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
|
|
4691
|
-
}
|
|
4692
|
-
else if (crossZ < -_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .EPSILON */ .p8) {
|
|
4693
|
-
mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
|
|
4694
|
-
partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
|
|
4695
|
-
}
|
|
4696
|
-
else {
|
|
4697
|
-
const midPrevMainSeg = [
|
|
4698
|
-
(mainNode.prev.coordinates[0] + mainNode.coordinates[0]) / 2,
|
|
4699
|
-
(mainNode.prev.coordinates[1] + mainNode.coordinates[1]) / 2,
|
|
4700
|
-
];
|
|
4701
|
-
if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(currentClipPolyForPIP, midPrevMainSeg)) {
|
|
4702
|
-
mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
|
|
4703
|
-
partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
|
|
4704
|
-
}
|
|
4705
|
-
else {
|
|
4706
|
-
mainNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering;
|
|
4707
|
-
partnerNode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Exiting;
|
|
4708
|
-
}
|
|
4709
|
-
}
|
|
4710
|
-
}
|
|
4711
|
-
else {
|
|
4712
|
-
mainNode.isIntersection = false;
|
|
4713
|
-
mainNode.intersectionInfo = undefined;
|
|
4714
|
-
}
|
|
4715
|
-
}
|
|
4716
|
-
});
|
|
4717
|
-
const resultPolygons = [];
|
|
4718
|
-
for (const startCand of mainAugmented) {
|
|
4719
|
-
if (!startCand.isIntersection ||
|
|
4720
|
-
startCand.visited ||
|
|
4721
|
-
startCand.intersectionDir !== _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .IntersectionDirection */ .lG.Entering) {
|
|
4722
|
-
continue;
|
|
4723
|
-
}
|
|
4724
|
-
let currentPathCoords = [];
|
|
4725
|
-
let currentNode = startCand;
|
|
4726
|
-
let onMainList = true;
|
|
4727
|
-
const pathStartNode = startCand;
|
|
4728
|
-
let safetyBreak = 0;
|
|
4729
|
-
const maxIter = (mainAugmented.length + clipAugmented.length) * 2;
|
|
4730
|
-
mainAugmented.forEach((n) => (n.processedInPath = false));
|
|
4731
|
-
clipAugmented.forEach((n) => (n.processedInPath = false));
|
|
4732
|
-
do {
|
|
4733
|
-
if (safetyBreak++ > maxIter) {
|
|
4734
|
-
console.warn('Intersection: Max iterations in path tracing.', pathStartNode.id, currentNode.id);
|
|
4735
|
-
currentPathCoords = [];
|
|
4736
|
-
break;
|
|
4737
|
-
}
|
|
4738
|
-
if (currentNode.processedInPath && currentNode !== pathStartNode) {
|
|
4739
|
-
console.warn('Intersection: Path processing loop detected, discarding path segment.', pathStartNode.id, currentNode.id);
|
|
4740
|
-
currentPathCoords = [];
|
|
4741
|
-
break;
|
|
4742
|
-
}
|
|
4743
|
-
currentNode.processedInPath = true;
|
|
4744
|
-
currentNode.visited = true;
|
|
4745
|
-
if (currentPathCoords.length === 0 ||
|
|
4746
|
-
!(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(currentPathCoords[currentPathCoords.length - 1], currentNode.coordinates)) {
|
|
4747
|
-
currentPathCoords.push([...currentNode.coordinates]);
|
|
4748
|
-
}
|
|
4749
|
-
let switchedList = false;
|
|
4750
|
-
if (currentNode.isIntersection && currentNode.partnerNode) {
|
|
4751
|
-
if (onMainList) {
|
|
4752
|
-
currentNode = currentNode.partnerNode;
|
|
4753
|
-
onMainList = false;
|
|
4754
|
-
switchedList = true;
|
|
4755
|
-
}
|
|
4756
|
-
else {
|
|
4757
|
-
currentNode = currentNode.partnerNode;
|
|
4758
|
-
onMainList = true;
|
|
4759
|
-
switchedList = true;
|
|
4760
|
-
}
|
|
4761
|
-
}
|
|
4762
|
-
if (!switchedList) {
|
|
4763
|
-
currentNode = currentNode.next;
|
|
4764
|
-
}
|
|
4765
|
-
else {
|
|
4766
|
-
currentNode = currentNode.next;
|
|
4767
|
-
}
|
|
4768
|
-
} while (currentNode !== pathStartNode ||
|
|
4769
|
-
(onMainList && currentNode.originalPolyIndex !== 0) ||
|
|
4770
|
-
(!onMainList && currentNode.originalPolyIndex !== 1));
|
|
4771
|
-
if (safetyBreak > maxIter || currentPathCoords.length === 0) {
|
|
4772
|
-
}
|
|
4773
|
-
else if (currentPathCoords.length > 0 &&
|
|
4774
|
-
(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_3__/* .pointsAreEqual */ .Sk)(currentPathCoords[0], currentPathCoords[currentPathCoords.length - 1])) {
|
|
4775
|
-
currentPathCoords.pop();
|
|
4776
|
-
}
|
|
4777
|
-
if (currentPathCoords.length >= 3) {
|
|
4778
|
-
const resultArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(currentPathCoords);
|
|
4779
|
-
if (mainArea > 0 && resultArea < 0) {
|
|
4780
|
-
currentPathCoords.reverse();
|
|
4781
|
-
}
|
|
4782
|
-
else if (mainArea < 0 && resultArea > 0) {
|
|
4783
|
-
currentPathCoords.reverse();
|
|
4784
|
-
}
|
|
4785
|
-
resultPolygons.push(currentPathCoords.map((p) => [...p]));
|
|
4786
|
-
}
|
|
4787
|
-
}
|
|
4788
|
-
return resultPolygons;
|
|
4789
|
-
}
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
/***/ }),
|
|
4793
|
-
|
|
4794
|
-
/***/ 8361:
|
|
4795
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4796
|
-
|
|
4797
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4798
|
-
/* harmony export */ i: () => (/* binding */ isPointInsidePolyline3D)
|
|
3332
|
+
/* harmony export */ i: () => (/* binding */ isPointInsidePolyline3D)
|
|
4799
3333
|
/* harmony export */ });
|
|
4800
3334
|
/* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(46513);
|
|
4801
3335
|
/* harmony import */ var _projectTo2D__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28502);
|
|
@@ -4826,10 +3360,10 @@ function isPointInsidePolyline3D(point, polyline, options = {}) {
|
|
|
4826
3360
|
}
|
|
4827
3361
|
|
|
4828
3362
|
|
|
4829
|
-
/***/ }
|
|
3363
|
+
/***/ },
|
|
4830
3364
|
|
|
4831
|
-
/***/ 80514
|
|
4832
|
-
|
|
3365
|
+
/***/ 80514
|
|
3366
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
4833
3367
|
|
|
4834
3368
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4835
3369
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
@@ -4869,26 +3403,10 @@ const pointCanProjectOnLine = (p, p1, p2, proximity) => {
|
|
|
4869
3403
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pointCanProjectOnLine);
|
|
4870
3404
|
|
|
4871
3405
|
|
|
4872
|
-
/***/ }
|
|
4873
|
-
|
|
4874
|
-
/***/ 82265:
|
|
4875
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4876
|
-
|
|
4877
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4878
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
4879
|
-
/* harmony export */ });
|
|
4880
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
|
|
4881
|
-
|
|
4882
|
-
const pointsAreWithinCloseContourProximity = (p1, p2, closeContourProximity) => {
|
|
4883
|
-
return gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.dist */ .Zc.dist(p1, p2) < closeContourProximity;
|
|
4884
|
-
};
|
|
4885
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pointsAreWithinCloseContourProximity);
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
/***/ }),
|
|
3406
|
+
/***/ },
|
|
4889
3407
|
|
|
4890
|
-
/***/ 28502
|
|
4891
|
-
|
|
3408
|
+
/***/ 28502
|
|
3409
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
4892
3410
|
|
|
4893
3411
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4894
3412
|
/* harmony export */ p: () => (/* binding */ projectTo2D)
|
|
@@ -4921,483 +3439,10 @@ function projectTo2D(polyline) {
|
|
|
4921
3439
|
}
|
|
4922
3440
|
|
|
4923
3441
|
|
|
4924
|
-
/***/ }
|
|
4925
|
-
|
|
4926
|
-
/***/ 36039:
|
|
4927
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
4928
|
-
|
|
4929
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4930
|
-
/* harmony export */ O4: () => (/* binding */ robustSegmentIntersection),
|
|
4931
|
-
/* harmony export */ Sk: () => (/* binding */ pointsAreEqual),
|
|
4932
|
-
/* harmony export */ lG: () => (/* binding */ IntersectionDirection),
|
|
4933
|
-
/* harmony export */ n7: () => (/* binding */ PolylineNodeType),
|
|
4934
|
-
/* harmony export */ p8: () => (/* binding */ EPSILON)
|
|
4935
|
-
/* harmony export */ });
|
|
4936
|
-
/* unused harmony export vec2CrossZ */
|
|
4937
|
-
/* harmony import */ var _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15327);
|
|
4938
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3823);
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
const EPSILON = 1e-7;
|
|
4942
|
-
function vec2CrossZ(a, b) {
|
|
4943
|
-
return a[0] * b[1] - a[1] * b[0];
|
|
4944
|
-
}
|
|
4945
|
-
function pointsAreEqual(p1, p2) {
|
|
4946
|
-
return _cornerstonejs_core__WEBPACK_IMPORTED_MODULE_0__.utilities.isEqual(p1, p2, EPSILON);
|
|
4947
|
-
}
|
|
4948
|
-
function robustSegmentIntersection(p1, p2, q1, q2) {
|
|
4949
|
-
const r = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p2, p1);
|
|
4950
|
-
const s = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q2, q1);
|
|
4951
|
-
const rxs = vec2CrossZ(r, s);
|
|
4952
|
-
const qmp = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, p1);
|
|
4953
|
-
const qmpxr = vec2CrossZ(qmp, r);
|
|
4954
|
-
if (Math.abs(rxs) < EPSILON) {
|
|
4955
|
-
if (Math.abs(qmpxr) < EPSILON) {
|
|
4956
|
-
const rDotR = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(r, r);
|
|
4957
|
-
const sDotS = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(s, s);
|
|
4958
|
-
if (rDotR < EPSILON || sDotS < EPSILON) {
|
|
4959
|
-
if (pointsAreEqual(p1, q1) || pointsAreEqual(p1, q2)) {
|
|
4960
|
-
return p1;
|
|
4961
|
-
}
|
|
4962
|
-
if (pointsAreEqual(p2, q1) || pointsAreEqual(p2, q2)) {
|
|
4963
|
-
return p2;
|
|
4964
|
-
}
|
|
4965
|
-
return null;
|
|
4966
|
-
}
|
|
4967
|
-
const t0 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, p1), r) / rDotR;
|
|
4968
|
-
const t1 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q2, p1), r) / rDotR;
|
|
4969
|
-
const u0 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p1, q1), s) / sDotS;
|
|
4970
|
-
const u1 = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.dot */ .Zc.dot(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p2, q1), s) / sDotS;
|
|
4971
|
-
const isInRange = (t) => t >= -EPSILON && t <= 1 + EPSILON;
|
|
4972
|
-
if (isInRange(t0)) {
|
|
4973
|
-
const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p1, r, t0);
|
|
4974
|
-
if (pointsAreEqual(q1, projectedPoint)) {
|
|
4975
|
-
return q1;
|
|
4976
|
-
}
|
|
4977
|
-
}
|
|
4978
|
-
if (isInRange(t1)) {
|
|
4979
|
-
const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), p1, r, t1);
|
|
4980
|
-
if (pointsAreEqual(q2, projectedPoint)) {
|
|
4981
|
-
return q2;
|
|
4982
|
-
}
|
|
4983
|
-
}
|
|
4984
|
-
if (isInRange(u0)) {
|
|
4985
|
-
const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, s, u0);
|
|
4986
|
-
if (pointsAreEqual(p1, projectedPoint)) {
|
|
4987
|
-
return p1;
|
|
4988
|
-
}
|
|
4989
|
-
}
|
|
4990
|
-
if (isInRange(u1)) {
|
|
4991
|
-
const projectedPoint = gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.scaleAndAdd */ .Zc.scaleAndAdd(gl_matrix__WEBPACK_IMPORTED_MODULE_1__/* .vec2.create */ .Zc.create(), q1, s, u1);
|
|
4992
|
-
if (pointsAreEqual(p2, projectedPoint)) {
|
|
4993
|
-
return p2;
|
|
4994
|
-
}
|
|
4995
|
-
}
|
|
4996
|
-
}
|
|
4997
|
-
return null;
|
|
4998
|
-
}
|
|
4999
|
-
const t = vec2CrossZ(qmp, s) / rxs;
|
|
5000
|
-
const u = qmpxr / rxs;
|
|
5001
|
-
if (t >= -EPSILON && t <= 1 + EPSILON && u >= -EPSILON && u <= 1 + EPSILON) {
|
|
5002
|
-
return [p1[0] + t * r[0], p1[1] + t * r[1]];
|
|
5003
|
-
}
|
|
5004
|
-
return null;
|
|
5005
|
-
}
|
|
5006
|
-
var PolylineNodeType;
|
|
5007
|
-
(function (PolylineNodeType) {
|
|
5008
|
-
PolylineNodeType[PolylineNodeType["Vertex"] = 0] = "Vertex";
|
|
5009
|
-
PolylineNodeType[PolylineNodeType["Intersection"] = 1] = "Intersection";
|
|
5010
|
-
})(PolylineNodeType || (PolylineNodeType = {}));
|
|
5011
|
-
var IntersectionDirection;
|
|
5012
|
-
(function (IntersectionDirection) {
|
|
5013
|
-
IntersectionDirection[IntersectionDirection["Entering"] = 0] = "Entering";
|
|
5014
|
-
IntersectionDirection[IntersectionDirection["Exiting"] = 1] = "Exiting";
|
|
5015
|
-
IntersectionDirection[IntersectionDirection["Unknown"] = 2] = "Unknown";
|
|
5016
|
-
})(IntersectionDirection || (IntersectionDirection = {}));
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
/***/ }),
|
|
5020
|
-
|
|
5021
|
-
/***/ 6521:
|
|
5022
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5023
|
-
|
|
5024
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5025
|
-
/* harmony export */ A: () => (/* binding */ subtractPolylines)
|
|
5026
|
-
/* harmony export */ });
|
|
5027
|
-
/* harmony import */ var gl_matrix__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3823);
|
|
5028
|
-
/* harmony import */ var _getSignedArea__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63113);
|
|
5029
|
-
/* harmony import */ var _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36039);
|
|
5030
|
-
/* harmony import */ var _containsPoint__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(46513);
|
|
5031
|
-
/* harmony import */ var _arePolylinesIdentical__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(15346);
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
function subtractPolylines(targetPolylineCoords, sourcePolylineCoordsInput) {
|
|
5038
|
-
if (targetPolylineCoords.length < 3) {
|
|
5039
|
-
return [];
|
|
5040
|
-
}
|
|
5041
|
-
if (sourcePolylineCoordsInput.length < 3) {
|
|
5042
|
-
return [targetPolylineCoords.slice()];
|
|
5043
|
-
}
|
|
5044
|
-
const sourcePolylineCoords = sourcePolylineCoordsInput.slice();
|
|
5045
|
-
if ((0,_arePolylinesIdentical__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A)(targetPolylineCoords, sourcePolylineCoordsInput)) {
|
|
5046
|
-
return [];
|
|
5047
|
-
}
|
|
5048
|
-
const targetArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(targetPolylineCoords);
|
|
5049
|
-
const sourceArea = (0,_getSignedArea__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(sourcePolylineCoords);
|
|
5050
|
-
if (Math.sign(targetArea) === Math.sign(sourceArea) &&
|
|
5051
|
-
Math.abs(sourceArea) > _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .EPSILON */ .p8) {
|
|
5052
|
-
sourcePolylineCoords.reverse();
|
|
5053
|
-
}
|
|
5054
|
-
const intersections = [];
|
|
5055
|
-
for (let i = 0; i < targetPolylineCoords.length; i++) {
|
|
5056
|
-
const p1 = targetPolylineCoords[i];
|
|
5057
|
-
const p2 = targetPolylineCoords[(i + 1) % targetPolylineCoords.length];
|
|
5058
|
-
for (let j = 0; j < sourcePolylineCoords.length; j++) {
|
|
5059
|
-
const q1 = sourcePolylineCoords[j];
|
|
5060
|
-
const q2 = sourcePolylineCoords[(j + 1) % sourcePolylineCoords.length];
|
|
5061
|
-
const intersectPt = (0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .robustSegmentIntersection */ .O4)(p1, p2, q1, q2);
|
|
5062
|
-
if (intersectPt) {
|
|
5063
|
-
const lenP = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, p2));
|
|
5064
|
-
const lenQ = Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, q2));
|
|
5065
|
-
intersections.push({
|
|
5066
|
-
coord: intersectPt,
|
|
5067
|
-
seg1Idx: i,
|
|
5068
|
-
seg2Idx: j,
|
|
5069
|
-
alpha1: lenP < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .EPSILON */ .p8
|
|
5070
|
-
? 0
|
|
5071
|
-
: Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(p1, intersectPt)) / lenP,
|
|
5072
|
-
alpha2: lenQ < _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .EPSILON */ .p8
|
|
5073
|
-
? 0
|
|
5074
|
-
: Math.sqrt(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.squaredDistance */ .Zc.squaredDistance(q1, intersectPt)) / lenQ,
|
|
5075
|
-
});
|
|
5076
|
-
}
|
|
5077
|
-
}
|
|
5078
|
-
}
|
|
5079
|
-
const buildAugmentedList = (polyCoords, polyIndex, allIntersections) => {
|
|
5080
|
-
const augmentedList = [];
|
|
5081
|
-
let nodeIdCounter = 0;
|
|
5082
|
-
for (let i = 0; i < polyCoords.length; i++) {
|
|
5083
|
-
const p1 = polyCoords[i];
|
|
5084
|
-
augmentedList.push({
|
|
5085
|
-
id: `${polyIndex}_v${nodeIdCounter++}`,
|
|
5086
|
-
coordinates: p1,
|
|
5087
|
-
type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .PolylineNodeType */ .n7.Vertex,
|
|
5088
|
-
originalPolyIndex: polyIndex,
|
|
5089
|
-
originalVertexIndex: i,
|
|
5090
|
-
next: null,
|
|
5091
|
-
prev: null,
|
|
5092
|
-
isIntersection: false,
|
|
5093
|
-
visited: false,
|
|
5094
|
-
});
|
|
5095
|
-
const segmentIntersections = allIntersections
|
|
5096
|
-
.filter((isect) => (polyIndex === 0 ? isect.seg1Idx : isect.seg2Idx) === i)
|
|
5097
|
-
.sort((a, b) => (polyIndex === 0 ? a.alpha1 : a.alpha2) -
|
|
5098
|
-
(polyIndex === 0 ? b.alpha1 : b.alpha2));
|
|
5099
|
-
for (const isect of segmentIntersections) {
|
|
5100
|
-
if (augmentedList.length > 0 &&
|
|
5101
|
-
(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(augmentedList[augmentedList.length - 1].coordinates, isect.coord)) {
|
|
5102
|
-
if (!augmentedList[augmentedList.length - 1].isIntersection) {
|
|
5103
|
-
augmentedList[augmentedList.length - 1].isIntersection = true;
|
|
5104
|
-
augmentedList[augmentedList.length - 1].intersectionInfo = isect;
|
|
5105
|
-
augmentedList[augmentedList.length - 1].alpha =
|
|
5106
|
-
polyIndex === 0 ? isect.alpha1 : isect.alpha2;
|
|
5107
|
-
}
|
|
5108
|
-
continue;
|
|
5109
|
-
}
|
|
5110
|
-
augmentedList.push({
|
|
5111
|
-
id: `${polyIndex}_i${nodeIdCounter++}`,
|
|
5112
|
-
coordinates: isect.coord,
|
|
5113
|
-
type: _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .PolylineNodeType */ .n7.Intersection,
|
|
5114
|
-
originalPolyIndex: polyIndex,
|
|
5115
|
-
next: null,
|
|
5116
|
-
prev: null,
|
|
5117
|
-
isIntersection: true,
|
|
5118
|
-
visited: false,
|
|
5119
|
-
alpha: polyIndex === 0 ? isect.alpha1 : isect.alpha2,
|
|
5120
|
-
intersectionInfo: isect,
|
|
5121
|
-
});
|
|
5122
|
-
}
|
|
5123
|
-
}
|
|
5124
|
-
const finalList = [];
|
|
5125
|
-
if (augmentedList.length > 0) {
|
|
5126
|
-
finalList.push(augmentedList[0]);
|
|
5127
|
-
for (let i = 1; i < augmentedList.length; i++) {
|
|
5128
|
-
if (!(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(augmentedList[i].coordinates, finalList[finalList.length - 1].coordinates)) {
|
|
5129
|
-
finalList.push(augmentedList[i]);
|
|
5130
|
-
}
|
|
5131
|
-
else {
|
|
5132
|
-
if (augmentedList[i].isIntersection) {
|
|
5133
|
-
finalList[finalList.length - 1].isIntersection = true;
|
|
5134
|
-
finalList[finalList.length - 1].intersectionInfo =
|
|
5135
|
-
augmentedList[i].intersectionInfo;
|
|
5136
|
-
finalList[finalList.length - 1].alpha = augmentedList[i].alpha;
|
|
5137
|
-
}
|
|
5138
|
-
}
|
|
5139
|
-
}
|
|
5140
|
-
}
|
|
5141
|
-
if (finalList.length > 0) {
|
|
5142
|
-
for (let i = 0; i < finalList.length; i++) {
|
|
5143
|
-
finalList[i].next = finalList[(i + 1) % finalList.length];
|
|
5144
|
-
finalList[i].prev =
|
|
5145
|
-
finalList[(i - 1 + finalList.length) % finalList.length];
|
|
5146
|
-
}
|
|
5147
|
-
}
|
|
5148
|
-
return finalList;
|
|
5149
|
-
};
|
|
5150
|
-
const targetAugmented = buildAugmentedList(targetPolylineCoords, 0, intersections);
|
|
5151
|
-
const sourceAugmented = buildAugmentedList(sourcePolylineCoords, 1, intersections);
|
|
5152
|
-
targetAugmented.forEach((tnode) => {
|
|
5153
|
-
if (tnode.isIntersection) {
|
|
5154
|
-
const tData = tnode.intersectionInfo;
|
|
5155
|
-
const partner = sourceAugmented.find((snode) => snode.isIntersection &&
|
|
5156
|
-
(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(snode.coordinates, tnode.coordinates) &&
|
|
5157
|
-
snode.intersectionInfo.seg1Idx ===
|
|
5158
|
-
tData.seg1Idx &&
|
|
5159
|
-
snode.intersectionInfo.seg2Idx === tData.seg2Idx);
|
|
5160
|
-
if (partner) {
|
|
5161
|
-
tnode.partnerNode = partner;
|
|
5162
|
-
partner.partnerNode = tnode;
|
|
5163
|
-
const p_prev = tnode.prev.coordinates;
|
|
5164
|
-
const p_curr = tnode.coordinates;
|
|
5165
|
-
const p_next_source = partner.next.coordinates;
|
|
5166
|
-
const v_target_arrival = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p_curr, p_prev);
|
|
5167
|
-
const v_source_departure = gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.subtract */ .Zc.subtract(gl_matrix__WEBPACK_IMPORTED_MODULE_0__/* .vec2.create */ .Zc.create(), p_next_source, p_curr);
|
|
5168
|
-
const midPrevTargetSeg = [
|
|
5169
|
-
(tnode.prev.coordinates[0] + tnode.coordinates[0]) / 2,
|
|
5170
|
-
(tnode.prev.coordinates[1] + tnode.coordinates[1]) / 2,
|
|
5171
|
-
];
|
|
5172
|
-
const prevSegMidpointInsideSource = (0,_containsPoint__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(sourcePolylineCoordsInput, midPrevTargetSeg);
|
|
5173
|
-
if (prevSegMidpointInsideSource) {
|
|
5174
|
-
tnode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .IntersectionDirection */ .lG.Exiting;
|
|
5175
|
-
}
|
|
5176
|
-
else {
|
|
5177
|
-
tnode.intersectionDir = _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .IntersectionDirection */ .lG.Entering;
|
|
5178
|
-
}
|
|
5179
|
-
}
|
|
5180
|
-
else {
|
|
5181
|
-
tnode.isIntersection = false;
|
|
5182
|
-
}
|
|
5183
|
-
}
|
|
5184
|
-
});
|
|
5185
|
-
targetAugmented.forEach((n) => delete n.intersectionInfo);
|
|
5186
|
-
sourceAugmented.forEach((n) => delete n.intersectionInfo);
|
|
5187
|
-
const resultPolylines = [];
|
|
5188
|
-
for (let i = 0; i < targetAugmented.length; i++) {
|
|
5189
|
-
const startNode = targetAugmented[i];
|
|
5190
|
-
if (startNode.visited || startNode.isIntersection) {
|
|
5191
|
-
continue;
|
|
5192
|
-
}
|
|
5193
|
-
if ((0,_containsPoint__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(sourcePolylineCoordsInput, startNode.coordinates)) {
|
|
5194
|
-
continue;
|
|
5195
|
-
}
|
|
5196
|
-
const currentPathCoords = [];
|
|
5197
|
-
let currentNode = startNode;
|
|
5198
|
-
let onTargetList = true;
|
|
5199
|
-
let safetyBreak = 0;
|
|
5200
|
-
const maxIter = (targetAugmented.length + sourceAugmented.length) * 2;
|
|
5201
|
-
do {
|
|
5202
|
-
if (safetyBreak++ > maxIter) {
|
|
5203
|
-
console.warn('Subtraction: Max iterations reached, possible infinite loop.');
|
|
5204
|
-
break;
|
|
5205
|
-
}
|
|
5206
|
-
currentNode.visited = true;
|
|
5207
|
-
if (currentPathCoords.length === 0 ||
|
|
5208
|
-
!(0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(currentPathCoords[currentPathCoords.length - 1], currentNode.coordinates)) {
|
|
5209
|
-
currentPathCoords.push(currentNode.coordinates);
|
|
5210
|
-
}
|
|
5211
|
-
if (currentNode.isIntersection) {
|
|
5212
|
-
if (onTargetList) {
|
|
5213
|
-
if (currentNode.intersectionDir === _robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .IntersectionDirection */ .lG.Entering &&
|
|
5214
|
-
currentNode.partnerNode) {
|
|
5215
|
-
currentNode = currentNode.partnerNode;
|
|
5216
|
-
onTargetList = false;
|
|
5217
|
-
}
|
|
5218
|
-
}
|
|
5219
|
-
else {
|
|
5220
|
-
if (currentNode.partnerNode) {
|
|
5221
|
-
currentNode = currentNode.partnerNode;
|
|
5222
|
-
onTargetList = true;
|
|
5223
|
-
}
|
|
5224
|
-
else {
|
|
5225
|
-
console.warn('Subtraction: Intersection on source without partner.');
|
|
5226
|
-
}
|
|
5227
|
-
}
|
|
5228
|
-
}
|
|
5229
|
-
currentNode = currentNode.next;
|
|
5230
|
-
} while (currentNode !== startNode || !onTargetList);
|
|
5231
|
-
if (currentPathCoords.length >= 3) {
|
|
5232
|
-
if ((0,_robustSegmentIntersection__WEBPACK_IMPORTED_MODULE_2__/* .pointsAreEqual */ .Sk)(currentPathCoords[0], currentPathCoords[currentPathCoords.length - 1])) {
|
|
5233
|
-
currentPathCoords.pop();
|
|
5234
|
-
}
|
|
5235
|
-
if (currentPathCoords.length >= 3) {
|
|
5236
|
-
resultPolylines.push(currentPathCoords);
|
|
5237
|
-
}
|
|
5238
|
-
}
|
|
5239
|
-
}
|
|
5240
|
-
return resultPolylines;
|
|
5241
|
-
}
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
/***/ }),
|
|
5245
|
-
|
|
5246
|
-
/***/ 33657:
|
|
5247
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5248
|
-
|
|
5249
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5250
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5251
|
-
/* harmony export */ distanceToPoint: () => (/* reexport safe */ _distanceToPoint__WEBPACK_IMPORTED_MODULE_0__.A)
|
|
5252
|
-
/* harmony export */ });
|
|
5253
|
-
/* harmony import */ var _distanceToPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87105);
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
/***/ }),
|
|
5259
|
-
|
|
5260
|
-
/***/ 23324:
|
|
5261
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5262
|
-
|
|
5263
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5264
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5265
|
-
/* harmony export */ findClosestPoint: () => (/* reexport safe */ _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__.A),
|
|
5266
|
-
/* harmony export */ liangBarksyClip: () => (/* reexport safe */ _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__.A)
|
|
5267
|
-
/* harmony export */ });
|
|
5268
|
-
/* harmony import */ var _findClosestPoint__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(90554);
|
|
5269
|
-
/* harmony import */ var _liangBarksyClip__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35381);
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
/***/ }),
|
|
5276
|
-
|
|
5277
|
-
/***/ 35381:
|
|
5278
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5279
|
-
|
|
5280
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5281
|
-
/* harmony export */ A: () => (/* binding */ clip)
|
|
5282
|
-
/* harmony export */ });
|
|
5283
|
-
const EPSILON = 1e-6;
|
|
5284
|
-
const INSIDE = 1;
|
|
5285
|
-
const OUTSIDE = 0;
|
|
5286
|
-
function clipT(num, denom, c) {
|
|
5287
|
-
const [tE, tL] = c;
|
|
5288
|
-
if (Math.abs(denom) < EPSILON) {
|
|
5289
|
-
return num < 0;
|
|
5290
|
-
}
|
|
5291
|
-
const t = num / denom;
|
|
5292
|
-
if (denom > 0) {
|
|
5293
|
-
if (t > tL) {
|
|
5294
|
-
return 0;
|
|
5295
|
-
}
|
|
5296
|
-
if (t > tE) {
|
|
5297
|
-
c[0] = t;
|
|
5298
|
-
}
|
|
5299
|
-
}
|
|
5300
|
-
else {
|
|
5301
|
-
if (t < tE) {
|
|
5302
|
-
return 0;
|
|
5303
|
-
}
|
|
5304
|
-
if (t < tL) {
|
|
5305
|
-
c[1] = t;
|
|
5306
|
-
}
|
|
5307
|
-
}
|
|
5308
|
-
return 1;
|
|
5309
|
-
}
|
|
5310
|
-
function clip(a, b, box, da, db) {
|
|
5311
|
-
const [x1, y1] = a;
|
|
5312
|
-
const [x2, y2] = b;
|
|
5313
|
-
const dx = x2 - x1;
|
|
5314
|
-
const dy = y2 - y1;
|
|
5315
|
-
if (da === undefined || db === undefined) {
|
|
5316
|
-
da = a;
|
|
5317
|
-
db = b;
|
|
5318
|
-
}
|
|
5319
|
-
else {
|
|
5320
|
-
da[0] = a[0];
|
|
5321
|
-
da[1] = a[1];
|
|
5322
|
-
db[0] = b[0];
|
|
5323
|
-
db[1] = b[1];
|
|
5324
|
-
}
|
|
5325
|
-
if (Math.abs(dx) < EPSILON &&
|
|
5326
|
-
Math.abs(dy) < EPSILON &&
|
|
5327
|
-
x1 >= box[0] &&
|
|
5328
|
-
x1 <= box[2] &&
|
|
5329
|
-
y1 >= box[1] &&
|
|
5330
|
-
y1 <= box[3]) {
|
|
5331
|
-
return INSIDE;
|
|
5332
|
-
}
|
|
5333
|
-
const c = [0, 1];
|
|
5334
|
-
if (clipT(box[0] - x1, dx, c) &&
|
|
5335
|
-
clipT(x1 - box[2], -dx, c) &&
|
|
5336
|
-
clipT(box[1] - y1, dy, c) &&
|
|
5337
|
-
clipT(y1 - box[3], -dy, c)) {
|
|
5338
|
-
const [tE, tL] = c;
|
|
5339
|
-
if (tL < 1) {
|
|
5340
|
-
db[0] = x1 + tL * dx;
|
|
5341
|
-
db[1] = y1 + tL * dy;
|
|
5342
|
-
}
|
|
5343
|
-
if (tE > 0) {
|
|
5344
|
-
da[0] += tE * dx;
|
|
5345
|
-
da[1] += tE * dy;
|
|
5346
|
-
}
|
|
5347
|
-
return INSIDE;
|
|
5348
|
-
}
|
|
5349
|
-
return OUTSIDE;
|
|
5350
|
-
}
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
/***/ }),
|
|
5354
|
-
|
|
5355
|
-
/***/ 13165:
|
|
5356
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
5357
|
-
|
|
5358
|
-
__webpack_require__.r(__webpack_exports__);
|
|
5359
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5360
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
5361
|
-
/* harmony export */ filterAnnotationsForDisplay: () => (/* reexport safe */ _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__.A),
|
|
5362
|
-
/* harmony export */ filterAnnotationsWithinSamePlane: () => (/* reexport safe */ _filterAnnotationsWithinPlane__WEBPACK_IMPORTED_MODULE_6__.W),
|
|
5363
|
-
/* harmony export */ filterAnnotationsWithinSlice: () => (/* reexport safe */ _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__.A),
|
|
5364
|
-
/* harmony export */ getPointInLineOfSightWithCriteria: () => (/* reexport safe */ _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__.R),
|
|
5365
|
-
/* harmony export */ getPointsInLineOfSight: () => (/* reexport safe */ _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__.p),
|
|
5366
|
-
/* harmony export */ getWorldWidthAndHeightFromCorners: () => (/* reexport safe */ _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__.A),
|
|
5367
|
-
/* harmony export */ getWorldWidthAndHeightFromTwoPoints: () => (/* reexport safe */ _getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_3__.A),
|
|
5368
|
-
/* harmony export */ isPlaneIntersectingAABB: () => (/* reexport safe */ _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_5__.Y)
|
|
5369
|
-
/* harmony export */ });
|
|
5370
|
-
/* harmony import */ var _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36374);
|
|
5371
|
-
/* harmony import */ var _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(35489);
|
|
5372
|
-
/* harmony import */ var _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94418);
|
|
5373
|
-
/* harmony import */ var _getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(62514);
|
|
5374
|
-
/* harmony import */ var _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57063);
|
|
5375
|
-
/* harmony import */ var _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(30698);
|
|
5376
|
-
/* harmony import */ var _filterAnnotationsWithinPlane__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(40770);
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
5385
|
-
filterAnnotationsWithinSlice: _filterAnnotationsWithinSlice__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A,
|
|
5386
|
-
getWorldWidthAndHeightFromCorners: _getWorldWidthAndHeightFromCorners__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A,
|
|
5387
|
-
getWorldWidthAndHeightFromTwoPoints: _getWorldWidthAndHeightFromTwoPoints__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A,
|
|
5388
|
-
filterAnnotationsForDisplay: _filterAnnotationsForDisplay__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A,
|
|
5389
|
-
getPointInLineOfSightWithCriteria: _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__/* .getPointInLineOfSightWithCriteria */ .R,
|
|
5390
|
-
isPlaneIntersectingAABB: _isPlaneIntersectingAABB__WEBPACK_IMPORTED_MODULE_5__/* .isPlaneIntersectingAABB */ .Y,
|
|
5391
|
-
filterAnnotationsWithinSamePlane: _filterAnnotationsWithinPlane__WEBPACK_IMPORTED_MODULE_6__/* .filterAnnotationsWithinSamePlane */ .W,
|
|
5392
|
-
getPointsInLineOfSight: _getPointInLineOfSightWithCriteria__WEBPACK_IMPORTED_MODULE_4__/* .getPointsInLineOfSight */ .p,
|
|
5393
|
-
});
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
/***/ }),
|
|
3442
|
+
/***/ },
|
|
5398
3443
|
|
|
5399
|
-
/***/ 61587
|
|
5400
|
-
|
|
3444
|
+
/***/ 61587
|
|
3445
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5401
3446
|
|
|
5402
3447
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5403
3448
|
/* harmony export */ A: () => (/* binding */ smoothAnnotation)
|
|
@@ -5462,10 +3507,10 @@ function smoothAnnotation(annotation, options) {
|
|
|
5462
3507
|
}
|
|
5463
3508
|
|
|
5464
3509
|
|
|
5465
|
-
/***/ }
|
|
3510
|
+
/***/ },
|
|
5466
3511
|
|
|
5467
|
-
/***/ 10564
|
|
5468
|
-
|
|
3512
|
+
/***/ 10564
|
|
3513
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5469
3514
|
|
|
5470
3515
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5471
3516
|
/* harmony export */ BX: () => (/* binding */ DEFAULT_NEGATIVE_SEED_MARGIN),
|
|
@@ -5487,10 +3532,10 @@ const DEFAULT_NEGATIVE_SEEDS_COUNT = 70;
|
|
|
5487
3532
|
const MAX_NEGATIVE_SEED_ATTEMPTS_MULTIPLIER = 50;
|
|
5488
3533
|
|
|
5489
3534
|
|
|
5490
|
-
/***/ }
|
|
3535
|
+
/***/ },
|
|
5491
3536
|
|
|
5492
|
-
/***/ 94762
|
|
5493
|
-
|
|
3537
|
+
/***/ 94762
|
|
3538
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5494
3539
|
|
|
5495
3540
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5496
3541
|
/* harmony export */ Lr: () => (/* binding */ priority),
|
|
@@ -5581,10 +3626,10 @@ const clearFromImageIds = (stack) => {
|
|
|
5581
3626
|
};
|
|
5582
3627
|
|
|
5583
3628
|
|
|
5584
|
-
/***/ }
|
|
3629
|
+
/***/ },
|
|
5585
3630
|
|
|
5586
|
-
/***/ 30045
|
|
5587
|
-
|
|
3631
|
+
/***/ 30045
|
|
3632
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5588
3633
|
|
|
5589
3634
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5590
3635
|
/* harmony export */ P: () => (/* binding */ addToolState),
|
|
@@ -5606,10 +3651,10 @@ function getToolState(element) {
|
|
|
5606
3651
|
|
|
5607
3652
|
|
|
5608
3653
|
|
|
5609
|
-
/***/ }
|
|
3654
|
+
/***/ },
|
|
5610
3655
|
|
|
5611
|
-
/***/ 33517
|
|
5612
|
-
|
|
3656
|
+
/***/ 33517
|
|
3657
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5613
3658
|
|
|
5614
3659
|
|
|
5615
3660
|
// EXPORTS
|
|
@@ -5818,10 +3863,10 @@ class ColorbarCanvas {
|
|
|
5818
3863
|
|
|
5819
3864
|
|
|
5820
3865
|
|
|
5821
|
-
/***/ }
|
|
3866
|
+
/***/ },
|
|
5822
3867
|
|
|
5823
|
-
/***/ 62184
|
|
5824
|
-
|
|
3868
|
+
/***/ 62184
|
|
3869
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
5825
3870
|
|
|
5826
3871
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5827
3872
|
/* harmony export */ f: () => (/* binding */ ColorbarTicks)
|
|
@@ -6124,10 +4169,10 @@ class ColorbarTicks {
|
|
|
6124
4169
|
|
|
6125
4170
|
|
|
6126
4171
|
|
|
6127
|
-
/***/ }
|
|
4172
|
+
/***/ },
|
|
6128
4173
|
|
|
6129
|
-
/***/ 57227
|
|
6130
|
-
|
|
4174
|
+
/***/ 57227
|
|
4175
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6131
4176
|
|
|
6132
4177
|
|
|
6133
4178
|
// EXPORTS
|
|
@@ -6169,10 +4214,10 @@ const areColorbarSizesEqual = (a, b) => {
|
|
|
6169
4214
|
|
|
6170
4215
|
|
|
6171
4216
|
|
|
6172
|
-
/***/ }
|
|
4217
|
+
/***/ },
|
|
6173
4218
|
|
|
6174
|
-
/***/ 79457
|
|
6175
|
-
|
|
4219
|
+
/***/ 79457
|
|
4220
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6176
4221
|
|
|
6177
4222
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6178
4223
|
/* harmony export */ A: () => (/* binding */ isRangeTextPositionValid)
|
|
@@ -6190,10 +4235,10 @@ function isRangeTextPositionValid(colorbarWidth, colorbarHeight, rangeTextPositi
|
|
|
6190
4235
|
|
|
6191
4236
|
|
|
6192
4237
|
|
|
6193
|
-
/***/ }
|
|
4238
|
+
/***/ },
|
|
6194
4239
|
|
|
6195
|
-
/***/ 44845
|
|
6196
|
-
|
|
4240
|
+
/***/ 44845
|
|
4241
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
6197
4242
|
|
|
6198
4243
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6199
4244
|
/* harmony export */ A: () => (/* binding */ Widget)
|
|
@@ -6267,10 +4312,10 @@ class Widget {
|
|
|
6267
4312
|
|
|
6268
4313
|
|
|
6269
4314
|
|
|
6270
|
-
/***/ }
|
|
4315
|
+
/***/ },
|
|
6271
4316
|
|
|
6272
|
-
/***/ 73435
|
|
6273
|
-
|
|
4317
|
+
/***/ 73435
|
|
4318
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6274
4319
|
|
|
6275
4320
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6276
4321
|
/* harmony export */ Ay: () => (/* binding */ vtkSphereSource$1)
|
|
@@ -6492,10 +4537,10 @@ var vtkSphereSource$1 = {
|
|
|
6492
4537
|
|
|
6493
4538
|
|
|
6494
4539
|
|
|
6495
|
-
/***/ }
|
|
4540
|
+
/***/ },
|
|
6496
4541
|
|
|
6497
|
-
/***/ 53489
|
|
6498
|
-
|
|
4542
|
+
/***/ 53489
|
|
4543
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6499
4544
|
|
|
6500
4545
|
|
|
6501
4546
|
// EXPORTS
|
|
@@ -6800,10 +4845,10 @@ var vtkOrientationMarkerWidget$1 = {
|
|
|
6800
4845
|
|
|
6801
4846
|
|
|
6802
4847
|
|
|
6803
|
-
/***/ }
|
|
4848
|
+
/***/ },
|
|
6804
4849
|
|
|
6805
|
-
/***/ 83338
|
|
6806
|
-
|
|
4850
|
+
/***/ 83338
|
|
4851
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
6807
4852
|
|
|
6808
4853
|
|
|
6809
4854
|
// EXPORTS
|
|
@@ -7170,10 +5215,10 @@ var vtkAnnotatedCubeActor$1 = {
|
|
|
7170
5215
|
|
|
7171
5216
|
|
|
7172
5217
|
|
|
7173
|
-
/***/ }
|
|
5218
|
+
/***/ },
|
|
7174
5219
|
|
|
7175
|
-
/***/ 10341
|
|
7176
|
-
|
|
5220
|
+
/***/ 10341
|
|
5221
|
+
(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
7177
5222
|
|
|
7178
5223
|
|
|
7179
5224
|
// EXPORTS
|
|
@@ -8026,6 +6071,6 @@ var vtkAxesActor$1 = {
|
|
|
8026
6071
|
|
|
8027
6072
|
|
|
8028
6073
|
|
|
8029
|
-
/***/ }
|
|
6074
|
+
/***/ }
|
|
8030
6075
|
|
|
8031
6076
|
}]);
|