@cornerstonejs/tools 1.34.0 → 1.35.0

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.
Files changed (284) hide show
  1. package/dist/cjs/eventDispatchers/mouseEventHandlers/mouseDown.js +4 -4
  2. package/dist/cjs/eventDispatchers/mouseEventHandlers/mouseDown.js.map +1 -1
  3. package/dist/cjs/eventDispatchers/shared/getToolsWithActionsForMouseEvent.js +3 -2
  4. package/dist/cjs/eventDispatchers/shared/getToolsWithActionsForMouseEvent.js.map +1 -1
  5. package/dist/cjs/index.d.ts +2 -2
  6. package/dist/cjs/index.js +3 -2
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/cjs/tools/AdvancedMagnifyTool.d.ts +4 -0
  9. package/dist/cjs/tools/AdvancedMagnifyTool.js +8 -3
  10. package/dist/cjs/tools/AdvancedMagnifyTool.js.map +1 -1
  11. package/dist/cjs/tools/annotation/SplineROITool.d.ts +59 -0
  12. package/dist/cjs/tools/annotation/SplineROITool.js +709 -0
  13. package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -0
  14. package/dist/cjs/tools/annotation/splines/BSpline.d.ts +5 -0
  15. package/dist/cjs/tools/annotation/splines/BSpline.js +14 -0
  16. package/dist/cjs/tools/annotation/splines/BSpline.js.map +1 -0
  17. package/dist/cjs/tools/annotation/splines/CardinalSpline.d.ts +12 -0
  18. package/dist/cjs/tools/annotation/splines/CardinalSpline.js +38 -0
  19. package/dist/cjs/tools/annotation/splines/CardinalSpline.js.map +1 -0
  20. package/dist/cjs/tools/annotation/splines/CatmullRomSpline.d.ts +5 -0
  21. package/dist/cjs/tools/annotation/splines/CatmullRomSpline.js +12 -0
  22. package/dist/cjs/tools/annotation/splines/CatmullRomSpline.js.map +1 -0
  23. package/dist/cjs/tools/annotation/splines/CubicSpline.d.ts +13 -0
  24. package/dist/cjs/tools/annotation/splines/CubicSpline.js +192 -0
  25. package/dist/cjs/tools/annotation/splines/CubicSpline.js.map +1 -0
  26. package/dist/cjs/tools/annotation/splines/LinearSpline.d.ts +5 -0
  27. package/dist/cjs/tools/annotation/splines/LinearSpline.js +12 -0
  28. package/dist/cjs/tools/annotation/splines/LinearSpline.js.map +1 -0
  29. package/dist/cjs/tools/annotation/splines/QuadraticBezier.d.ts +6 -0
  30. package/dist/cjs/tools/annotation/splines/QuadraticBezier.js +20 -0
  31. package/dist/cjs/tools/annotation/splines/QuadraticBezier.js.map +1 -0
  32. package/dist/cjs/tools/annotation/splines/QuadraticSpline.d.ts +9 -0
  33. package/dist/cjs/tools/annotation/splines/QuadraticSpline.js +18 -0
  34. package/dist/cjs/tools/annotation/splines/QuadraticSpline.js.map +1 -0
  35. package/dist/cjs/tools/annotation/splines/Spline.d.ts +49 -0
  36. package/dist/cjs/tools/annotation/splines/Spline.js +420 -0
  37. package/dist/cjs/tools/annotation/splines/Spline.js.map +1 -0
  38. package/dist/cjs/tools/index.d.ts +2 -1
  39. package/dist/cjs/tools/index.js +3 -1
  40. package/dist/cjs/tools/index.js.map +1 -1
  41. package/dist/cjs/types/CardinalSplineProps.d.ts +5 -0
  42. package/dist/cjs/types/CardinalSplineProps.js +3 -0
  43. package/dist/cjs/types/CardinalSplineProps.js.map +1 -0
  44. package/dist/cjs/types/ClosestControlPoint.d.ts +4 -0
  45. package/dist/cjs/types/ClosestControlPoint.js +3 -0
  46. package/dist/cjs/types/ClosestControlPoint.js.map +1 -0
  47. package/dist/cjs/types/ClosestPoint.d.ts +5 -0
  48. package/dist/cjs/types/ClosestPoint.js +3 -0
  49. package/dist/cjs/types/ClosestPoint.js.map +1 -0
  50. package/dist/cjs/types/ClosestSplinePoint.d.ts +4 -0
  51. package/dist/cjs/types/ClosestSplinePoint.js +3 -0
  52. package/dist/cjs/types/ClosestSplinePoint.js.map +1 -0
  53. package/dist/cjs/types/ControlPointInfo.d.ts +5 -0
  54. package/dist/cjs/types/ControlPointInfo.js +3 -0
  55. package/dist/cjs/types/ControlPointInfo.js.map +1 -0
  56. package/dist/cjs/types/ISpline.d.ts +29 -0
  57. package/dist/cjs/types/ISpline.js +3 -0
  58. package/dist/cjs/types/ISpline.js.map +1 -0
  59. package/dist/cjs/types/SplineCurveSegment.d.ts +14 -0
  60. package/dist/cjs/types/SplineCurveSegment.js +3 -0
  61. package/dist/cjs/types/SplineCurveSegment.js.map +1 -0
  62. package/dist/cjs/types/SplineLineSegment.d.ts +10 -0
  63. package/dist/cjs/types/SplineLineSegment.js +3 -0
  64. package/dist/cjs/types/SplineLineSegment.js.map +1 -0
  65. package/dist/cjs/types/SplineProps.d.ts +4 -0
  66. package/dist/cjs/types/SplineProps.js +3 -0
  67. package/dist/cjs/types/SplineProps.js.map +1 -0
  68. package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +34 -0
  69. package/dist/cjs/types/index.d.ts +10 -1
  70. package/dist/cjs/utilities/index.d.ts +2 -3
  71. package/dist/cjs/utilities/index.js +5 -5
  72. package/dist/cjs/utilities/index.js.map +1 -1
  73. package/dist/cjs/utilities/math/aabb/distanceToPoint.d.ts +2 -0
  74. package/dist/cjs/utilities/math/aabb/distanceToPoint.js +11 -0
  75. package/dist/cjs/utilities/math/aabb/distanceToPoint.js.map +1 -0
  76. package/dist/cjs/utilities/math/aabb/distanceToPointSquared.d.ts +2 -0
  77. package/dist/cjs/utilities/math/aabb/distanceToPointSquared.js +24 -0
  78. package/dist/cjs/utilities/math/aabb/distanceToPointSquared.js.map +1 -0
  79. package/dist/cjs/utilities/math/aabb/index.d.ts +2 -0
  80. package/dist/cjs/utilities/math/aabb/index.js +11 -0
  81. package/dist/cjs/utilities/math/aabb/index.js.map +1 -0
  82. package/dist/cjs/utilities/math/index.d.ts +6 -5
  83. package/dist/cjs/utilities/math/index.js +11 -9
  84. package/dist/cjs/utilities/math/index.js.map +1 -1
  85. package/dist/cjs/utilities/math/line/distanceToPointSquared.js +5 -21
  86. package/dist/cjs/utilities/math/line/distanceToPointSquared.js.map +1 -1
  87. package/dist/cjs/utilities/math/line/distanceToPointSquaredInfo.d.ts +5 -0
  88. package/dist/cjs/utilities/math/line/distanceToPointSquaredInfo.js +56 -0
  89. package/dist/cjs/utilities/math/line/distanceToPointSquaredInfo.js.map +1 -0
  90. package/dist/cjs/utilities/math/line/index.d.ts +2 -1
  91. package/dist/cjs/utilities/math/line/index.js +3 -1
  92. package/dist/cjs/utilities/math/line/index.js.map +1 -1
  93. package/dist/cjs/utilities/math/point/distanceToPoint.js +5 -6
  94. package/dist/cjs/utilities/math/point/distanceToPoint.js.map +1 -1
  95. package/dist/cjs/utilities/math/point/distanceToPointSquared.d.ts +4 -0
  96. package/dist/cjs/utilities/math/point/distanceToPointSquared.js +12 -0
  97. package/dist/cjs/utilities/math/point/distanceToPointSquared.js.map +1 -0
  98. package/dist/cjs/utilities/math/point/index.d.ts +3 -2
  99. package/dist/cjs/utilities/math/point/index.js +7 -3
  100. package/dist/cjs/utilities/math/point/index.js.map +1 -1
  101. package/dist/cjs/utilities/math/point/mirror.d.ts +2 -0
  102. package/dist/cjs/utilities/math/point/mirror.js +11 -0
  103. package/dist/cjs/utilities/math/point/mirror.js.map +1 -0
  104. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.js +4 -4
  105. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.js.map +1 -1
  106. package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.js +2 -1
  107. package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.js.map +1 -1
  108. package/dist/esm/index.js +2 -2
  109. package/dist/esm/index.js.map +1 -1
  110. package/dist/esm/tools/AdvancedMagnifyTool.js +8 -3
  111. package/dist/esm/tools/AdvancedMagnifyTool.js.map +1 -1
  112. package/dist/esm/tools/annotation/SplineROITool.js +703 -0
  113. package/dist/esm/tools/annotation/SplineROITool.js.map +1 -0
  114. package/dist/esm/tools/annotation/splines/BSpline.js +10 -0
  115. package/dist/esm/tools/annotation/splines/BSpline.js.map +1 -0
  116. package/dist/esm/tools/annotation/splines/CardinalSpline.js +33 -0
  117. package/dist/esm/tools/annotation/splines/CardinalSpline.js.map +1 -0
  118. package/dist/esm/tools/annotation/splines/CatmullRomSpline.js +8 -0
  119. package/dist/esm/tools/annotation/splines/CatmullRomSpline.js.map +1 -0
  120. package/dist/esm/tools/annotation/splines/CubicSpline.js +165 -0
  121. package/dist/esm/tools/annotation/splines/CubicSpline.js.map +1 -0
  122. package/dist/esm/tools/annotation/splines/LinearSpline.js +8 -0
  123. package/dist/esm/tools/annotation/splines/LinearSpline.js.map +1 -0
  124. package/dist/esm/tools/annotation/splines/QuadraticBezier.js +16 -0
  125. package/dist/esm/tools/annotation/splines/QuadraticBezier.js.map +1 -0
  126. package/dist/esm/tools/annotation/splines/QuadraticSpline.js +14 -0
  127. package/dist/esm/tools/annotation/splines/QuadraticSpline.js.map +1 -0
  128. package/dist/esm/tools/annotation/splines/Spline.js +392 -0
  129. package/dist/esm/tools/annotation/splines/Spline.js.map +1 -0
  130. package/dist/esm/tools/index.js +2 -1
  131. package/dist/esm/tools/index.js.map +1 -1
  132. package/dist/esm/types/CardinalSplineProps.js +2 -0
  133. package/dist/esm/types/CardinalSplineProps.js.map +1 -0
  134. package/dist/esm/types/ClosestControlPoint.js +2 -0
  135. package/dist/esm/types/ClosestControlPoint.js.map +1 -0
  136. package/dist/esm/types/ClosestPoint.js +2 -0
  137. package/dist/esm/types/ClosestPoint.js.map +1 -0
  138. package/dist/esm/types/ClosestSplinePoint.js +2 -0
  139. package/dist/esm/types/ClosestSplinePoint.js.map +1 -0
  140. package/dist/esm/types/ControlPointInfo.js +2 -0
  141. package/dist/esm/types/ControlPointInfo.js.map +1 -0
  142. package/dist/esm/types/ISpline.js +2 -0
  143. package/dist/esm/types/ISpline.js.map +1 -0
  144. package/dist/esm/types/SplineCurveSegment.js +2 -0
  145. package/dist/esm/types/SplineCurveSegment.js.map +1 -0
  146. package/dist/esm/types/SplineLineSegment.js +2 -0
  147. package/dist/esm/types/SplineLineSegment.js.map +1 -0
  148. package/dist/esm/types/SplineProps.js +2 -0
  149. package/dist/esm/types/SplineProps.js.map +1 -0
  150. package/dist/esm/utilities/index.js +2 -3
  151. package/dist/esm/utilities/index.js.map +1 -1
  152. package/dist/esm/utilities/math/aabb/distanceToPoint.js +5 -0
  153. package/dist/esm/utilities/math/aabb/distanceToPoint.js.map +1 -0
  154. package/dist/esm/utilities/math/aabb/distanceToPointSquared.js +21 -0
  155. package/dist/esm/utilities/math/aabb/distanceToPointSquared.js.map +1 -0
  156. package/dist/esm/utilities/math/aabb/index.js +3 -0
  157. package/dist/esm/utilities/math/aabb/index.js.map +1 -0
  158. package/dist/esm/utilities/math/index.js +6 -5
  159. package/dist/esm/utilities/math/index.js.map +1 -1
  160. package/dist/esm/utilities/math/line/distanceToPointSquared.js +2 -21
  161. package/dist/esm/utilities/math/line/distanceToPointSquared.js.map +1 -1
  162. package/dist/esm/utilities/math/line/distanceToPointSquaredInfo.js +30 -0
  163. package/dist/esm/utilities/math/line/distanceToPointSquaredInfo.js.map +1 -0
  164. package/dist/esm/utilities/math/line/index.js +2 -1
  165. package/dist/esm/utilities/math/line/index.js.map +1 -1
  166. package/dist/esm/utilities/math/point/distanceToPoint.js +2 -6
  167. package/dist/esm/utilities/math/point/distanceToPoint.js.map +1 -1
  168. package/dist/esm/utilities/math/point/distanceToPointSquared.js +9 -0
  169. package/dist/esm/utilities/math/point/distanceToPointSquared.js.map +1 -0
  170. package/dist/esm/utilities/math/point/index.js +3 -2
  171. package/dist/esm/utilities/math/point/index.js.map +1 -1
  172. package/dist/esm/utilities/math/point/mirror.js +8 -0
  173. package/dist/esm/utilities/math/point/mirror.js.map +1 -0
  174. package/dist/types/eventDispatchers/mouseEventHandlers/mouseDown.d.ts.map +1 -1
  175. package/dist/types/eventDispatchers/shared/getToolsWithActionsForMouseEvent.d.ts.map +1 -1
  176. package/dist/types/index.d.ts +2 -2
  177. package/dist/types/index.d.ts.map +1 -1
  178. package/dist/types/tools/AdvancedMagnifyTool.d.ts +4 -0
  179. package/dist/types/tools/AdvancedMagnifyTool.d.ts.map +1 -1
  180. package/dist/types/tools/annotation/SplineROITool.d.ts +60 -0
  181. package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -0
  182. package/dist/types/tools/annotation/splines/BSpline.d.ts +6 -0
  183. package/dist/types/tools/annotation/splines/BSpline.d.ts.map +1 -0
  184. package/dist/types/tools/annotation/splines/CardinalSpline.d.ts +13 -0
  185. package/dist/types/tools/annotation/splines/CardinalSpline.d.ts.map +1 -0
  186. package/dist/types/tools/annotation/splines/CatmullRomSpline.d.ts +6 -0
  187. package/dist/types/tools/annotation/splines/CatmullRomSpline.d.ts.map +1 -0
  188. package/dist/types/tools/annotation/splines/CubicSpline.d.ts +14 -0
  189. package/dist/types/tools/annotation/splines/CubicSpline.d.ts.map +1 -0
  190. package/dist/types/tools/annotation/splines/LinearSpline.d.ts +6 -0
  191. package/dist/types/tools/annotation/splines/LinearSpline.d.ts.map +1 -0
  192. package/dist/types/tools/annotation/splines/QuadraticBezier.d.ts +7 -0
  193. package/dist/types/tools/annotation/splines/QuadraticBezier.d.ts.map +1 -0
  194. package/dist/types/tools/annotation/splines/QuadraticSpline.d.ts +10 -0
  195. package/dist/types/tools/annotation/splines/QuadraticSpline.d.ts.map +1 -0
  196. package/dist/types/tools/annotation/splines/Spline.d.ts +50 -0
  197. package/dist/types/tools/annotation/splines/Spline.d.ts.map +1 -0
  198. package/dist/types/tools/index.d.ts +2 -1
  199. package/dist/types/tools/index.d.ts.map +1 -1
  200. package/dist/types/types/CardinalSplineProps.d.ts +6 -0
  201. package/dist/types/types/CardinalSplineProps.d.ts.map +1 -0
  202. package/dist/types/types/ClosestControlPoint.d.ts +5 -0
  203. package/dist/types/types/ClosestControlPoint.d.ts.map +1 -0
  204. package/dist/types/types/ClosestPoint.d.ts +6 -0
  205. package/dist/types/types/ClosestPoint.d.ts.map +1 -0
  206. package/dist/types/types/ClosestSplinePoint.d.ts +5 -0
  207. package/dist/types/types/ClosestSplinePoint.d.ts.map +1 -0
  208. package/dist/types/types/ControlPointInfo.d.ts +6 -0
  209. package/dist/types/types/ControlPointInfo.d.ts.map +1 -0
  210. package/dist/types/types/ISpline.d.ts +30 -0
  211. package/dist/types/types/ISpline.d.ts.map +1 -0
  212. package/dist/types/types/SplineCurveSegment.d.ts +15 -0
  213. package/dist/types/types/SplineCurveSegment.d.ts.map +1 -0
  214. package/dist/types/types/SplineLineSegment.d.ts +11 -0
  215. package/dist/types/types/SplineLineSegment.d.ts.map +1 -0
  216. package/dist/types/types/SplineProps.d.ts +5 -0
  217. package/dist/types/types/SplineProps.d.ts.map +1 -0
  218. package/dist/types/types/ToolSpecificAnnotationTypes.d.ts +34 -0
  219. package/dist/types/types/ToolSpecificAnnotationTypes.d.ts.map +1 -1
  220. package/dist/types/types/index.d.ts +10 -1
  221. package/dist/types/types/index.d.ts.map +1 -1
  222. package/dist/types/utilities/index.d.ts +2 -3
  223. package/dist/types/utilities/index.d.ts.map +1 -1
  224. package/dist/types/utilities/math/aabb/distanceToPoint.d.ts +3 -0
  225. package/dist/types/utilities/math/aabb/distanceToPoint.d.ts.map +1 -0
  226. package/dist/types/utilities/math/aabb/distanceToPointSquared.d.ts +3 -0
  227. package/dist/types/utilities/math/aabb/distanceToPointSquared.d.ts.map +1 -0
  228. package/dist/types/utilities/math/aabb/index.d.ts +3 -0
  229. package/dist/types/utilities/math/aabb/index.d.ts.map +1 -0
  230. package/dist/types/utilities/math/index.d.ts +6 -5
  231. package/dist/types/utilities/math/index.d.ts.map +1 -1
  232. package/dist/types/utilities/math/line/distanceToPointSquared.d.ts.map +1 -1
  233. package/dist/types/utilities/math/line/distanceToPointSquaredInfo.d.ts +6 -0
  234. package/dist/types/utilities/math/line/distanceToPointSquaredInfo.d.ts.map +1 -0
  235. package/dist/types/utilities/math/line/index.d.ts +2 -1
  236. package/dist/types/utilities/math/line/index.d.ts.map +1 -1
  237. package/dist/types/utilities/math/point/distanceToPoint.d.ts.map +1 -1
  238. package/dist/types/utilities/math/point/distanceToPointSquared.d.ts +5 -0
  239. package/dist/types/utilities/math/point/distanceToPointSquared.d.ts.map +1 -0
  240. package/dist/types/utilities/math/point/index.d.ts +3 -2
  241. package/dist/types/utilities/math/point/index.d.ts.map +1 -1
  242. package/dist/types/utilities/math/point/mirror.d.ts +3 -0
  243. package/dist/types/utilities/math/point/mirror.d.ts.map +1 -0
  244. package/dist/umd/index.js +2 -1
  245. package/dist/umd/index.js.LICENSE.txt +6 -0
  246. package/dist/umd/index.js.map +1 -1
  247. package/package.json +3 -3
  248. package/src/eventDispatchers/mouseEventHandlers/mouseDown.ts +8 -6
  249. package/src/eventDispatchers/shared/getToolsWithActionsForMouseEvent.ts +3 -2
  250. package/src/index.ts +2 -0
  251. package/src/tools/AdvancedMagnifyTool.ts +8 -3
  252. package/src/tools/annotation/SplineROITool.ts +1151 -0
  253. package/src/tools/annotation/splines/BSpline.ts +22 -0
  254. package/src/tools/annotation/splines/CardinalSpline.ts +45 -0
  255. package/src/tools/annotation/splines/CatmullRomSpline.ts +19 -0
  256. package/src/tools/annotation/splines/CubicSpline.ts +288 -0
  257. package/src/tools/annotation/splines/LinearSpline.ts +20 -0
  258. package/src/tools/annotation/splines/QuadraticBezier.ts +20 -0
  259. package/src/tools/annotation/splines/QuadraticSpline.ts +25 -0
  260. package/src/tools/annotation/splines/Spline.ts +729 -0
  261. package/src/tools/index.ts +2 -0
  262. package/src/types/CardinalSplineProps.ts +11 -0
  263. package/src/types/ClosestControlPoint.ts +6 -0
  264. package/src/types/ClosestPoint.ts +8 -0
  265. package/src/types/ClosestSplinePoint.ts +6 -0
  266. package/src/types/ControlPointInfo.ts +8 -0
  267. package/src/types/ISpline.ts +164 -0
  268. package/src/types/SplineCurveSegment.ts +28 -0
  269. package/src/types/SplineLineSegment.ts +20 -0
  270. package/src/types/SplineProps.ts +15 -0
  271. package/src/types/ToolSpecificAnnotationTypes.ts +35 -0
  272. package/src/types/index.ts +21 -0
  273. package/src/utilities/index.ts +6 -2
  274. package/src/utilities/math/aabb/distanceToPoint.ts +20 -0
  275. package/src/utilities/math/aabb/distanceToPointSquared.ts +47 -0
  276. package/src/utilities/math/aabb/index.ts +2 -0
  277. package/src/utilities/math/index.ts +10 -8
  278. package/src/utilities/math/line/distanceToPointSquared.ts +3 -29
  279. package/src/utilities/math/line/distanceToPointSquaredInfo.ts +54 -0
  280. package/src/utilities/math/line/index.ts +7 -1
  281. package/src/utilities/math/point/distanceToPoint.ts +2 -10
  282. package/src/utilities/math/point/distanceToPointSquared.ts +21 -0
  283. package/src/utilities/math/point/index.ts +3 -3
  284. package/src/utilities/math/point/mirror.ts +21 -0
