@cornerstonejs/tools 1.52.0 → 1.53.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 (251) hide show
  1. package/dist/cjs/drawingSvg/drawPath.d.ts +11 -0
  2. package/dist/cjs/drawingSvg/drawPath.js +55 -0
  3. package/dist/cjs/drawingSvg/drawPath.js.map +1 -0
  4. package/dist/cjs/drawingSvg/drawPolyline.d.ts +1 -1
  5. package/dist/cjs/drawingSvg/drawPolyline.js +2 -10
  6. package/dist/cjs/drawingSvg/drawPolyline.js.map +1 -1
  7. package/dist/cjs/drawingSvg/index.d.ts +2 -1
  8. package/dist/cjs/drawingSvg/index.js +3 -1
  9. package/dist/cjs/drawingSvg/index.js.map +1 -1
  10. package/dist/cjs/eventDispatchers/shared/getActiveToolForMouseEvent.js.map +1 -1
  11. package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +1 -1
  12. package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +165 -78
  13. package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js.map +1 -1
  14. package/dist/cjs/stateManagement/annotation/annotationState.d.ts +6 -1
  15. package/dist/cjs/stateManagement/annotation/annotationState.js +49 -1
  16. package/dist/cjs/stateManagement/annotation/annotationState.js.map +1 -1
  17. package/dist/cjs/stateManagement/annotation/helpers/state.d.ts +2 -1
  18. package/dist/cjs/stateManagement/annotation/helpers/state.js +14 -3
  19. package/dist/cjs/stateManagement/annotation/helpers/state.js.map +1 -1
  20. package/dist/cjs/stateManagement/index.d.ts +6 -1
  21. package/dist/cjs/stateManagement/index.js +6 -1
  22. package/dist/cjs/stateManagement/index.js.map +1 -1
  23. package/dist/cjs/store/ToolGroupManager/ToolGroup.d.ts +3 -1
  24. package/dist/cjs/store/ToolGroupManager/ToolGroup.js +3 -2
  25. package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
  26. package/dist/cjs/tools/SegmentationIntersectionTool.js +1 -1
  27. package/dist/cjs/tools/SegmentationIntersectionTool.js.map +1 -1
  28. package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.js +1 -1
  29. package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.js.map +1 -1
  30. package/dist/cjs/tools/annotation/LivewireContourTool.d.ts +4 -3
  31. package/dist/cjs/tools/annotation/LivewireContourTool.js +26 -26
  32. package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
  33. package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +1 -0
  34. package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -1
  35. package/dist/cjs/tools/annotation/SplineROITool.d.ts +6 -3
  36. package/dist/cjs/tools/annotation/SplineROITool.js +37 -18
  37. package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
  38. package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -7
  39. package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
  40. package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +24 -18
  41. package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
  42. package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +16 -10
  43. package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
  44. package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js +19 -7
  45. package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -1
  46. package/dist/cjs/tools/annotation/splines/LinearSpline.js +1 -1
  47. package/dist/cjs/tools/annotation/splines/LinearSpline.js.map +1 -1
  48. package/dist/cjs/tools/annotation/splines/Spline.d.ts +2 -0
  49. package/dist/cjs/tools/annotation/splines/Spline.js +7 -3
  50. package/dist/cjs/tools/annotation/splines/Spline.js.map +1 -1
  51. package/dist/cjs/tools/base/AnnotationTool.js.map +1 -1
  52. package/dist/cjs/tools/base/ContourBaseTool.d.ts +1 -0
  53. package/dist/cjs/tools/base/ContourBaseTool.js +18 -1
  54. package/dist/cjs/tools/base/ContourBaseTool.js.map +1 -1
  55. package/dist/cjs/tools/base/ContourSegmentationBaseTool.js +4 -0
  56. package/dist/cjs/tools/base/ContourSegmentationBaseTool.js.map +1 -1
  57. package/dist/cjs/tools/displayTools/Contour/contourConfig.js +1 -0
  58. package/dist/cjs/tools/displayTools/Contour/contourConfig.js.map +1 -1
  59. package/dist/cjs/types/AnnotationTypes.d.ts +2 -0
  60. package/dist/cjs/types/ContourAnnotation.d.ts +6 -0
  61. package/dist/cjs/types/ContourAnnotation.js +7 -0
  62. package/dist/cjs/types/ContourAnnotation.js.map +1 -1
  63. package/dist/cjs/types/ContourTypes.d.ts +1 -0
  64. package/dist/cjs/types/EventTypes.d.ts +4 -1
  65. package/dist/cjs/types/ISpline.d.ts +1 -0
  66. package/dist/cjs/types/SplineProps.d.ts +1 -0
  67. package/dist/cjs/utilities/contours/getContourHolesDataCanvas.d.ts +3 -0
  68. package/dist/cjs/utilities/contours/getContourHolesDataCanvas.js +21 -0
  69. package/dist/cjs/utilities/contours/getContourHolesDataCanvas.js.map +1 -0
  70. package/dist/cjs/utilities/contours/getContourHolesDataWorld.d.ts +3 -0
  71. package/dist/cjs/utilities/contours/getContourHolesDataWorld.js +10 -0
  72. package/dist/cjs/utilities/contours/getContourHolesDataWorld.js.map +1 -0
  73. package/dist/cjs/utilities/contours/index.d.ts +4 -1
  74. package/dist/cjs/utilities/contours/index.js +7 -1
  75. package/dist/cjs/utilities/contours/index.js.map +1 -1
  76. package/dist/cjs/utilities/contours/updateContourPolyline.d.ts +10 -0
  77. package/dist/cjs/utilities/contours/updateContourPolyline.js +64 -0
  78. package/dist/cjs/utilities/contours/updateContourPolyline.js.map +1 -0
  79. package/dist/cjs/utilities/math/polyline/containsPoints.d.ts +2 -0
  80. package/dist/cjs/utilities/math/polyline/containsPoints.js +16 -0
  81. package/dist/cjs/utilities/math/polyline/containsPoints.js.map +1 -0
  82. package/dist/cjs/utilities/math/polyline/getWindingDirection.d.ts +2 -0
  83. package/dist/cjs/utilities/math/polyline/getWindingDirection.js +12 -0
  84. package/dist/cjs/utilities/math/polyline/getWindingDirection.js.map +1 -0
  85. package/dist/cjs/utilities/math/polyline/index.d.ts +3 -1
  86. package/dist/cjs/utilities/math/polyline/index.js +5 -1
  87. package/dist/cjs/utilities/math/polyline/index.js.map +1 -1
  88. package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +1 -0
  89. package/dist/esm/drawingSvg/drawPath.js +49 -0
  90. package/dist/esm/drawingSvg/drawPath.js.map +1 -0
  91. package/dist/esm/drawingSvg/drawPolyline.js +2 -10
  92. package/dist/esm/drawingSvg/drawPolyline.js.map +1 -1
  93. package/dist/esm/drawingSvg/index.js +2 -1
  94. package/dist/esm/drawingSvg/index.js.map +1 -1
  95. package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js.map +1 -1
  96. package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +106 -32
  97. package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js.map +1 -1
  98. package/dist/esm/stateManagement/annotation/annotationState.js +42 -1
  99. package/dist/esm/stateManagement/annotation/annotationState.js.map +1 -1
  100. package/dist/esm/stateManagement/annotation/helpers/state.js +12 -2
  101. package/dist/esm/stateManagement/annotation/helpers/state.js.map +1 -1
  102. package/dist/esm/stateManagement/index.js +2 -2
  103. package/dist/esm/stateManagement/index.js.map +1 -1
  104. package/dist/esm/store/ToolGroupManager/ToolGroup.js +3 -2
  105. package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
  106. package/dist/esm/tools/SegmentationIntersectionTool.js +1 -1
  107. package/dist/esm/tools/SegmentationIntersectionTool.js.map +1 -1
  108. package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js +1 -1
  109. package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js.map +1 -1
  110. package/dist/esm/tools/annotation/LivewireContourTool.js +28 -28
  111. package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
  112. package/dist/esm/tools/annotation/PlanarFreehandROITool.js +2 -1
  113. package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -1
  114. package/dist/esm/tools/annotation/SplineROITool.js +37 -19
  115. package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
  116. package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -7
  117. package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
  118. package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +25 -19
  119. package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
  120. package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +16 -10
  121. package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
  122. package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +20 -8
  123. package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -1
  124. package/dist/esm/tools/annotation/splines/LinearSpline.js +1 -1
  125. package/dist/esm/tools/annotation/splines/LinearSpline.js.map +1 -1
  126. package/dist/esm/tools/annotation/splines/Spline.js +5 -1
  127. package/dist/esm/tools/annotation/splines/Spline.js.map +1 -1
  128. package/dist/esm/tools/base/AnnotationTool.js.map +1 -1
  129. package/dist/esm/tools/base/ContourBaseTool.js +20 -3
  130. package/dist/esm/tools/base/ContourBaseTool.js.map +1 -1
  131. package/dist/esm/tools/base/ContourSegmentationBaseTool.js +4 -0
  132. package/dist/esm/tools/base/ContourSegmentationBaseTool.js.map +1 -1
  133. package/dist/esm/tools/displayTools/Contour/contourConfig.js +1 -0
  134. package/dist/esm/tools/displayTools/Contour/contourConfig.js.map +1 -1
  135. package/dist/esm/types/ContourAnnotation.js +6 -1
  136. package/dist/esm/types/ContourAnnotation.js.map +1 -1
  137. package/dist/esm/utilities/contours/getContourHolesDataCanvas.js +15 -0
  138. package/dist/esm/utilities/contours/getContourHolesDataCanvas.js.map +1 -0
  139. package/dist/esm/utilities/contours/getContourHolesDataWorld.js +6 -0
  140. package/dist/esm/utilities/contours/getContourHolesDataWorld.js.map +1 -0
  141. package/dist/esm/utilities/contours/index.js +4 -1
  142. package/dist/esm/utilities/contours/index.js.map +1 -1
  143. package/dist/esm/utilities/contours/updateContourPolyline.js +38 -0
  144. package/dist/esm/utilities/contours/updateContourPolyline.js.map +1 -0
  145. package/dist/esm/utilities/math/polyline/containsPoints.js +10 -0
  146. package/dist/esm/utilities/math/polyline/containsPoints.js.map +1 -0
  147. package/dist/esm/utilities/math/polyline/getWindingDirection.js +6 -0
  148. package/dist/esm/utilities/math/polyline/getWindingDirection.js.map +1 -0
  149. package/dist/esm/utilities/math/polyline/index.js +3 -1
  150. package/dist/esm/utilities/math/polyline/index.js.map +1 -1
  151. package/dist/types/drawingSvg/drawPath.d.ts +12 -0
  152. package/dist/types/drawingSvg/drawPath.d.ts.map +1 -0
  153. package/dist/types/drawingSvg/drawPolyline.d.ts +1 -1
  154. package/dist/types/drawingSvg/drawPolyline.d.ts.map +1 -1
  155. package/dist/types/drawingSvg/index.d.ts +2 -1
  156. package/dist/types/drawingSvg/index.d.ts.map +1 -1
  157. package/dist/types/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +1 -1
  158. package/dist/types/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts.map +1 -1
  159. package/dist/types/stateManagement/annotation/annotationState.d.ts +6 -1
  160. package/dist/types/stateManagement/annotation/annotationState.d.ts.map +1 -1
  161. package/dist/types/stateManagement/annotation/helpers/state.d.ts +2 -1
  162. package/dist/types/stateManagement/annotation/helpers/state.d.ts.map +1 -1
  163. package/dist/types/stateManagement/index.d.ts +6 -1
  164. package/dist/types/store/ToolGroupManager/ToolGroup.d.ts +3 -1
  165. package/dist/types/store/ToolGroupManager/ToolGroup.d.ts.map +1 -1
  166. package/dist/types/tools/annotation/LivewireContourTool.d.ts +4 -3
  167. package/dist/types/tools/annotation/LivewireContourTool.d.ts.map +1 -1
  168. package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts.map +1 -1
  169. package/dist/types/tools/annotation/SplineROITool.d.ts +6 -3
  170. package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -1
  171. package/dist/types/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts.map +1 -1
  172. package/dist/types/tools/annotation/planarFreehandROITool/drawLoop.d.ts.map +1 -1
  173. package/dist/types/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts.map +1 -1
  174. package/dist/types/tools/annotation/planarFreehandROITool/renderMethods.d.ts.map +1 -1
  175. package/dist/types/tools/annotation/splines/Spline.d.ts +2 -0
  176. package/dist/types/tools/annotation/splines/Spline.d.ts.map +1 -1
  177. package/dist/types/tools/base/AnnotationTool.d.ts.map +1 -1
  178. package/dist/types/tools/base/ContourBaseTool.d.ts +1 -0
  179. package/dist/types/tools/base/ContourBaseTool.d.ts.map +1 -1
  180. package/dist/types/tools/base/ContourSegmentationBaseTool.d.ts.map +1 -1
  181. package/dist/types/tools/displayTools/Contour/contourConfig.d.ts.map +1 -1
  182. package/dist/types/types/AnnotationTypes.d.ts +2 -0
  183. package/dist/types/types/AnnotationTypes.d.ts.map +1 -1
  184. package/dist/types/types/ContourAnnotation.d.ts +6 -0
  185. package/dist/types/types/ContourAnnotation.d.ts.map +1 -1
  186. package/dist/types/types/ContourTypes.d.ts +1 -0
  187. package/dist/types/types/ContourTypes.d.ts.map +1 -1
  188. package/dist/types/types/EventTypes.d.ts +4 -1
  189. package/dist/types/types/EventTypes.d.ts.map +1 -1
  190. package/dist/types/types/ISpline.d.ts +1 -0
  191. package/dist/types/types/ISpline.d.ts.map +1 -1
  192. package/dist/types/types/SplineProps.d.ts +1 -0
  193. package/dist/types/types/SplineProps.d.ts.map +1 -1
  194. package/dist/types/utilities/contours/getContourHolesDataCanvas.d.ts +4 -0
  195. package/dist/types/utilities/contours/getContourHolesDataCanvas.d.ts.map +1 -0
  196. package/dist/types/utilities/contours/getContourHolesDataWorld.d.ts +4 -0
  197. package/dist/types/utilities/contours/getContourHolesDataWorld.d.ts.map +1 -0
  198. package/dist/types/utilities/contours/index.d.ts +4 -1
  199. package/dist/types/utilities/contours/index.d.ts.map +1 -1
  200. package/dist/types/utilities/contours/updateContourPolyline.d.ts +11 -0
  201. package/dist/types/utilities/contours/updateContourPolyline.d.ts.map +1 -0
  202. package/dist/types/utilities/math/polyline/containsPoints.d.ts +3 -0
  203. package/dist/types/utilities/math/polyline/containsPoints.d.ts.map +1 -0
  204. package/dist/types/utilities/math/polyline/getWindingDirection.d.ts +3 -0
  205. package/dist/types/utilities/math/polyline/getWindingDirection.d.ts.map +1 -0
  206. package/dist/types/utilities/math/polyline/index.d.ts +3 -1
  207. package/dist/types/utilities/math/polyline/index.d.ts.map +1 -1
  208. package/dist/types/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +1 -0
  209. package/dist/types/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts.map +1 -1
  210. package/dist/umd/index.js +1 -1
  211. package/dist/umd/index.js.map +1 -1
  212. package/package.json +3 -3
  213. package/src/drawingSvg/drawPath.ts +96 -0
  214. package/src/drawingSvg/drawPolyline.ts +12 -16
  215. package/src/drawingSvg/index.ts +2 -0
  216. package/src/eventDispatchers/shared/getActiveToolForMouseEvent.ts +1 -1
  217. package/src/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.ts +194 -58
  218. package/src/stateManagement/annotation/annotationState.ts +101 -0
  219. package/src/stateManagement/annotation/helpers/state.ts +29 -1
  220. package/src/stateManagement/index.js +10 -0
  221. package/src/store/ToolGroupManager/ToolGroup.ts +9 -2
  222. package/src/tools/SegmentationIntersectionTool.ts +1 -1
  223. package/src/tools/annotation/LivewireContourSegmentationTool.ts +1 -1
  224. package/src/tools/annotation/LivewireContourTool.ts +65 -38
  225. package/src/tools/annotation/PlanarFreehandROITool.ts +6 -1
  226. package/src/tools/annotation/SplineROITool.ts +75 -28
  227. package/src/tools/annotation/planarFreehandROITool/closedContourEditLoop.ts +20 -11
  228. package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +40 -21
  229. package/src/tools/annotation/planarFreehandROITool/openContourEditLoop.ts +28 -13
  230. package/src/tools/annotation/planarFreehandROITool/renderMethods.ts +28 -10
  231. package/src/tools/annotation/splines/LinearSpline.ts +1 -1
  232. package/src/tools/annotation/splines/Spline.ts +13 -1
  233. package/src/tools/base/AnnotationTool.ts +1 -0
  234. package/src/tools/base/ContourBaseTool.ts +45 -3
  235. package/src/tools/base/ContourSegmentationBaseTool.ts +6 -0
  236. package/src/tools/displayTools/Contour/contourConfig.ts +1 -0
  237. package/src/types/AnnotationTypes.ts +14 -0
  238. package/src/types/ContourAnnotation.ts +13 -0
  239. package/src/types/ContourTypes.ts +3 -0
  240. package/src/types/EventTypes.ts +9 -0
  241. package/src/types/ISpline.ts +3 -0
  242. package/src/types/SplineProps.ts +10 -0
  243. package/src/utilities/contours/getContourHolesDataCanvas.ts +33 -0
  244. package/src/utilities/contours/getContourHolesDataWorld.ts +19 -0
  245. package/src/utilities/contours/index.ts +6 -0
  246. package/src/utilities/contours/updateContourPolyline.ts +74 -0
  247. package/src/utilities/math/polyline/containsPoint.ts +1 -1
  248. package/src/utilities/math/polyline/containsPoints.ts +22 -0
  249. package/src/utilities/math/polyline/getWindingDirection.ts +14 -0
  250. package/src/utilities/math/polyline/index.ts +4 -0
  251. package/src/utilities/math/polyline/planarFreehandROIInternalTypes.ts +1 -0