@@ -0,0 +1,10 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+ export declare type SplineLineSegment = {
3
+ points: {
4
+ start: Types.Point2;
5
+ end: Types.Point2;
6
+ };
7
+ aabb: Types.AABB2;
8
+ length: number;
9
+ previousLineSegmentsLength: number;
10
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SplineLineSegment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SplineLineSegment.js","sourceRoot":"","sources":["../../../src/types/SplineLineSegment.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export declare type SplineProps = {
2
+ resolution?: number;
3
+ closed?: boolean;
4
+ };
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=SplineProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SplineProps.js","sourceRoot":"","sources":["../../../src/types/SplineProps.ts"],"names":[],"mappings":""}
@@ -1,5 +1,6 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { Annotation } from './AnnotationTypes';
3
+ import { ISpline } from './';
3
4
  interface ROICachedStats {
4
5
  [targetId: string]: {
5
6
  Modality: string;
@@ -110,6 +111,39 @@ export interface CircleROIAnnotation extends Annotation {
110
111
  };
111
112
  };
112
113
  }
114
+ export interface SplineROIAnnotation extends Annotation {
115
+ data: {
116
+ label?: string;
117
+ handles: {
118
+ points: Types.Point3[];
119
+ activeHandleIndex: number | null;
120
+ textBox?: {
121
+ hasMoved: boolean;
122
+ worldPosition: Types.Point3;
123
+ worldBoundingBox: {
124
+ topLeft: Types.Point3;
125
+ topRight: Types.Point3;
126
+ bottomLeft: Types.Point3;
127
+ bottomRight: Types.Point3;
128
+ };
129
+ };
130
+ };
131
+ spline: {
132
+ type: string;
133
+ instance: ISpline;
134
+ resolution: number;
135
+ polyline: Types.Point3[];
136
+ closed: boolean;
137
+ };
138
+ cachedStats?: {
139
+ [targetId: string]: {
140
+ Modality: string;
141
+ area: number;
142
+ areaUnit: string;
143
+ };
144
+ };
145
+ };
146
+ }
113
147
  export interface EllipticalROIAnnotation extends Annotation {
114
148
  data: {
115
149
  handles: {
@@ -29,4 +29,13 @@ import type IAnnotationManager from './IAnnotationManager';
29
29
  import type AnnotationGroupSelector from './AnnotationGroupSelector';
30
30
  import type { Statistics } from './CalculatorTypes';
31
31
  import { LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume } from './LabelmapToolOperationData';
32
- export type { Annotation, Annotations, IAnnotationManager, GroupSpecificAnnotations, AnnotationState, AnnotationStyle, ToolSpecificAnnotationTypes, JumpToSliceOptions, AnnotationGroupSelector, PlanarBoundingBox, ToolProps, PublicToolProps, ToolConfiguration, EventTypes, IPoints, ITouchPoints, IDistance, IToolBinding, SetToolBindingsType, ToolOptionsType, InteractionTypes, ToolAction, IToolGroup, IToolClassReference, ISynchronizerEventHandler, ToolHandle, AnnotationHandle, TextBoxHandle, Segmentation, SegmentationState, SegmentationRepresentationData, SegmentationRepresentationConfig, RepresentationConfig, ToolGroupSpecificRepresentationState, ToolGroupSpecificContourRepresentation, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, RepresentationPublicInput, Color, ColorLUT, LabelmapTypes, SVGCursorDescriptor, SVGPoint, ScrollOptions, CINETypes, BoundsIJK, SVGDrawingHelper, FloodFillResult, FloodFillGetter, FloodFillOptions, ContourSegmentationData, Statistics, LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume, };
32
+ import type { CardinalSplineProps } from './CardinalSplineProps';
33
+ import type { ClosestControlPoint } from './ClosestControlPoint';
34
+ import type { ClosestPoint } from './ClosestPoint';
35
+ import type { ClosestSplinePoint } from './ClosestSplinePoint';
36
+ import type { ControlPointInfo } from './ControlPointInfo';
37
+ import type { ISpline } from './ISpline';
38
+ import type { SplineCurveSegment } from './SplineCurveSegment';
39
+ import type { SplineLineSegment } from './SplineLineSegment';
40
+ import type { SplineProps } from './SplineProps';
41
+ export type { Annotation, Annotations, IAnnotationManager, GroupSpecificAnnotations, AnnotationState, AnnotationStyle, ToolSpecificAnnotationTypes, JumpToSliceOptions, AnnotationGroupSelector, PlanarBoundingBox, ToolProps, PublicToolProps, ToolConfiguration, EventTypes, IPoints, ITouchPoints, IDistance, IToolBinding, SetToolBindingsType, ToolOptionsType, InteractionTypes, ToolAction, IToolGroup, IToolClassReference, ISynchronizerEventHandler, ToolHandle, AnnotationHandle, TextBoxHandle, Segmentation, SegmentationState, SegmentationRepresentationData, SegmentationRepresentationConfig, RepresentationConfig, ToolGroupSpecificRepresentationState, ToolGroupSpecificContourRepresentation, ToolGroupSpecificLabelmapRepresentation, ToolGroupSpecificRepresentation, RepresentationPublicInput, Color, ColorLUT, LabelmapTypes, SVGCursorDescriptor, SVGPoint, ScrollOptions, CINETypes, BoundsIJK, SVGDrawingHelper, FloodFillResult, FloodFillGetter, FloodFillOptions, ContourSegmentationData, Statistics, LabelmapToolOperationData, LabelmapToolOperationDataStack, LabelmapToolOperationDataVolume, CardinalSplineProps, ClosestControlPoint, ClosestPoint, ClosestSplinePoint, ControlPointInfo, ISpline, SplineCurveSegment, SplineLineSegment, SplineProps, };
@@ -4,8 +4,7 @@ import throttle from './throttle';
4
4
  import isObject from './isObject';
5
5
  import clip from './clip';
6
6
  import calibrateImageSpacing from './calibrateImageSpacing';
7
- import getCalibratedLengthUnits from './getCalibratedUnits';
8
- import { getCalibratedScale } from './getCalibratedUnits';
7
+ import { getCalibratedLengthUnits, getCalibratedAreaUnits, getCalibratedScale } from './getCalibratedUnits';
9
8
  import triggerAnnotationRenderForViewportIds from './triggerAnnotationRenderForViewportIds';
10
9
  import triggerAnnotationRender from './triggerAnnotationRender';
11
10
  import jumpToSlice from './viewport/jumpToSlice';
@@ -32,4 +31,4 @@ import * as dynamicVolume from './dynamicVolume';
32
31
  import * as polyDataUtils from './polyData/utils';
33
32
  import * as voi from './voi';
34
33
  import { triggerEvent } from '@cornerstonejs/core';
35
- export { math, planar, viewportFilters, drawing, debounce, dynamicVolume, throttle, orientation, isObject, touch, triggerEvent, calibrateImageSpacing, getCalibratedLengthUnits, getCalibratedScale, segmentation, triggerAnnotationRenderForViewportIds, triggerAnnotationRender, pointInShapeCallback, pointInSurroundingSphereCallback, getAnnotationNearPoint, getAnnotationNearPointOnEnabledElement, jumpToSlice, viewport, cine, clip, boundingBox, rectangleROITool, planarFreehandROITool, stackPrefetch, stackContextPrefetch, scroll, roundNumber, pointToString, polyDataUtils, voi, annotationFrameRange, };
34
+ export { math, planar, viewportFilters, drawing, debounce, dynamicVolume, throttle, orientation, isObject, touch, triggerEvent, calibrateImageSpacing, getCalibratedLengthUnits, getCalibratedAreaUnits, getCalibratedScale, segmentation, triggerAnnotationRenderForViewportIds, triggerAnnotationRender, pointInShapeCallback, pointInSurroundingSphereCallback, getAnnotationNearPoint, getAnnotationNearPointOnEnabledElement, jumpToSlice, viewport, cine, clip, boundingBox, rectangleROITool, planarFreehandROITool, stackPrefetch, stackContextPrefetch, scroll, roundNumber, pointToString, polyDataUtils, voi, annotationFrameRange, };
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
26
26
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.annotationFrameRange = exports.voi = exports.polyDataUtils = exports.pointToString = exports.roundNumber = exports.scroll = exports.stackContextPrefetch = exports.stackPrefetch = exports.planarFreehandROITool = exports.rectangleROITool = exports.boundingBox = exports.clip = exports.cine = exports.viewport = exports.jumpToSlice = exports.getAnnotationNearPointOnEnabledElement = exports.getAnnotationNearPoint = exports.pointInSurroundingSphereCallback = exports.pointInShapeCallback = exports.triggerAnnotationRender = exports.triggerAnnotationRenderForViewportIds = exports.segmentation = exports.getCalibratedScale = exports.getCalibratedLengthUnits = exports.calibrateImageSpacing = exports.triggerEvent = exports.touch = exports.isObject = exports.orientation = exports.throttle = exports.dynamicVolume = exports.debounce = exports.drawing = exports.viewportFilters = exports.planar = exports.math = void 0;
29
+ exports.annotationFrameRange = exports.voi = exports.polyDataUtils = exports.pointToString = exports.roundNumber = exports.scroll = exports.stackContextPrefetch = exports.stackPrefetch = exports.planarFreehandROITool = exports.rectangleROITool = exports.boundingBox = exports.clip = exports.cine = exports.viewport = exports.jumpToSlice = exports.getAnnotationNearPointOnEnabledElement = exports.getAnnotationNearPoint = exports.pointInSurroundingSphereCallback = exports.pointInShapeCallback = exports.triggerAnnotationRender = exports.triggerAnnotationRenderForViewportIds = exports.segmentation = exports.getCalibratedScale = exports.getCalibratedAreaUnits = exports.getCalibratedLengthUnits = exports.calibrateImageSpacing = exports.triggerEvent = exports.touch = exports.isObject = exports.orientation = exports.throttle = exports.dynamicVolume = exports.debounce = exports.drawing = exports.viewportFilters = exports.planar = exports.math = void 0;
30
30
  const getAnnotationNearPoint_1 = require("./getAnnotationNearPoint");
31
31
  Object.defineProperty(exports, "getAnnotationNearPoint", { enumerable: true, get: function () { return getAnnotationNearPoint_1.getAnnotationNearPoint; } });
32
32
  Object.defineProperty(exports, "getAnnotationNearPointOnEnabledElement", { enumerable: true, get: function () { return getAnnotationNearPoint_1.getAnnotationNearPointOnEnabledElement; } });
@@ -40,10 +40,10 @@ const clip_1 = __importDefault(require("./clip"));
40
40
  exports.clip = clip_1.default;
41
41
  const calibrateImageSpacing_1 = __importDefault(require("./calibrateImageSpacing"));
42
42
  exports.calibrateImageSpacing = calibrateImageSpacing_1.default;
43
- const getCalibratedUnits_1 = __importDefault(require("./getCalibratedUnits"));
44
- exports.getCalibratedLengthUnits = getCalibratedUnits_1.default;
45
- const getCalibratedUnits_2 = require("./getCalibratedUnits");
46
- Object.defineProperty(exports, "getCalibratedScale", { enumerable: true, get: function () { return getCalibratedUnits_2.getCalibratedScale; } });
43
+ const getCalibratedUnits_1 = require("./getCalibratedUnits");
44
+ Object.defineProperty(exports, "getCalibratedLengthUnits", { enumerable: true, get: function () { return getCalibratedUnits_1.getCalibratedLengthUnits; } });
45
+ Object.defineProperty(exports, "getCalibratedAreaUnits", { enumerable: true, get: function () { return getCalibratedUnits_1.getCalibratedAreaUnits; } });
46
+ Object.defineProperty(exports, "getCalibratedScale", { enumerable: true, get: function () { return getCalibratedUnits_1.getCalibratedScale; } });
47
47
  const triggerAnnotationRenderForViewportIds_1 = __importDefault(require("./triggerAnnotationRenderForViewportIds"));
48
48
  exports.triggerAnnotationRenderForViewportIds = triggerAnnotationRenderForViewportIds_1.default;
49
49
  const triggerAnnotationRender_1 = __importDefault(require("./triggerAnnotationRender"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utilities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qEAGkC;AA8DhC,uGAhEA,+CAAsB,OAgEA;AACtB,uHAhEA,+DAAsC,OAgEA;AA5DxC,0DAAkC;AA4ChC,mBA5CK,kBAAQ,CA4CL;AA3CV,0DAAkC;AA6ChC,mBA7CK,kBAAQ,CA6CL;AA5CV,0DAAkC;AA8ChC,mBA9CK,kBAAQ,CA8CL;AA7CV,kDAA0B;AA6DxB,eA7DK,cAAI,CA6DL;AA5DN,oFAA4D;AA+C1D,gCA/CK,+BAAqB,CA+CL;A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oB,OAyCtB;AAxCtB,qDAAuC;AAiCrC,4BAAQ;AAhCV,+CAAiC;AAkB/B,sBAAK;AAjBP,+DAAiD;AAa/C,sCAAa;AAZf,gEAAkD;AAyChD,sCAAa;AAxCf,2CAA6B;AAyC3B,kBAAG;AAtCL,8CAAmD;AAajD,6FAbO,mBAAY,OAaP"}
@@ -0,0 +1,2 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+ export default function distanceToPoint(aabb: Types.AABB2, point: Types.Point2): number;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const distanceToPointSquared_1 = __importDefault(require("./distanceToPointSquared"));
7
+ function distanceToPoint(aabb, point) {
8
+ return Math.sqrt((0, distanceToPointSquared_1.default)(aabb, point));
9
+ }
10
+ exports.default = distanceToPoint;
11
+ //# sourceMappingURL=distanceToPoint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distanceToPoint.js","sourceRoot":"","sources":["../../../../../src/utilities/math/aabb/distanceToPoint.ts"],"names":[],"mappings":";;;;;AACA,sFAA8D;AAa9D,SAAwB,eAAe,CACrC,IAAiB,EACjB,KAAmB;IAEnB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAA,gCAAsB,EAAC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC;AACxD,CAAC;AALD,kCAKC"}
@@ -0,0 +1,2 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+ export default function distanceToPointSquared(aabb: Types.AABB2, point: Types.Point2): number;
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function distanceToPointSquared(aabb, point) {
4
+ const aabbWidth = aabb.maxX - aabb.minX;
5
+ const aabbHeight = aabb.maxY - aabb.minY;
6
+ const aabbSize = [aabbWidth, aabbHeight];
7
+ const aabbCenter = [
8
+ aabb.minX + aabbWidth / 2,
9
+ aabb.minY + aabbHeight / 2,
10
+ ];
11
+ const translatedPoint = [
12
+ Math.abs(point[0] - aabbCenter[0]),
13
+ Math.abs(point[1] - aabbCenter[1]),
14
+ ];
15
+ const dx = translatedPoint[0] - aabbSize[0] * 0.5;
16
+ const dy = translatedPoint[1] - aabbSize[1] * 0.5;
17
+ if (dx > 0 && dy > 0) {
18
+ return dx * dx + dy * dy;
19
+ }
20
+ const dist = Math.max(dx, 0) + Math.max(dy, 0);
21
+ return dist * dist;
22
+ }
23
+ exports.default = distanceToPointSquared;
24
+ //# sourceMappingURL=distanceToPointSquared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distanceToPointSquared.js","sourceRoot":"","sources":["../../../../../src/utilities/math/aabb/distanceToPointSquared.ts"],"names":[],"mappings":";;AAYA,SAAwB,sBAAsB,CAC5C,IAAiB,EACjB,KAAmB;IAEnB,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACxC,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;IACzC,MAAM,QAAQ,GAAG,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;IACzC,MAAM,UAAU,GAAiB;QAC/B,IAAI,CAAC,IAAI,GAAG,SAAS,GAAG,CAAC;QACzB,IAAI,CAAC,IAAI,GAAG,UAAU,GAAG,CAAC;KAC3B,CAAC;IAIF,MAAM,eAAe,GAAG;QACtB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;KACnC,CAAC;IAGF,MAAM,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAClD,MAAM,EAAE,GAAG,eAAe,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC;IAMlD,IAAI,EAAE,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,EAAE;QACpB,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;KAC1B;IAED,MAAM,IAAI,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAE/C,OAAO,IAAI,GAAG,IAAI,CAAC;AACrB,CAAC;AAlCD,yCAkCC"}
@@ -0,0 +1,2 @@
1
+ export { default as distanceToPoint } from './distanceToPoint';
2
+ export { default as distanceToPointSquared } from './distanceToPointSquared';
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.distanceToPointSquared = exports.distanceToPoint = void 0;
7
+ var distanceToPoint_1 = require("./distanceToPoint");
8
+ Object.defineProperty(exports, "distanceToPoint", { enumerable: true, get: function () { return __importDefault(distanceToPoint_1).default; } });
9
+ var distanceToPointSquared_1 = require("./distanceToPointSquared");
10
+ Object.defineProperty(exports, "distanceToPointSquared", { enumerable: true, get: function () { return __importDefault(distanceToPointSquared_1).default; } });
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/aabb/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,mEAA6E;AAApE,iJAAA,OAAO,OAA0B"}
@@ -1,8 +1,9 @@
1
- import * as vec2 from './vec2';
1
+ import * as aabb from './aabb';
2
+ import * as BasicStatsCalculator from './basic';
2
3
  import * as ellipse from './ellipse';
3
4
  import * as lineSegment from './line';
4
- import * as rectangle from './rectangle';
5
- import * as polyline from './polyline';
6
5
  import * as point from './point';
7
- import * as BasicStatsCalculator from './basic';
8
- export { vec2, ellipse, lineSegment, rectangle, polyline, point, BasicStatsCalculator, };
6
+ import * as polyline from './polyline';
7
+ import * as rectangle from './rectangle';
8
+ import * as vec2 from './vec2';
9
+ export { aabb, BasicStatsCalculator, ellipse, lineSegment, point, polyline, rectangle, vec2, };
@@ -23,19 +23,21 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.BasicStatsCalculator = exports.point = exports.polyline = exports.rectangle = exports.lineSegment = exports.ellipse = exports.vec2 = void 0;
27
- const vec2 = __importStar(require("./vec2"));
28
- exports.vec2 = vec2;
26
+ exports.vec2 = exports.rectangle = exports.polyline = exports.point = exports.lineSegment = exports.ellipse = exports.BasicStatsCalculator = exports.aabb = void 0;
27
+ const aabb = __importStar(require("./aabb"));
28
+ exports.aabb = aabb;
29
+ const BasicStatsCalculator = __importStar(require("./basic"));
30
+ exports.BasicStatsCalculator = BasicStatsCalculator;
29
31
  const ellipse = __importStar(require("./ellipse"));
30
32
  exports.ellipse = ellipse;
31
33
  const lineSegment = __importStar(require("./line"));
32
34
  exports.lineSegment = lineSegment;
33
- const rectangle = __importStar(require("./rectangle"));
34
- exports.rectangle = rectangle;
35
- const polyline = __importStar(require("./polyline"));
36
- exports.polyline = polyline;
37
35
  const point = __importStar(require("./point"));
38
36
  exports.point = point;
39
- const BasicStatsCalculator = __importStar(require("./basic"));
40
- exports.BasicStatsCalculator = BasicStatsCalculator;
37
+ const polyline = __importStar(require("./polyline"));
38
+ exports.polyline = polyline;
39
+ const rectangle = __importStar(require("./rectangle"));
40
+ exports.rectangle = rectangle;
41
+ const vec2 = __importStar(require("./vec2"));
42
+ exports.vec2 = vec2;
41
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/math/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAS7B,oBAAI;AARN,mDAAqC;AASnC,0BAAO;AART,oDAAsC;AASpC,kCAAW;AARb,uDAAyC;AASvC,8BAAS;AARX,qDAAuC;AASrC,4BAAQ;AARV,+CAAiC;AAS/B,sBAAK;AARP,8DAAgD;AAS9C,oDAAoB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/math/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAU7B,oBAAI;AATN,8DAAgD;AAU9C,oDAAoB;AATtB,mDAAqC;AAUnC,0BAAO;AATT,oDAAsC;AAUpC,kCAAW;AATb,+CAAiC;AAU/B,sBAAK;AATP,qDAAuC;AAUrC,4BAAQ;AATV,uDAAyC;AAUvC,8BAAS;AATX,6CAA+B;AAU7B,oBAAI"}
@@ -1,27 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- function dist2(p1, p2) {
4
- return (p1[0] - p2[0]) * (p1[0] - p2[0]) + (p1[1] - p2[1]) * (p1[1] - p2[1]);
5
- }
6
+ const distanceToPointSquaredInfo_1 = __importDefault(require("./distanceToPointSquaredInfo"));
6
7
  function distanceToPointSquared(lineStart, lineEnd, point) {
7
- const d2 = dist2(lineStart, lineEnd);
8
- if (d2 === 0) {
9
- return dist2(point, lineStart);
10
- }
11
- const t = ((point[0] - lineStart[0]) * (lineEnd[0] - lineStart[0]) +
12
- (point[1] - lineStart[1]) * (lineEnd[1] - lineStart[1])) /
13
- d2;
14
- if (t < 0) {
15
- return dist2(point, lineStart);
16
- }
17
- if (t > 1) {
18
- return dist2(point, lineEnd);
19
- }
20
- const pt = [
21
- lineStart[0] + t * (lineEnd[0] - lineStart[0]),
22
- lineStart[1] + t * (lineEnd[1] - lineStart[1]),
23
- ];
24
- return dist2(point, pt);
8
+ return (0, distanceToPointSquaredInfo_1.default)(lineStart, lineEnd, point).distanceSquared;
25
9
  }
26
10
  exports.default = distanceToPointSquared;
27
11
  //# sourceMappingURL=distanceToPointSquared.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"distanceToPointSquared.js","sourceRoot":"","sources":["../../../../../src/utilities/math/line/distanceToPointSquared.ts"],"names":[],"mappings":";;AAEA,SAAS,KAAK,CAAC,EAAgB,EAAE,EAAgB;IAC/C,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC/E,CAAC;AAUD,SAAwB,sBAAsB,CAC5C,SAAuB,EACvB,OAAqB,EACrB,KAAmB;IAEnB,MAAM,EAAE,GAAG,KAAK,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IAErC,IAAI,EAAE,KAAK,CAAC,EAAE;QACZ,OAAO,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;KAChC;IAED,MAAM,CAAC,GACL,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QACtD,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1D,EAAE,CAAC;IAEL,IAAI,CAAC,GAAG,CAAC,EAAE;QACT,OAAO,KAAK,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;KAChC;IACD,IAAI,CAAC,GAAG,CAAC,EAAE;QACT,OAAO,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;KAC9B;IAED,MAAM,EAAE,GAAiB;QACvB,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;QAC9C,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC,CAAC;KAC/C,CAAC;IAEF,OAAO,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AAC1B,CAAC;AA7BD,yCA6BC"}
1
+ {"version":3,"file":"distanceToPointSquared.js","sourceRoot":"","sources":["../../../../../src/utilities/math/line/distanceToPointSquared.ts"],"names":[],"mappings":";;;;;AACA,8FAAsE;AAUtE,SAAwB,sBAAsB,CAC5C,SAAuB,EACvB,OAAqB,EACrB,KAAmB;IAEnB,OAAO,IAAA,oCAA0B,EAAC,SAAS,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,eAAe,CAAC;AAC/E,CAAC;AAND,yCAMC"}
@@ -0,0 +1,5 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ export default function distanceToPointSquaredInfo(lineStart: Types.Point2, lineEnd: Types.Point2, point: Types.Point2): {
3
+ point: Types.Point2;
4
+ distanceSquared: number;
5
+ };
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const math = __importStar(require("../"));
27
+ function distanceToPointSquaredInfo(lineStart, lineEnd, point) {
28
+ let closestPoint;
29
+ const distanceSquared = math.point.distanceToPointSquared(lineStart, lineEnd);
30
+ if (lineStart[0] === lineEnd[0] && lineStart[1] === lineEnd[1]) {
31
+ closestPoint = lineStart;
32
+ }
33
+ if (!closestPoint) {
34
+ const dotProduct = ((point[0] - lineStart[0]) * (lineEnd[0] - lineStart[0]) +
35
+ (point[1] - lineStart[1]) * (lineEnd[1] - lineStart[1])) /
36
+ distanceSquared;
37
+ if (dotProduct < 0) {
38
+ closestPoint = lineStart;
39
+ }
40
+ else if (dotProduct > 1) {
41
+ closestPoint = lineEnd;
42
+ }
43
+ else {
44
+ closestPoint = [
45
+ lineStart[0] + dotProduct * (lineEnd[0] - lineStart[0]),
46
+ lineStart[1] + dotProduct * (lineEnd[1] - lineStart[1]),
47
+ ];
48
+ }
49
+ }
50
+ return {
51
+ point: [...closestPoint],
52
+ distanceSquared: math.point.distanceToPointSquared(point, closestPoint),
53
+ };
54
+ }
55
+ exports.default = distanceToPointSquaredInfo;
56
+ //# sourceMappingURL=distanceToPointSquaredInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distanceToPoint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AC,CAAC;aACxD,CAAC;SACH;KACF;IAED,OAAO;QACL,KAAK,EAAE,CAAC,GAAG,YAAY,CAAC;QACxB,eAAe,EAAE,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,KAAK,EAAE,YAAY,CAAC;KACxE,CAAC;AACJ,CAAC;AAtCD,6CAsCC"}
@@ -1,4 +1,5 @@
1
1
  import distanceToPoint from './distanceToPoint';
2
2
  import distanceToPointSquared from './distanceToPointSquared';
3
+ import distanceToPointSquaredInfo from './distanceToPointSquaredInfo';
3
4
  import intersectLine from './intersectLine';
4
- export { distanceToPoint, distanceToPointSquared, intersectLine };
5
+ export { distanceToPoint, distanceToPointSquared, distanceToPointSquaredInfo, intersectLine, };
@@ -3,11 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.intersectLine = exports.distanceToPointSquared = exports.distanceToPoint = void 0;
6
+ exports.intersectLine = exports.distanceToPointSquaredInfo = exports.distanceToPointSquared = exports.distanceToPoint = void 0;
7
7
  const distanceToPoint_1 = __importDefault(require("./distanceToPoint"));
8
8
  exports.distanceToPoint = distanceToPoint_1.default;
9
9
  const distanceToPointSquared_1 = __importDefault(require("./distanceToPointSquared"));
10
10
  exports.distanceToPointSquared = distanceToPointSquared_1.default;
11
+ const distanceToPointSquaredInfo_1 = __importDefault(require("./distanceToPointSquaredInfo"));
12
+ exports.distanceToPointSquaredInfo = distanceToPointSquaredInfo_1.default;
11
13
  const intersectLine_1 = __importDefault(require("./intersectLine"));
12
14
  exports.intersectLine = intersectLine_1.default;
13
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/line/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;AAIvC,0BAJF,yBAAe,CAIE;AAHxB,sFAA8D;AAGpC,iCAHnB,gCAAsB,CAGmB;AAFhD,oEAA4C;AAEM,wBAF3C,uBAAa,CAE2C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/line/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;AAM9C,0BANK,yBAAe,CAML;AALjB,sFAA8D;AAM5D,iCANK,gCAAsB,CAML;AALxB,8FAAsE;AAMpE,qCANK,oCAA0B,CAML;AAL5B,oEAA4C;AAM1C,wBANK,uBAAa,CAML"}
@@ -1,12 +1,11 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ const distanceToPointSquared_1 = __importDefault(require("./distanceToPointSquared"));
3
7
  function distanceToPoint(p1, p2) {
4
- if (p1.length !== p2.length) {
5
- throw Error('Both points should have the same dimensionality');
6
- }
7
- const [x1, y1, z1 = 0] = p1;
8
- const [x2, y2, z2 = 0] = p2;
9
- return Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) + Math.pow(z1 - z2, 2));
8
+ return Math.sqrt((0, distanceToPointSquared_1.default)(p1, p2));
10
9
  }
11
10
  exports.default = distanceToPoint;
12
11
  //# sourceMappingURL=distanceToPoint.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"distanceToPoint.js","sourceRoot":"","sources":["../../../../../src/utilities/math/point/distanceToPoint.ts"],"names":[],"mappings":";;AAWA,SAAwB,eAAe,CAAC,EAAS,EAAE,EAAS;IAC1D,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,EAAE;QAC3B,MAAM,KAAK,CAAC,iDAAiD,CAAC,CAAC;KAChE;IAED,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAE5B,OAAO,IAAI,CAAC,IAAI,CACd,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CACnE,CAAC;AACJ,CAAC;AAXD,kCAWC"}
1
+ {"version":3,"file":"distanceToPoint.js","sourceRoot":"","sources":["../../../../../src/utilities/math/point/distanceToPoint.ts"],"names":[],"mappings":";;;;;AACA,sFAA8D;AAW9D,SAAwB,eAAe,CAAC,EAAS,EAAE,EAAS;IAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,IAAA,gCAAsB,EAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC;AACnD,CAAC;AAFD,kCAEC"}
@@ -0,0 +1,4 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ declare type Point = Types.Point2 | Types.Point3;
3
+ export default function distanceToPointSquared(p1: Point, p2: Point): number;
4
+ export {};
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function distanceToPointSquared(p1, p2) {
4
+ if (p1.length !== p2.length) {
5
+ throw Error('Both points should have the same dimensionality');
6
+ }
7
+ const [x1, y1, z1 = 0] = p1;
8
+ const [x2, y2, z2 = 0] = p2;
9
+ return Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2) + Math.pow(z1 - z2, 2);
10
+ }
11
+ exports.default = distanceToPointSquared;
12
+ //# sourceMappingURL=distanceToPointSquared.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"distanceToPointSquared.js","sourceRoot":"","sources":["../../../../../src/utilities/math/point/distanceToPointSquared.ts"],"names":[],"mappings":";;AAWA,SAAwB,sBAAsB,CAAC,EAAS,EAAE,EAAS;IACjE,IAAI,EAAE,CAAC,MAAM,KAAK,EAAE,CAAC,MAAM,EAAE;QAC3B,MAAM,KAAK,CAAC,iDAAiD,CAAC,CAAC;KAChE;IAED,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAC5B,MAAM,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC;IAE5B,OAAO,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AATD,yCASC"}
@@ -1,2 +1,3 @@
1
- import distanceToPoint from './distanceToPoint';
2
- export { distanceToPoint };
1
+ export { default as distanceToPoint } from './distanceToPoint';
2
+ export { default as distanceToPointSquared } from './distanceToPointSquared';
3
+ export { default as mirror } from './mirror';
@@ -3,7 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.distanceToPoint = void 0;
7
- const distanceToPoint_1 = __importDefault(require("./distanceToPoint"));
8
- exports.distanceToPoint = distanceToPoint_1.default;
6
+ exports.mirror = exports.distanceToPointSquared = exports.distanceToPoint = void 0;
7
+ var distanceToPoint_1 = require("./distanceToPoint");
8
+ Object.defineProperty(exports, "distanceToPoint", { enumerable: true, get: function () { return __importDefault(distanceToPoint_1).default; } });
9
+ var distanceToPointSquared_1 = require("./distanceToPointSquared");
10
+ Object.defineProperty(exports, "distanceToPointSquared", { enumerable: true, get: function () { return __importDefault(distanceToPointSquared_1).default; } });
11
+ var mirror_1 = require("./mirror");
12
+ Object.defineProperty(exports, "mirror", { enumerable: true, get: function () { return __importDefault(mirror_1).default; } });
9
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/point/index.ts"],"names":[],"mappings":";;;;;;AAAA,wEAAgD;AAEvC,0BAFF,yBAAe,CAEE"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/point/index.ts"],"names":[],"mappings":";;;;;;AAAA,qDAA+D;AAAtD,mIAAA,OAAO,OAAmB;AACnC,mEAA6E;AAApE,iJAAA,OAAO,OAA0B;AAC1C,mCAA6C;AAApC,iHAAA,OAAO,OAAU"}
@@ -0,0 +1,2 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+ export default function mirror(mirrorPoint: Types.Point2, staticPoint: Types.Point2): Types.Point2;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ function mirror(mirrorPoint, staticPoint) {
4
+ const [x1, y1] = mirrorPoint;
5
+ const [x2, y2] = staticPoint;
6
+ const newX = 2 * x2 - x1;
7
+ const newY = 2 * y2 - y1;
8
+ return [newX, newY];
9
+ }
10
+ exports.default = mirror;
11
+ //# sourceMappingURL=mirror.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mirror.js","sourceRoot":"","sources":["../../../../../src/utilities/math/point/mirror.ts"],"names":[],"mappings":";;AASA,SAAwB,MAAM,CAC5B,WAAyB,EACzB,WAAyB;IAEzB,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,WAAW,CAAC;IAC7B,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,GAAG,WAAW,CAAC;IAE7B,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IACzB,MAAM,IAAI,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC;IAEzB,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;AACtB,CAAC;AAXD,yBAWC"}
@@ -30,6 +30,10 @@ export default function mouseDown(evt) {
30
30
  ...(activeToolsWithEventBinding || []),
31
31
  ...(passiveToolsIfEventWasPrimaryMouseButton || []),
32
32
  ];
33
+ const actionExecuted = mouseDownAnnotationAction(evt);
34
+ if (actionExecuted) {
35
+ return;
36
+ }
33
37
  const eventDetail = evt.detail;
34
38
  const { element } = eventDetail;
35
39
  const annotationToolsWithAnnotations = filterToolsWithAnnotationsForElement(element, applicableTools);
@@ -55,10 +59,6 @@ export default function mouseDown(evt) {
55
59
  return;
56
60
  }
57
61
  }