@@ -1,6 +1,8 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  declare type Annotation = {
3
3
  annotationUID?: string;
4
+ parentAnnotationUID?: string;
5
+ childAnnotationUIDs?: string[];
4
6
  highlighted?: boolean;
5
7
  isLocked?: boolean;
6
8
  isVisible?: boolean;
@@ -1,10 +1,16 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { Annotation } from './AnnotationTypes';
3
+ export declare enum ContourWindingDirection {
4
+ CounterClockwise = -1,
5
+ Unknown = 0,
6
+ Clockwise = 1
7
+ }
3
8
  export declare type ContourAnnotationData = {
4
9
  data: {
5
10
  contour: {
6
11
  polyline: Types.Point3[];
7
12
  closed: boolean;
13
+ windingDirection?: ContourWindingDirection;
8
14
  };
9
15
  };
10
16
  };
@@ -1,3 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ContourWindingDirection = void 0;
4
+ var ContourWindingDirection;
5
+ (function (ContourWindingDirection) {
6
+ ContourWindingDirection[ContourWindingDirection["CounterClockwise"] = -1] = "CounterClockwise";
7
+ ContourWindingDirection[ContourWindingDirection["Unknown"] = 0] = "Unknown";
8
+ ContourWindingDirection[ContourWindingDirection["Clockwise"] = 1] = "Clockwise";
9
+ })(ContourWindingDirection = exports.ContourWindingDirection || (exports.ContourWindingDirection = {}));
3
10
  //# sourceMappingURL=ContourAnnotation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ContourAnnotation.js","sourceRoot":"","sources":["../../../src/types/ContourAnnotation.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ContourAnnotation.js","sourceRoot":"","sources":["../../../src/types/ContourAnnotation.ts"],"names":[],"mappings":";;;AASA,IAAY,uBAIX;AAJD,WAAY,uBAAuB;IACjC,8FAAqB,CAAA;IACrB,2EAAW,CAAA;IACX,+EAAa,CAAA;AACf,CAAC,EAJW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAIlC"}
@@ -6,6 +6,7 @@ export declare type ContourConfig = {
6
6
  outlineOpacityInactive?: number;
7
7
  outlineDashActive?: string;
8
8
  outlineDashInactive?: string;
9
+ activeSegmentOutlineWidthDelta?: number;
9
10
  outlineDashAutoGenerated?: string;
10
11
  renderOutline?: boolean;
11
12
  renderFill?: boolean;
@@ -102,6 +102,9 @@ declare type AnnotationInterpolationRemovedEventDetail = {
102
102
  viewportId: string;
103
103
  renderingEngineId: string;
104
104
  };
105
+ declare type ContourAnnotationCompletedEventDetail = AnnotationCompletedEventDetail & {
106
+ contourHoleProcessingEnabled: boolean;
107
+ };
105
108
  declare type SegmentationDataModifiedEventDetail = {
106
109
  segmentationId: string;
107
110
  modifiedSlicesToUse?: number[];
@@ -230,4 +233,4 @@ declare type MouseMoveEventType = Types.CustomEventType<MouseMoveEventDetail>;
230
233
  declare type MouseDoubleClickEventType = Types.CustomEventType<MouseDoubleClickEventDetail>;
231
234
  declare type MouseWheelEventType = Types.CustomEventType<MouseWheelEventDetail>;
232
235
  declare type VolumeScrollOutOfBoundsEventType = Types.CustomEventType<VolumeScrollOutOfBoundsEventDetail>;
233
- export { InteractionStartType, InteractionEndType, InteractionEventType, NormalizedInteractionEventDetail, NormalizedMouseEventType, NormalizedTouchEventType, ToolModeChangedEventDetail, ToolModeChangedEventType, ToolActivatedEventDetail, ToolActivatedEventType, AnnotationAddedEventDetail, AnnotationAddedEventType, AnnotationCompletedEventDetail, AnnotationCompletedEventType, AnnotationModifiedEventDetail, AnnotationModifiedEventType, AnnotationRemovedEventDetail, AnnotationRemovedEventType, AnnotationSelectionChangeEventDetail, AnnotationSelectionChangeEventType, AnnotationRenderedEventDetail, AnnotationRenderedEventType, AnnotationLockChangeEventDetail, AnnotationVisibilityChangeEventDetail, AnnotationLockChangeEventType, AnnotationVisibilityChangeEventType, AnnotationInterpolationCompletedEventDetail, AnnotationInterpolationCompletedEventType, AnnotationInterpolationRemovedEventDetail, AnnotationInterpolationRemovedEventType, SegmentationDataModifiedEventType, SegmentationRepresentationModifiedEventDetail, SegmentationRepresentationModifiedEventType, SegmentationRepresentationRemovedEventDetail, SegmentationRepresentationRemovedEventType, SegmentationRemovedEventType, SegmentationRemovedEventDetail, SegmentationDataModifiedEventDetail, SegmentationRenderedEventType, SegmentationRenderedEventDetail, SegmentationModifiedEventType, SegmentationModifiedEventDetail, KeyDownEventDetail, KeyDownEventType, KeyUpEventDetail, KeyUpEventType, MouseDownEventDetail, TouchStartEventDetail, MouseDownEventType, TouchStartEventType, MouseDownActivateEventDetail, TouchStartActivateEventDetail, MouseDownActivateEventType, TouchStartActivateEventType, MouseDragEventDetail, TouchDragEventDetail, MouseDragEventType, TouchDragEventType, MouseUpEventDetail, TouchEndEventDetail, MouseUpEventType, TouchEndEventType, MouseClickEventDetail, MouseClickEventType, TouchTapEventDetail, TouchTapEventType, TouchSwipeEventDetail, TouchSwipeEventType, TouchPressEventDetail, TouchPressEventType, MouseMoveEventDetail, MouseMoveEventType, MouseDoubleClickEventDetail, MouseDoubleClickEventType, MouseWheelEventDetail, MouseWheelEventType, VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEventType, };
236
+ export { InteractionStartType, InteractionEndType, InteractionEventType, NormalizedInteractionEventDetail, NormalizedMouseEventType, NormalizedTouchEventType, ToolModeChangedEventDetail, ToolModeChangedEventType, ToolActivatedEventDetail, ToolActivatedEventType, AnnotationAddedEventDetail, AnnotationAddedEventType, AnnotationCompletedEventDetail, AnnotationCompletedEventType, AnnotationModifiedEventDetail, AnnotationModifiedEventType, AnnotationRemovedEventDetail, AnnotationRemovedEventType, AnnotationSelectionChangeEventDetail, AnnotationSelectionChangeEventType, AnnotationRenderedEventDetail, AnnotationRenderedEventType, AnnotationLockChangeEventDetail, AnnotationVisibilityChangeEventDetail, AnnotationLockChangeEventType, AnnotationVisibilityChangeEventType, AnnotationInterpolationCompletedEventDetail, AnnotationInterpolationCompletedEventType, AnnotationInterpolationRemovedEventDetail, AnnotationInterpolationRemovedEventType, ContourAnnotationCompletedEventDetail, SegmentationDataModifiedEventType, SegmentationRepresentationModifiedEventDetail, SegmentationRepresentationModifiedEventType, SegmentationRepresentationRemovedEventDetail, SegmentationRepresentationRemovedEventType, SegmentationRemovedEventType, SegmentationRemovedEventDetail, SegmentationDataModifiedEventDetail, SegmentationRenderedEventType, SegmentationRenderedEventDetail, SegmentationModifiedEventType, SegmentationModifiedEventDetail, KeyDownEventDetail, KeyDownEventType, KeyUpEventDetail, KeyUpEventType, MouseDownEventDetail, TouchStartEventDetail, MouseDownEventType, TouchStartEventType, MouseDownActivateEventDetail, TouchStartActivateEventDetail, MouseDownActivateEventType, TouchStartActivateEventType, MouseDragEventDetail, TouchDragEventDetail, MouseDragEventType, TouchDragEventType, MouseUpEventDetail, TouchEndEventDetail, MouseUpEventType, TouchEndEventType, MouseClickEventDetail, MouseClickEventType, TouchTapEventDetail, TouchTapEventType, TouchSwipeEventDetail, TouchSwipeEventType, TouchPressEventDetail, TouchPressEventType, MouseMoveEventDetail, MouseMoveEventType, MouseDoubleClickEventDetail, MouseDoubleClickEventType, MouseWheelEventDetail, MouseWheelEventType, VolumeScrollOutOfBoundsEventDetail, VolumeScrollOutOfBoundsEventType, };
@@ -4,6 +4,7 @@ export interface ISpline {
4
4
  get numControlPoints(): number;
5
5
  get resolution(): number;
6
6
  set resolution(resolution: number);
7
+ get fixedResolution(): boolean;
7
8
  get closed(): boolean;
8
9
  set closed(closed: boolean);
9
10
  get aabb(): Types.AABB2;
@@ -1,4 +1,5 @@
1
1
  export declare type SplineProps = {
2
2
  resolution?: number;
3
+ fixedResolution?: boolean;
3
4
  closed?: boolean;
4
5
  };
@@ -0,0 +1,3 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ import type { Annotation } from '../../types';
3
+ export default function getContourHolesDataCanvas(annotation: Annotation, viewport: Types.IViewport): Types.Point2[][];
@@ -0,0 +1,21 @@
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 getContourHolesDataWorld_1 = __importDefault(require("./getContourHolesDataWorld"));
7
+ function getContourHolesDataCanvas(annotation, viewport) {
8
+ const worldHoleContours = (0, getContourHolesDataWorld_1.default)(annotation);
9
+ const canvasHoleContours = [];
10
+ worldHoleContours.forEach((worldHoleContour) => {
11
+ const numPoints = worldHoleContour.length;
12
+ const canvasHoleContour = new Array(numPoints);
13
+ for (let i = 0; i < numPoints; i++) {
14
+ canvasHoleContour[i] = viewport.worldToCanvas(worldHoleContour[i]);
15
+ }
16
+ canvasHoleContours.push(canvasHoleContour);
17
+ });
18
+ return canvasHoleContours;
19
+ }
20
+ exports.default = getContourHolesDataCanvas;
21
+ //# sourceMappingURL=getContourHolesDataCanvas.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getContourHolesDataCanvas.js","sourceRoot":"","sources":["../../../../src/utilities/contours/getContourHolesDataCanvas.ts"],"names":[],"mappings":";;;;;AAEA,0FAAkE;AAQlE,SAAwB,yBAAyB,CAC/C,UAAsB,EACtB,QAAyB;IAEzB,MAAM,iBAAiB,GAAG,IAAA,kCAAwB,EAAC,UAAU,CAAC,CAAC;IAC/D,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAE9B,iBAAiB,CAAC,OAAO,CAAC,CAAC,gBAAgB,EAAE,EAAE;QAC7C,MAAM,SAAS,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAG1C,MAAM,iBAAiB,GAAmB,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC;QAG/D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YAClC,iBAAiB,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;SACpE;QAED,kBAAkB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;IAC7C,CAAC,CAAC,CAAC;IAEH,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAtBD,4CAsBC"}
@@ -0,0 +1,3 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ import type { Annotation } from '../../types';
3
+ export default function getContourHolesDataWorld(annotation: Annotation): Types.Point3[][];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const stateManagement_1 = require("../../stateManagement");
4
+ function getContourHolesDataWorld(annotation) {
5
+ var _a;
6
+ const childAnnotationUIDs = (_a = annotation.childAnnotationUIDs) !== null && _a !== void 0 ? _a : [];
7
+ return childAnnotationUIDs.map((uid) => (0, stateManagement_1.getAnnotation)(uid).data.contour.polyline);
8
+ }
9
+ exports.default = getContourHolesDataWorld;
10
+ //# sourceMappingURL=getContourHolesDataWorld.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getContourHolesDataWorld.js","sourceRoot":"","sources":["../../../../src/utilities/contours/getContourHolesDataWorld.ts"],"names":[],"mappings":";;AAEA,2DAAsD;AAQtD,SAAwB,wBAAwB,CAC9C,UAAsB;;IAEtB,MAAM,mBAAmB,GAAG,MAAA,UAAU,CAAC,mBAAmB,mCAAI,EAAE,CAAC;IAEjE,OAAO,mBAAmB,CAAC,GAAG,CAC5B,CAAC,GAAG,EAAE,EAAE,CAAE,IAAA,+BAAa,EAAC,GAAG,CAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CACzE,CAAC;AACJ,CAAC;AARD,2CAQC"}
@@ -4,7 +4,10 @@ import mergePoints from './mergePoints';
4
4
  import detectContourHoles from './detectContourHoles';
5
5
  import { generateContourSetsFromLabelmap } from './generateContourSetsFromLabelmap';
6
6
  import AnnotationToPointData from './AnnotationToPointData';
7
+ import getContourHolesDataWorld from './getContourHolesDataWorld';
8
+ import getContourHolesDataCanvas from './getContourHolesDataCanvas';
9
+ import updateContourPolyline from './updateContourPolyline';
7
10
  import acceptAutogeneratedInterpolations from './interpolation/acceptAutogeneratedInterpolations';
8
11
  import * as interpolation from './interpolation';
9
12
  import findHandlePolylineIndex from './findHandlePolylineIndex';
10
- export { areCoplanarContours, contourFinder, mergePoints, detectContourHoles, generateContourSetsFromLabelmap, AnnotationToPointData, interpolation, acceptAutogeneratedInterpolations, findHandlePolylineIndex, };
13
+ export { areCoplanarContours, contourFinder, mergePoints, detectContourHoles, generateContourSetsFromLabelmap, AnnotationToPointData, getContourHolesDataWorld, getContourHolesDataCanvas, updateContourPolyline, interpolation, acceptAutogeneratedInterpolations, findHandlePolylineIndex, };
@@ -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.findHandlePolylineIndex = exports.acceptAutogeneratedInterpolations = exports.interpolation = exports.AnnotationToPointData = exports.generateContourSetsFromLabelmap = exports.detectContourHoles = exports.mergePoints = exports.contourFinder = exports.areCoplanarContours = void 0;
29
+ exports.findHandlePolylineIndex = exports.acceptAutogeneratedInterpolations = exports.interpolation = exports.updateContourPolyline = exports.getContourHolesDataCanvas = exports.getContourHolesDataWorld = exports.AnnotationToPointData = exports.generateContourSetsFromLabelmap = exports.detectContourHoles = exports.mergePoints = exports.contourFinder = exports.areCoplanarContours = void 0;
30
30
  const areCoplanarContours_1 = __importDefault(require("./areCoplanarContours"));
31
31
  exports.areCoplanarContours = areCoplanarContours_1.default;
32
32
  const contourFinder_1 = __importDefault(require("./contourFinder"));
@@ -39,6 +39,12 @@ const generateContourSetsFromLabelmap_1 = require("./generateContourSetsFromLabe
39
39
  Object.defineProperty(exports, "generateContourSetsFromLabelmap", { enumerable: true, get: function () { return generateContourSetsFromLabelmap_1.generateContourSetsFromLabelmap; } });
40
40
  const AnnotationToPointData_1 = __importDefault(require("./AnnotationToPointData"));
41
41
  exports.AnnotationToPointData = AnnotationToPointData_1.default;
42
+ const getContourHolesDataWorld_1 = __importDefault(require("./getContourHolesDataWorld"));
43
+ exports.getContourHolesDataWorld = getContourHolesDataWorld_1.default;
44
+ const getContourHolesDataCanvas_1 = __importDefault(require("./getContourHolesDataCanvas"));
45
+ exports.getContourHolesDataCanvas = getContourHolesDataCanvas_1.default;
46
+ const updateContourPolyline_1 = __importDefault(require("./updateContourPolyline"));
47
+ exports.updateContourPolyline = updateContourPolyline_1.default;
42
48
  const acceptAutogeneratedInterpolations_1 = __importDefault(require("./interpolation/acceptAutogeneratedInterpolations"));
43
49
  exports.acceptAutogeneratedInterpolations = acceptAutogeneratedInterpolations_1.default;
44
50
  const interpolation = __importStar(require("./interpolation"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contours/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gFAAwD;AAWtD,8BAXK,6BAAmB,CAWL;AAVrB,oEAA4C;AAW1C,wBAXK,uBAAa,CAWL;AAVf,gEAAwC;AAWtC,sBAXK,qBAAW,CAWL;AAVb,8EAAsD;AAWpD,6BAXK,4BAAkB,CAWL;AAVpB,uFAAoF;AAWlF,gHAXO,iEAA+B,OAWP;AAVjC,oFAA4D;AAW1D,gCAXK,+BAAqB,CAWL;AAVvB,0HAAkG;AAYhG,4CAZK,2CAAiC,CAYL;AAXnC,+DAAiD;AAU/C,sCAAa;AATf,wFAAgE;AAW9D,kCAXK,iCAAuB,CAWL"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/utilities/contours/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,gFAAwD;AActD,8BAdK,6BAAmB,CAcL;AAbrB,oEAA4C;AAc1C,wBAdK,uBAAa,CAcL;AAbf,gEAAwC;AActC,sBAdK,qBAAW,CAcL;AAbb,8EAAsD;AAcpD,6BAdK,4BAAkB,CAcL;AAbpB,uFAAoF;AAclF,gHAdO,iEAA+B,OAcP;AAbjC,oFAA4D;AAc1D,gCAdK,+BAAqB,CAcL;AAbvB,0FAAkE;AAchE,mCAdK,kCAAwB,CAcL;AAb1B,4FAAoE;AAclE,oCAdK,mCAAyB,CAcL;AAb3B,oFAA4D;AAc1D,gCAdK,+BAAqB,CAcL;AAbvB,0HAAkG;AAehG,4CAfK,2CAAiC,CAeL;AAdnC,+DAAiD;AAa/C,sCAAa;AAZf,wFAAgE;AAc9D,kCAdK,iCAAuB,CAcL"}
@@ -0,0 +1,10 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+ import type { ContourAnnotation } from '../../types';
3
+ import type { ContourWindingDirection } from '../../types/ContourAnnotation';
4
+ export default function updateContourPolyline(annotation: ContourAnnotation, polylineData: {
5
+ points: Types.Point2[];
6
+ closed?: boolean;
7
+ targetWindingDirection?: ContourWindingDirection;
8
+ }, transforms: {
9
+ canvasToWorld: (point: Types.Point2) => Types.Point3;
10
+ }): void;
@@ -0,0 +1,64 @@
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 core_1 = require("@cornerstonejs/core");
27
+ const math = __importStar(require("../math"));
28
+ const stateManagement_1 = require("../../stateManagement");
29
+ function updateContourPolyline(annotation, polylineData, transforms) {
30
+ const { canvasToWorld } = transforms;
31
+ const { data } = annotation;
32
+ const { points: polyline, targetWindingDirection } = polylineData;
33
+ let { closed } = polylineData;
34
+ const numPoints = polyline.length;
35
+ const polylineWorldPoints = new Array(numPoints);
36
+ const currentWindingDirection = math.polyline.getWindingDirection(polyline);
37
+ const parentAnnotation = (0, stateManagement_1.getParentAnnotation)(annotation);
38
+ if (closed === undefined) {
39
+ let currentClosedState = false;
40
+ if (polyline.length > 3) {
41
+ const lastToFirstDist = math.point.distanceToPointSquared(polyline[0], polyline[numPoints - 1]);
42
+ currentClosedState = core_1.utilities.isEqual(0, lastToFirstDist);
43
+ }
44
+ closed = currentClosedState;
45
+ }
46
+ let windingDirection = parentAnnotation
47
+ ? parentAnnotation.data.contour.windingDirection * -1
48
+ : targetWindingDirection;
49
+ if (windingDirection === undefined) {
50
+ windingDirection = currentWindingDirection;
51
+ }
52
+ else if (windingDirection !== currentWindingDirection) {
53
+ polyline.reverse();
54
+ }
55
+ for (let i = 0; i < numPoints; i++) {
56
+ polylineWorldPoints[i] = canvasToWorld(polyline[i]);
57
+ }
58
+ data.contour.polyline = polylineWorldPoints;
59
+ data.contour.closed = closed;
60
+ data.contour.windingDirection = windingDirection;
61
+ (0, stateManagement_1.invalidateAnnotation)(annotation);
62
+ }
63
+ exports.default = updateContourPolyline;
64
+ //# sourceMappingURL=updateContourPolyline.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"updateContourPolyline.js","sourceRoot":"","sources":["../../../../src/utilities/contours/updateContourPolyline.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAA2D;AAI3D,8CAAgC;AAChC,2DAG+B;AAS/B,SAAwB,qBAAqB,CAC3C,UAA6B,EAC7B,YAIC,EACD,UAEC;IAED,MAAM,EAAE,aAAa,EAAE,GAAG,UAAU,CAAC;IACrC,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC;IAC5B,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,sBAAsB,EAAE,GAAG,YAAY,CAAC;IAClE,IAAI,EAAE,MAAM,EAAE,GAAG,YAAY,CAAC;IAC9B,MAAM,SAAS,GAAG,QAAQ,C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B,IAAI,CAAC,OAAO,CAAC,gBAAgB,GAAG,gBAAgB,CAAC;IAEjD,IAAA,sCAAoB,EAAC,UAAU,CAAC,CAAC;AACnC,CAAC;AAxDD,wCAwDC"}
@@ -0,0 +1,2 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ export default function containsPoints(polyline: Types.Point2[], points: Types.Point2[]): boolean;
@@ -0,0 +1,16 @@
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 containsPoint_1 = __importDefault(require("./containsPoint"));
7
+ function containsPoints(polyline, points) {
8
+ for (let i = 0, numPoint = points.length; i < numPoint; i++) {
9
+ if (!(0, containsPoint_1.default)(polyline, points[i])) {
10
+ return false;
11
+ }
12
+ }
13
+ return true;
14
+ }
15
+ exports.default = containsPoints;
16
+ //# sourceMappingURL=containsPoints.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"containsPoints.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/containsPoints.ts"],"names":[],"mappings":";;;;;AACA,oEAA4C;AAS5C,SAAwB,cAAc,CACpC,QAAwB,EACxB,MAAsB;IAEtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,QAAQ,EAAE,CAAC,EAAE,EAAE;QAC3D,IAAI,CAAC,IAAA,uBAAa,EAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE;YACvC,OAAO,KAAK,CAAC;SACd;KACF;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAXD,iCAWC"}
@@ -0,0 +1,2 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ export default function getWindingDirection(polyline: Types.Point2[]): number;
@@ -0,0 +1,12 @@
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 getSignedArea_1 = __importDefault(require("./getSignedArea"));
7
+ function getWindingDirection(polyline) {
8
+ const signedArea = (0, getSignedArea_1.default)(polyline);
9
+ return signedArea >= 0 ? 1 : -1;
10
+ }
11
+ exports.default = getWindingDirection;
12
+ //# sourceMappingURL=getWindingDirection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getWindingDirection.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/getWindingDirection.ts"],"names":[],"mappings":";;;;;AACA,oEAA4C;AAO5C,SAAwB,mBAAmB,CAAC,QAAwB;IAClE,MAAM,UAAU,GAAG,IAAA,uBAAa,EAAC,QAAQ,CAAC,CAAC;IAG3C,OAAO,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClC,CAAC;AALD,sCAKC"}
@@ -1,8 +1,10 @@
1
1
  import isClosed from './isClosed';
2
2
  import containsPoint from './containsPoint';
3
+ import containsPoints from './containsPoints';
3
4
  import getAABB from './getAABB';
4
5
  import getArea from './getArea';
5
6
  import getSignedArea from './getSignedArea';
7
+ import getWindingDirection from './getWindingDirection';
6
8
  import getNormal3 from './getNormal3';
7
9
  import getNormal2 from './getNormal2';
8
10
  import { mergePolylines, subtractPolylines } from './combinePolyline';
@@ -15,4 +17,4 @@ import getSubPixelSpacingAndXYDirections from './getSubPixelSpacingAndXYDirectio
15
17
  import pointsAreWithinCloseContourProximity from './pointsAreWithinCloseContourProximity';
16
18
  import addCanvasPointsToArray from './addCanvasPointsToArray';
17
19
  import pointCanProjectOnLine from './pointCanProjectOnLine';
18
- export { isClosed, containsPoint, getAABB, getArea, getSignedArea, getNormal3, getNormal2, intersectPolyline, getFirstLineSegmentIntersectionIndexes, getLineSegmentIntersectionsIndexes, getLineSegmentIntersectionsCoordinates, getClosestLineSegmentIntersection, getSubPixelSpacingAndXYDirections, pointsAreWithinCloseContourProximity, addCanvasPointsToArray, pointCanProjectOnLine, mergePolylines, subtractPolylines, };
20
+ export { isClosed, containsPoint, containsPoints, getAABB, getArea, getSignedArea, getWindingDirection, getNormal3, getNormal2, intersectPolyline, getFirstLineSegmentIntersectionIndexes, getLineSegmentIntersectionsIndexes, getLineSegmentIntersectionsCoordinates, getClosestLineSegmentIntersection, getSubPixelSpacingAndXYDirections, pointsAreWithinCloseContourProximity, addCanvasPointsToArray, pointCanProjectOnLine, mergePolylines, subtractPolylines, };
@@ -3,17 +3,21 @@ 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.subtractPolylines = exports.mergePolylines = exports.pointCanProjectOnLine = exports.addCanvasPointsToArray = exports.pointsAreWithinCloseContourProximity = exports.getSubPixelSpacingAndXYDirections = exports.getClosestLineSegmentIntersection = exports.getLineSegmentIntersectionsCoordinates = exports.getLineSegmentIntersectionsIndexes = exports.getFirstLineSegmentIntersectionIndexes = exports.intersectPolyline = exports.getNormal2 = exports.getNormal3 = exports.getSignedArea = exports.getArea = exports.getAABB = exports.containsPoint = exports.isClosed = void 0;
6
+ exports.subtractPolylines = exports.mergePolylines = exports.pointCanProjectOnLine = exports.addCanvasPointsToArray = exports.pointsAreWithinCloseContourProximity = exports.getSubPixelSpacingAndXYDirections = exports.getClosestLineSegmentIntersection = exports.getLineSegmentIntersectionsCoordinates = exports.getLineSegmentIntersectionsIndexes = exports.getFirstLineSegmentIntersectionIndexes = exports.intersectPolyline = exports.getNormal2 = exports.getNormal3 = exports.getWindingDirection = exports.getSignedArea = exports.getArea = exports.getAABB = exports.containsPoints = exports.containsPoint = exports.isClosed = void 0;
7
7
  const isClosed_1 = __importDefault(require("./isClosed"));
8
8
  exports.isClosed = isClosed_1.default;
9
9
  const containsPoint_1 = __importDefault(require("./containsPoint"));
10
10
  exports.containsPoint = containsPoint_1.default;
11
+ const containsPoints_1 = __importDefault(require("./containsPoints"));
12
+ exports.containsPoints = containsPoints_1.default;
11
13
  const getAABB_1 = __importDefault(require("./getAABB"));
12
14
  exports.getAABB = getAABB_1.default;
13
15
  const getArea_1 = __importDefault(require("./getArea"));
14
16
  exports.getArea = getArea_1.default;
15
17
  const getSignedArea_1 = __importDefault(require("./getSignedArea"));
16
18
  exports.getSignedArea = getSignedArea_1.default;
19
+ const getWindingDirection_1 = __importDefault(require("./getWindingDirection"));
20
+ exports.getWindingDirection = getWindingDirection_1.default;
17
21
  const getNormal3_1 = __importDefault(require("./getNormal3"));
18
22
  exports.getNormal3 = getNormal3_1.default;
19
23
  const getNormal2_1 = __importDefault(require("./getNormal2"));
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAmBhC,mBAnBK,kBAAQ,CAmBL;AAlBV,oEAA4C;AAmB1C,wBAnBK,uBAAa,CAmBL;AAlBf,wDAAgC;AAmB9B,kBAnBK,iBAAO,CAmBL;AAlBT,wDAAgC;AAmB9B,kBAnBK,iBAAO,CAmBL;AAlBT,oEAA4C;AAmB1C,wBAnBK,uBAAa,CAmBL;AAlBf,8DAAsC;AAmBpC,qBAnBK,oBAAU,CAmBL;AAlBZ,8DAAsC;AAmBpC,qBAnBK,oBAAU,CAmBL;AAlBZ,uDAAsE;AA4BpE,+FA5BO,gCAAc,OA4BP;AACd,kGA7BuB,mCAAiB,OA6BvB;AA5BnB,4EAAoD;AAkBlD,4BAlBK,2BAAiB,CAkBL;AAjBnB,sHAA8F;AAkB5F,iDAlBK,gDAAsC,CAkBL;AAjBxC,8GAAsF;AAkBpF,6CAlBK,4CAAkC,CAkBL;AAjBpC,sHAA8F;AAkB5F,iDAlBK,gDAAsC,CAkBL;AAjBxC,4GAAoF;AAkBlF,4CAlBK,2CAAiC,CAkBL;AAjBnC,4GAAoF;AAkBlF,4CAlBK,2CAAiC,CAkBL;AAjBnC,kHAA0F;AAkBxF,+CAlBK,8CAAoC,CAkBL;AAjBtC,sFAA8D;AAkB5D,iCAlBK,gCAAsB,CAkBL;AAjBxB,oFAA4D;AAkB1D,gCAlBK,+BAAqB,CAkBL"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/utilities/math/polyline/index.ts"],"names":[],"mappings":";;;;;;AAAA,0DAAkC;AAqBhC,mBArBK,kBAAQ,CAqBL;AApBV,oEAA4C;AAqB1C,wBArBK,uBAAa,CAqBL;AApBf,sEAA8C;AAqB5C,yBArBK,wBAAc,CAqBL;AApBhB,wDAAgC;AAqB9B,kBArBK,iBAAO,CAqBL;AApBT,wDAAgC;AAqB9B,kBArBK,iBAAO,CAqBL;AApBT,oEAA4C;AAqB1C,wBArBK,uBAAa,CAqBL;AApBf,gFAAwD;AAqBtD,8BArBK,6BAAmB,CAqBL;AApBrB,8DAAsC;AAqBpC,qBArBK,oBAAU,CAqBL;AApBZ,8DAAsC;AAqBpC,qBArBK,oBAAU,CAqBL;AApBZ,uDAAsE;AA8BpE,+FA9BO,gCAAc,OA8BP;AACd,kGA/BuB,mCAAiB,OA+BvB;AA9BnB,4EAAoD;AAoBlD,4BApBK,2BAAiB,CAoBL;AAnBnB,sHAA8F;AAoB5F,iDApBK,gDAAsC,CAoBL;AAnBxC,8GAAsF;AAoBpF,6CApBK,4CAAkC,CAoBL;AAnBpC,sHAA8F;AAoB5F,iDApBK,gDAAsC,CAoBL;AAnBxC,4GAAoF;AAoBlF,4CApBK,2CAAiC,CAoBL;AAnBnC,4GAAoF;AAoBlF,4CApBK,2CAAiC,CAoBL;AAnBnC,kHAA0F;AAoBxF,+CApBK,8CAAoC,CAoBL;AAnBtC,sFAA8D;AAoB5D,iCApBK,gCAAsB,CAoBL;AAnBxB,oFAA4D;AAoB1D,gCApBK,+BAAqB,CAoBL"}
@@ -3,6 +3,7 @@ import { PlanarFreehandROIAnnotation } from '../../../types/ToolSpecificAnnotati
3
3
  declare type PlanarFreehandROIDrawData = {
4
4
  polylineIndex: number;
5
5
  canvasPoints: Types.Point2[];
6
+ contourHoleProcessingEnabled: boolean;
6
7
  };
7
8
  declare type PlanarFreehandROIEditData = {
8
9
  prevCanvasPoints: Types.Point2[];
@@ -0,0 +1,49 @@
1
+ import _getHash from './_getHash';
2
+ import setNewAttributesIfValid from './setNewAttributesIfValid';
3
+ import setAttributesIfNecessary from './setAttributesIfNecessary';
4
+ export default function drawPath(svgDrawingHelper, annotationUID, pathUID, points, options) {
5
+ const hasSubArrays = points.length && points[0].length && Array.isArray(points[0][0]);
6
+ const pointsArrays = hasSubArrays ? points : [points];
7
+ const { color = 'dodgerblue', width = 10, fillColor = 'none', fillOpacity = 0, lineWidth, lineDash, closePath = false, } = options;
8
+ const strokeWidth = lineWidth || width;
9
+ const svgns = 'http://www.w3.org/2000/svg';
10
+ const svgNodeHash = _getHash(annotationUID, 'path', pathUID);
11
+ const existingNode = svgDrawingHelper.getSvgNode(svgNodeHash);
12
+ let pointsAttribute = '';
13
+ for (let i = 0, numArrays = pointsArrays.length; i < numArrays; i++) {
14
+ const points = pointsArrays[i];
15
+ const numPoints = points.length;
16
+ if (numPoints < 2) {
17
+ continue;
18
+ }
19
+ for (let j = 0; j < numPoints; j++) {
20
+ const point = points[j];
21
+ const cmd = j ? 'L' : 'M';
22
+ pointsAttribute += `${cmd} ${point[0]},${point[1]} `;
23
+ }
24
+ if (closePath) {
25
+ pointsAttribute += 'Z ';
26
+ }
27
+ }
28
+ if (!pointsAttribute) {
29
+ return;
30
+ }
31
+ const attributes = {
32
+ d: pointsAttribute,
33
+ stroke: color,
34
+ fill: fillColor,
35
+ 'fill-opacity': fillOpacity,
36
+ 'stroke-width': strokeWidth,
37
+ 'stroke-dasharray': lineDash,
38
+ };
39
+ if (existingNode) {
40
+ setAttributesIfNecessary(attributes, existingNode);
41
+ svgDrawingHelper.setNodeTouched(svgNodeHash);
42
+ }
43
+ else {
44
+ const newNode = document.createElementNS(svgns, 'path');
45
+ setNewAttributesIfValid(attributes, newNode);
46
+ svgDrawingHelper.appendNode(newNode, svgNodeHash);
47
+ }
48
+ }
49
+ //# sourceMappingURL=drawPath.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawPath.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawPath.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AASlE,MAAM,CAAC,OAAO,UAAU,QAAQ,CAC9B,gBAAkC,EAClC,aAAqB,EACrB,OAAe,EACf,MAAyC,EACzC,OAQC;IAID,MAAM,YAAY,GAChB,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,YAAY,GAAG,YAAY,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;IACtD,MAAM,EACJ,KAAK,GAAG,YAAY,EACpB,KAAK,GAAG,EAAE,EACV,SAAS,GAAG,MAAM,EAClB,WAAW,GAAG,CAAC,EACf,SAAS,EACT,QAAQ,EACR,SAAS,GAAG,KAAK,GAClB,GAAG,OAAO,CAAC;IAGZ,MAAM,WAAW,GAAG,SAAS,IAAI,KAAK,CAAC;IAEvC,MAAM,KAAK,GAAG,4BAA4B,CAAC;IAC3C,MAAM,WAAW,GAAG,QAAQ,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAG,gBAAgB,CAAC,UAAU,CAAC,WAAW,CAAC,CAAC;IAC9D,IAAI,eAAe,GAAG,EAAE,CAAC;IAEzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,SAAS,GAAG,YAAY,CAA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, annotationUID, polylineUI
5
5
  if (points.length < 2) {
6
6
  return;
7
7
  }
8
- const { fillColor, fillOpacity, color, width, lineWidth, lineDash } = Object.assign({
9
- color: 'dodgerblue',
10
- width: '2',
11
- fillColor: 'none',
12
- fillOpacity: 0,
13
- lineWidth: undefined,
14
- lineDash: undefined,
15
- connectLastToFirst: false,
16
- }, options);
8
+ const { color = 'dodgerblue', width = 10, fillColor = 'none', fillOpacity = 0, lineWidth, lineDash, closePath = false, } = options;
17
9
  const strokeWidth = lineWidth || width;
18
10
  const svgns = 'http://www.w3.org/2000/svg';
19
11
  const svgNodeHash = _getHash(annotationUID, 'polyline', polylineUID);
@@ -22,7 +14,7 @@ export default function drawPolyline(svgDrawingHelper, annotationUID, polylineUI
22
14
  for (const point of points) {
23
15
  pointsAttribute += `${point[0].toFixed(1)}, ${point[1].toFixed(1)} `;
24
16
  }
25
- if (options.connectLastToFirst) {
17
+ if (closePath) {
26
18
  const firstPoint = points[0];
27
19
  pointsAttribute += `${firstPoint[0]}, ${firstPoint[1]}`;
28
20
  }
@@ -1 +1 @@
1
- {"version":3,"file":"drawPolyline.js","sourceRoot":"","sources":["../../../src/drawingSvg/drawPolyline.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAChE,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AASlE,MAAM,CAAC,OAAO,UAAU,YAAY,CAClC,gBAAkC,EAClC,aAAqB,EACrB,WAAmB,EACnB,MAAsB,EACtB,OAQC;IAED,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE;QACrB,OAAO;KACR;IAED,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GACjE,MAAM,CAAC,MAAM,CACX;QACE,KAAK,EAAE,YAAY;QACnB,KAAK,EAAE,GAAG;QACV,SAAS,EAAE,MAAM;QACjB,WA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CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC;KACzD;IAED,MAAM,UAAU,GAAG;QACjB,MAAM,EAAE,eAAe;QACvB,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,SAAS;QACf,cAAc,EAAE,WAAW;QAC3B,cAAc,EAAE,WAAW;QAC3B,kBAAkB,EAAE,QAAQ;KAC7B,CAAC;IAEF,IAAI,gBAAgB,EAAE;QAEpB,wBAAwB,CAAC,UAAU,EAAE,gBAAgB,CAAC,CAAC;QAEvD,gBAAgB,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;KAC9C;SAAM;QACL,MAAM,WAAW,GAAG,QAAQ,CAAC,eAAe,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;QAEhE,uBAAuB,CAAC,UAAU,EAAE,WAAW,CAAC,CAAC;QAEjD,gBAAgB,CAAC,UAAU,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;KACvD;AACH,CAAC"}
@@ -6,6 +6,7 @@ import drawHandles from './drawHandles';
6
6
  import drawHandle from './drawHandle';
7
7
  import drawLine from './drawLine';
8
8
  import drawPolyline from './drawPolyline';
9
+ import drawPath from './drawPath';
9
10
  import drawLinkedTextBox from './drawLinkedTextBox';
10
11
  import drawRect from './drawRect';
11
12
  import drawTextBox from './drawTextBox';
@@ -13,5 +14,5 @@ import drawArrow from './drawArrow';
13
14
  import drawRedactionRect from './drawRedactionRect';
14
15
  import setAttributesIfNecessary from './setAttributesIfNecessary';
15
16
  import setNewAttributesIfValid from './setNewAttributesIfValid';
16
- export { draw, drawCircle, drawEllipse, drawEllipseByCoordinates, drawHandles, drawHandle, drawLine, drawPolyline, drawLinkedTextBox, drawRect, drawTextBox, drawArrow, drawRedactionRect, setAttributesIfNecessary, setNewAttributesIfValid, };
17
+ export { draw, drawCircle, drawEllipse, drawEllipseByCoordinates, drawHandles, drawHandle, drawLine, drawPolyline, drawPath, drawLinkedTextBox, drawRect, drawTextBox, drawArrow, drawRedactionRect, setAttributesIfNecessary, setNewAttributesIfValid, };
17
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawingSvg/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,wBAAwB,EACxB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,GACxB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/drawingSvg/index.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,QAAQ,MAAM,YAAY,CAAC;AAClC,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,iBAAiB,MAAM,qBAAqB,CAAC;AACpD,OAAO,wBAAwB,MAAM,4BAA4B,CAAC;AAClE,OAAO,uBAAuB,MAAM,2BAA2B,CAAC;AAEhE,OAAO,EACL,IAAI,EACJ,UAAU,EACV,WAAW,EACX,wBAAwB,EACxB,WAAW,EACX,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,wBAAwB,EACxB,uBAAuB,GACxB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getActiveToolForMouseEvent.js","sourceRoot":"","sources":["../../../../src/eventDispatchers/shared/getActiveToolForMouseEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAiB,SAAS,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAExD,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAElD,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;AAW7B,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAChD,GAAwC;IAGxC,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC;IACrD,MAAM,UAAU,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;IAKpC,MAAM,WAAW,GACf,gBAAgB,CAAC,UAAU,CAAC,IAAI,gBAAgB,CAAC,cAAc,EAAE,CAAC;IAEpE,MAAM,SAAS,GAAG,gBAAgB,CAAC,uBAAuB,CACxD,UAAU,EACV,iBAAiB,CAClB,CAAC;IAEF,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,MAAM,kBAAkB,GAAG,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC9D,MAAM,mBAAmB,GAAG,SAAS,CAAC,sBAAsB,EAAE,CAAC;IAE/D,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,WAAW,GAAG,SAAS,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QAIpD,MAAM,cAAc,GAClB,WAAW,CAAC,QAAQ,CAAC,MAAM;YAC3B,WAAW,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE;gBACpC,OAAO,CACL,OAAO,CAAC,WAAW;oBACjB,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACzD,OAAO,CAAC,WAAW,KAAK,WAAW,CACpC,CAAC;YACJ,CAAC,CAAC,CAAC;QAEL,IAAI,WAAW,CAAC,IAAI,KAAK,MAAM,IAAI,cAAc,EAAE;YACjD,OAAO,SAAS,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;SAC5C;KACF;AACH,CAAC"}
1
+ {"version":3,"file":"getActiveToolForMouseEvent.js","sourceRoot":"","sources":["../../../../src/eventDispatchers/shared/getActiveToolForMouseEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,sB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