58
- const actionExecuted = mouseDownAnnotationAction(evt);
59
- if (actionExecuted) {
60
- return;
61
- }
62
62
  }
63
63
  function getAnnotationForSelection(toolsWithMovableHandles) {
64
64
  return ((toolsWithMovableHandles.length > 1 &&
@@ -1 +1 @@
1
- {"version":3,"file":"mouseDown.js","sourceRoot":"","sources":["../../../../src/eventDispatchers/mouseEventHandlers/mouseDown.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAOxC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,sDAAsD,CAAC;AAE9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,oDAAoD,CAAC;AACxF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uDAAuD,CAAC;AAG5F,OAAO,8BAA8B,MAAM,4CAA4C,CAAC;AACxF,OAAO,oCAAoC,MAAM,kDAAkD,CAAC;AACpG,OAAO,6BAA6B,MAAM,2CAA2C,CAAC;AACtF,OAAO,0BAA0B,MAAM,sCAAsC,CAAC;AAC9E,OAAO,8BAA8B,MAAM,0CAA0C,CAAC;AACtF,OAAO,yBAAyB,MAAM,6BAA6B,CAAC;AAEpE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,SAAS,CAAC;AA2BtC,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,GAAkC;IAElE,IAAI,KAAK,CAAC,qBAAqB,EAAE;QAC/B,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,EACrB,aAAa,GAAG,KAAK;IAErB,IAAI,aAAa,EAAE;QACjB,IAAI,oBAAoB,CAAC,aAAa,CAAC,EAAE;YACvC,qBAAqB,CAAC,aAAa,EAAE,KAAK,CAAC,CAAC;SAC7C;aAAM;YACL,MAAM,gBAAgB,GAAG,IAAI,CAAC;YAC9B,qBAAqB,CAAC,aAAa,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;SAC9D;KACF;SAAM;QACL,MAAM,gBAAgB,GAAG,KAAK,CAAC;QAC/B,qBAAqB,CAAC,aAAa,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;KAC9D;AACH,CAAC"}
@@ -16,7 +16,8 @@ export default function getToolsWithActionsForMouseEvent(evt, toolModes) {
16
16
  for (let j = 0; j < toolGroupToolNames.length; j++) {
17
17
  const toolName = toolGroupToolNames[j];
18
18
  const tool = toolGroup.getToolInstance(toolName);
19
- const actions = tool.configuration?.actions;
19
+ const actionsConfig = tool.configuration?.actions ?? {};
20
+ const actions = Object.values(actionsConfig);
20
21
  if (!actions?.length || !toolModes.includes(tool.mode)) {
21
22
  continue;
22
23
  }
@@ -1 +1 @@
1
- {"version":3,"file":"getToolsWithActionsForMouseEvent.js","sourceRoot":"","sources":["../../../../src/eventDispatchers/shared/getToolsWithActionsForMouseEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAalD,MAAM,CAAC,OAAO,UAAU,gCAAgC,CACtD,GAAkC,EAClC,SAAsB;IAEtB,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;IACnC,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IACrD,MAAM,SAAS,GAAG,gBAAgB,CAAC,uBAAuB,CACxD,UAAU,EACV,iBAAiB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"}
1
+ {"version":3,"file":"getToolsWithActionsForMouseEvent.js","sourceRoot":"","sources":["../../../../src/eventDispatchers/shared/getToolsWithActionsForMouseEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAI/C,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAalD,MAAM,CAAC,OAAO,UAAU,gCAAgC,CACtD,GAAkC,EAClC,SAAsB;IAEtB,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAE,CAAC;IACnC,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IACrD,MAAM,SAAS,GAAG,gBAAgB,CAAC,uBAAuB,CACxD,UAAU,EACV,iBAAiB,CAClB,CAAC;IAEF,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,gBAAgB,CAAC;KACzB;IAED,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,mBAAmB,GAAG,SAAS,CAAC,sBAAsB,EAAE,CAAC;IAC/D,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;IACpC,MAAM,WAAW,GAAG,UAAU,EAAE,OAAO,IAAI,mBAAmB,CAAC;IAC/D,MAAM,WAAW,GACf,gBAAgB,CAAC,UAAU,CAAC,IAAI,gBAAgB,CAAC,cAAc,EAAE,CAAC;IAEpE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,kBAAkB,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QAClD,MAAM,QAAQ,GAAG,kBAAkB,CAAC,CAAC,CAAC,CAAC;QACvC,MAAM,IAAI,GAAG,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QACjD,MAAM,aAAa,GAAG,IAAI,CAAC,aAAa,EAAE,OAAO,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