@cornerstonejs/tools 1.51.5 → 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 (339) 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 +3 -11
  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/enums/ChangeTypes.d.ts +2 -1
  11. package/dist/cjs/enums/ChangeTypes.js +1 -0
  12. package/dist/cjs/enums/ChangeTypes.js.map +1 -1
  13. package/dist/cjs/eventDispatchers/keyboardEventHandlers/keyDown.js +1 -1
  14. package/dist/cjs/eventDispatchers/keyboardEventHandlers/keyDown.js.map +1 -1
  15. package/dist/cjs/eventDispatchers/shared/getActiveToolForMouseEvent.js.map +1 -1
  16. package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +1 -1
  17. package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +165 -78
  18. package/dist/cjs/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js.map +1 -1
  19. package/dist/cjs/stateManagement/annotation/annotationState.d.ts +6 -1
  20. package/dist/cjs/stateManagement/annotation/annotationState.js +49 -1
  21. package/dist/cjs/stateManagement/annotation/annotationState.js.map +1 -1
  22. package/dist/cjs/stateManagement/annotation/helpers/state.d.ts +4 -2
  23. package/dist/cjs/stateManagement/annotation/helpers/state.js +16 -4
  24. package/dist/cjs/stateManagement/annotation/helpers/state.js.map +1 -1
  25. package/dist/cjs/stateManagement/index.d.ts +6 -1
  26. package/dist/cjs/stateManagement/index.js +6 -1
  27. package/dist/cjs/stateManagement/index.js.map +1 -1
  28. package/dist/cjs/store/ToolGroupManager/ToolGroup.d.ts +3 -1
  29. package/dist/cjs/store/ToolGroupManager/ToolGroup.js +3 -2
  30. package/dist/cjs/store/ToolGroupManager/ToolGroup.js.map +1 -1
  31. package/dist/cjs/tools/SegmentationIntersectionTool.js +1 -1
  32. package/dist/cjs/tools/SegmentationIntersectionTool.js.map +1 -1
  33. package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.d.ts +4 -0
  34. package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.js +82 -0
  35. package/dist/cjs/tools/annotation/LivewireContourSegmentationTool.js.map +1 -1
  36. package/dist/cjs/tools/annotation/LivewireContourTool.d.ts +13 -11
  37. package/dist/cjs/tools/annotation/LivewireContourTool.js +78 -65
  38. package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
  39. package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +3 -1
  40. package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -1
  41. package/dist/cjs/tools/annotation/SplineROITool.d.ts +6 -3
  42. package/dist/cjs/tools/annotation/SplineROITool.js +40 -21
  43. package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
  44. package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -7
  45. package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
  46. package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +24 -18
  47. package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
  48. package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +16 -10
  49. package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
  50. package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js +19 -7
  51. package/dist/cjs/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -1
  52. package/dist/cjs/tools/annotation/splines/LinearSpline.js +1 -1
  53. package/dist/cjs/tools/annotation/splines/LinearSpline.js.map +1 -1
  54. package/dist/cjs/tools/annotation/splines/Spline.d.ts +2 -0
  55. package/dist/cjs/tools/annotation/splines/Spline.js +7 -3
  56. package/dist/cjs/tools/annotation/splines/Spline.js.map +1 -1
  57. package/dist/cjs/tools/base/AnnotationTool.js.map +1 -1
  58. package/dist/cjs/tools/base/ContourBaseTool.d.ts +1 -0
  59. package/dist/cjs/tools/base/ContourBaseTool.js +18 -1
  60. package/dist/cjs/tools/base/ContourBaseTool.js.map +1 -1
  61. package/dist/cjs/tools/base/ContourSegmentationBaseTool.js +4 -0
  62. package/dist/cjs/tools/base/ContourSegmentationBaseTool.js.map +1 -1
  63. package/dist/cjs/tools/displayTools/Contour/contourConfig.js +1 -0
  64. package/dist/cjs/tools/displayTools/Contour/contourConfig.js.map +1 -1
  65. package/dist/cjs/types/AnnotationTypes.d.ts +2 -0
  66. package/dist/cjs/types/ContourAnnotation.d.ts +6 -0
  67. package/dist/cjs/types/ContourAnnotation.js +7 -0
  68. package/dist/cjs/types/ContourAnnotation.js.map +1 -1
  69. package/dist/cjs/types/ContourSegmentationAnnotation.d.ts +8 -0
  70. package/dist/cjs/types/ContourTypes.d.ts +1 -0
  71. package/dist/cjs/types/EventTypes.d.ts +4 -1
  72. package/dist/cjs/types/ISpline.d.ts +1 -0
  73. package/dist/cjs/types/InterpolationTypes.d.ts +2 -0
  74. package/dist/cjs/types/SplineProps.d.ts +1 -0
  75. package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +2 -5
  76. package/dist/cjs/utilities/contours/getContourHolesDataCanvas.d.ts +3 -0
  77. package/dist/cjs/utilities/contours/getContourHolesDataCanvas.js +21 -0
  78. package/dist/cjs/utilities/contours/getContourHolesDataCanvas.js.map +1 -0
  79. package/dist/cjs/utilities/contours/getContourHolesDataWorld.d.ts +3 -0
  80. package/dist/cjs/utilities/contours/getContourHolesDataWorld.js +10 -0
  81. package/dist/cjs/utilities/contours/getContourHolesDataWorld.js.map +1 -0
  82. package/dist/cjs/utilities/contours/index.d.ts +4 -1
  83. package/dist/cjs/utilities/contours/index.js +7 -1
  84. package/dist/cjs/utilities/contours/index.js.map +1 -1
  85. package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js.map +1 -1
  86. package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.js +2 -1
  87. package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.js.map +1 -1
  88. package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.js +2 -1
  89. package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.js.map +1 -1
  90. package/dist/cjs/utilities/contours/interpolation/getInterpolationData.js +3 -1
  91. package/dist/cjs/utilities/contours/interpolation/getInterpolationData.js.map +1 -1
  92. package/dist/cjs/utilities/contours/interpolation/interpolate.d.ts +8 -0
  93. package/dist/cjs/utilities/contours/interpolation/interpolate.js +56 -42
  94. package/dist/cjs/utilities/contours/interpolation/interpolate.js.map +1 -1
  95. package/dist/cjs/utilities/contours/interpolation/selectHandles.d.ts +4 -0
  96. package/dist/cjs/utilities/contours/interpolation/selectHandles.js +170 -0
  97. package/dist/cjs/utilities/contours/interpolation/selectHandles.js.map +1 -0
  98. package/dist/cjs/utilities/contours/updateContourPolyline.d.ts +10 -0
  99. package/dist/cjs/utilities/contours/updateContourPolyline.js +64 -0
  100. package/dist/cjs/utilities/contours/updateContourPolyline.js.map +1 -0
  101. package/dist/cjs/utilities/livewire/LivewireScissors.d.ts +2 -1
  102. package/dist/cjs/utilities/livewire/LivewireScissors.js +46 -24
  103. package/dist/cjs/utilities/livewire/LivewireScissors.js.map +1 -1
  104. package/dist/cjs/utilities/math/polyline/containsPoints.d.ts +2 -0
  105. package/dist/cjs/utilities/math/polyline/containsPoints.js +16 -0
  106. package/dist/cjs/utilities/math/polyline/containsPoints.js.map +1 -0
  107. package/dist/cjs/utilities/math/polyline/getWindingDirection.d.ts +2 -0
  108. package/dist/cjs/utilities/math/polyline/getWindingDirection.js +12 -0
  109. package/dist/cjs/utilities/math/polyline/getWindingDirection.js.map +1 -0
  110. package/dist/cjs/utilities/math/polyline/index.d.ts +3 -1
  111. package/dist/cjs/utilities/math/polyline/index.js +5 -1
  112. package/dist/cjs/utilities/math/polyline/index.js.map +1 -1
  113. package/dist/cjs/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +1 -0
  114. package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.js +13 -3
  115. package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.js.map +1 -1
  116. package/dist/esm/drawingSvg/drawPath.js +49 -0
  117. package/dist/esm/drawingSvg/drawPath.js.map +1 -0
  118. package/dist/esm/drawingSvg/drawPolyline.js +3 -11
  119. package/dist/esm/drawingSvg/drawPolyline.js.map +1 -1
  120. package/dist/esm/drawingSvg/index.js +2 -1
  121. package/dist/esm/drawingSvg/index.js.map +1 -1
  122. package/dist/esm/enums/ChangeTypes.js +1 -0
  123. package/dist/esm/enums/ChangeTypes.js.map +1 -1
  124. package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.js +1 -1
  125. package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.js.map +1 -1
  126. package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js.map +1 -1
  127. package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +106 -32
  128. package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js.map +1 -1
  129. package/dist/esm/stateManagement/annotation/annotationState.js +42 -1
  130. package/dist/esm/stateManagement/annotation/annotationState.js.map +1 -1
  131. package/dist/esm/stateManagement/annotation/helpers/state.js +15 -4
  132. package/dist/esm/stateManagement/annotation/helpers/state.js.map +1 -1
  133. package/dist/esm/stateManagement/index.js +2 -2
  134. package/dist/esm/stateManagement/index.js.map +1 -1
  135. package/dist/esm/store/ToolGroupManager/ToolGroup.js +3 -2
  136. package/dist/esm/store/ToolGroupManager/ToolGroup.js.map +1 -1
  137. package/dist/esm/tools/SegmentationIntersectionTool.js +1 -1
  138. package/dist/esm/tools/SegmentationIntersectionTool.js.map +1 -1
  139. package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js +81 -0
  140. package/dist/esm/tools/annotation/LivewireContourSegmentationTool.js.map +1 -1
  141. package/dist/esm/tools/annotation/LivewireContourTool.js +80 -67
  142. package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
  143. package/dist/esm/tools/annotation/PlanarFreehandROITool.js +3 -1
  144. package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -1
  145. package/dist/esm/tools/annotation/SplineROITool.js +40 -22
  146. package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
  147. package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -7
  148. package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
  149. package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +25 -19
  150. package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
  151. package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +16 -10
  152. package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
  153. package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js +20 -8
  154. package/dist/esm/tools/annotation/planarFreehandROITool/renderMethods.js.map +1 -1
  155. package/dist/esm/tools/annotation/splines/LinearSpline.js +1 -1
  156. package/dist/esm/tools/annotation/splines/LinearSpline.js.map +1 -1
  157. package/dist/esm/tools/annotation/splines/Spline.js +5 -1
  158. package/dist/esm/tools/annotation/splines/Spline.js.map +1 -1
  159. package/dist/esm/tools/base/AnnotationTool.js.map +1 -1
  160. package/dist/esm/tools/base/ContourBaseTool.js +20 -3
  161. package/dist/esm/tools/base/ContourBaseTool.js.map +1 -1
  162. package/dist/esm/tools/base/ContourSegmentationBaseTool.js +4 -0
  163. package/dist/esm/tools/base/ContourSegmentationBaseTool.js.map +1 -1
  164. package/dist/esm/tools/displayTools/Contour/contourConfig.js +1 -0
  165. package/dist/esm/tools/displayTools/Contour/contourConfig.js.map +1 -1
  166. package/dist/esm/types/ContourAnnotation.js +6 -1
  167. package/dist/esm/types/ContourAnnotation.js.map +1 -1
  168. package/dist/esm/utilities/contours/getContourHolesDataCanvas.js +15 -0
  169. package/dist/esm/utilities/contours/getContourHolesDataCanvas.js.map +1 -0
  170. package/dist/esm/utilities/contours/getContourHolesDataWorld.js +6 -0
  171. package/dist/esm/utilities/contours/getContourHolesDataWorld.js.map +1 -0
  172. package/dist/esm/utilities/contours/index.js +4 -1
  173. package/dist/esm/utilities/contours/index.js.map +1 -1
  174. package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js.map +1 -1
  175. package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js +2 -1
  176. package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js.map +1 -1
  177. package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js +2 -1
  178. package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js.map +1 -1
  179. package/dist/esm/utilities/contours/interpolation/getInterpolationData.js +3 -1
  180. package/dist/esm/utilities/contours/interpolation/getInterpolationData.js.map +1 -1
  181. package/dist/esm/utilities/contours/interpolation/interpolate.js +57 -43
  182. package/dist/esm/utilities/contours/interpolation/interpolate.js.map +1 -1
  183. package/dist/esm/utilities/contours/interpolation/selectHandles.js +164 -0
  184. package/dist/esm/utilities/contours/interpolation/selectHandles.js.map +1 -0
  185. package/dist/esm/utilities/contours/updateContourPolyline.js +38 -0
  186. package/dist/esm/utilities/contours/updateContourPolyline.js.map +1 -0
  187. package/dist/esm/utilities/livewire/LivewireScissors.js +46 -24
  188. package/dist/esm/utilities/livewire/LivewireScissors.js.map +1 -1
  189. package/dist/esm/utilities/math/polyline/containsPoints.js +10 -0
  190. package/dist/esm/utilities/math/polyline/containsPoints.js.map +1 -0
  191. package/dist/esm/utilities/math/polyline/getWindingDirection.js +6 -0
  192. package/dist/esm/utilities/math/polyline/getWindingDirection.js.map +1 -0
  193. package/dist/esm/utilities/math/polyline/index.js +3 -1
  194. package/dist/esm/utilities/math/polyline/index.js.map +1 -1
  195. package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js +13 -3
  196. package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js.map +1 -1
  197. package/dist/types/drawingSvg/drawPath.d.ts +12 -0
  198. package/dist/types/drawingSvg/drawPath.d.ts.map +1 -0
  199. package/dist/types/drawingSvg/drawPolyline.d.ts +1 -1
  200. package/dist/types/drawingSvg/drawPolyline.d.ts.map +1 -1
  201. package/dist/types/drawingSvg/index.d.ts +2 -1
  202. package/dist/types/drawingSvg/index.d.ts.map +1 -1
  203. package/dist/types/enums/ChangeTypes.d.ts +2 -1
  204. package/dist/types/enums/ChangeTypes.d.ts.map +1 -1
  205. package/dist/types/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +1 -1
  206. package/dist/types/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts.map +1 -1
  207. package/dist/types/stateManagement/annotation/annotationState.d.ts +6 -1
  208. package/dist/types/stateManagement/annotation/annotationState.d.ts.map +1 -1
  209. package/dist/types/stateManagement/annotation/helpers/state.d.ts +4 -2
  210. package/dist/types/stateManagement/annotation/helpers/state.d.ts.map +1 -1
  211. package/dist/types/stateManagement/index.d.ts +6 -1
  212. package/dist/types/store/ToolGroupManager/ToolGroup.d.ts +3 -1
  213. package/dist/types/store/ToolGroupManager/ToolGroup.d.ts.map +1 -1
  214. package/dist/types/tools/annotation/LivewireContourSegmentationTool.d.ts +4 -0
  215. package/dist/types/tools/annotation/LivewireContourSegmentationTool.d.ts.map +1 -1
  216. package/dist/types/tools/annotation/LivewireContourTool.d.ts +13 -11
  217. package/dist/types/tools/annotation/LivewireContourTool.d.ts.map +1 -1
  218. package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts.map +1 -1
  219. package/dist/types/tools/annotation/SplineROITool.d.ts +6 -3
  220. package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -1
  221. package/dist/types/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts.map +1 -1
  222. package/dist/types/tools/annotation/planarFreehandROITool/drawLoop.d.ts.map +1 -1
  223. package/dist/types/tools/annotation/planarFreehandROITool/openContourEditLoop.d.ts.map +1 -1
  224. package/dist/types/tools/annotation/planarFreehandROITool/renderMethods.d.ts.map +1 -1
  225. package/dist/types/tools/annotation/splines/Spline.d.ts +2 -0
  226. package/dist/types/tools/annotation/splines/Spline.d.ts.map +1 -1
  227. package/dist/types/tools/base/AnnotationTool.d.ts.map +1 -1
  228. package/dist/types/tools/base/ContourBaseTool.d.ts +1 -0
  229. package/dist/types/tools/base/ContourBaseTool.d.ts.map +1 -1
  230. package/dist/types/tools/base/ContourSegmentationBaseTool.d.ts.map +1 -1
  231. package/dist/types/tools/displayTools/Contour/contourConfig.d.ts.map +1 -1
  232. package/dist/types/types/AnnotationTypes.d.ts +2 -0
  233. package/dist/types/types/AnnotationTypes.d.ts.map +1 -1
  234. package/dist/types/types/ContourAnnotation.d.ts +6 -0
  235. package/dist/types/types/ContourAnnotation.d.ts.map +1 -1
  236. package/dist/types/types/ContourSegmentationAnnotation.d.ts +8 -0
  237. package/dist/types/types/ContourSegmentationAnnotation.d.ts.map +1 -1
  238. package/dist/types/types/ContourTypes.d.ts +1 -0
  239. package/dist/types/types/ContourTypes.d.ts.map +1 -1
  240. package/dist/types/types/EventTypes.d.ts +4 -1
  241. package/dist/types/types/EventTypes.d.ts.map +1 -1
  242. package/dist/types/types/ISpline.d.ts +1 -0
  243. package/dist/types/types/ISpline.d.ts.map +1 -1
  244. package/dist/types/types/InterpolationTypes.d.ts +2 -0
  245. package/dist/types/types/InterpolationTypes.d.ts.map +1 -1
  246. package/dist/types/types/SplineProps.d.ts +1 -0
  247. package/dist/types/types/SplineProps.d.ts.map +1 -1
  248. package/dist/types/types/ToolSpecificAnnotationTypes.d.ts +2 -5
  249. package/dist/types/types/ToolSpecificAnnotationTypes.d.ts.map +1 -1
  250. package/dist/types/utilities/contours/getContourHolesDataCanvas.d.ts +4 -0
  251. package/dist/types/utilities/contours/getContourHolesDataCanvas.d.ts.map +1 -0
  252. package/dist/types/utilities/contours/getContourHolesDataWorld.d.ts +4 -0
  253. package/dist/types/utilities/contours/getContourHolesDataWorld.d.ts.map +1 -0
  254. package/dist/types/utilities/contours/index.d.ts +4 -1
  255. package/dist/types/utilities/contours/index.d.ts.map +1 -1
  256. package/dist/types/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts.map +1 -1
  257. package/dist/types/utilities/contours/interpolation/createPolylineToolData.d.ts.map +1 -1
  258. package/dist/types/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts.map +1 -1
  259. package/dist/types/utilities/contours/interpolation/getInterpolationData.d.ts.map +1 -1
  260. package/dist/types/utilities/contours/interpolation/interpolate.d.ts +8 -0
  261. package/dist/types/utilities/contours/interpolation/interpolate.d.ts.map +1 -1
  262. package/dist/types/utilities/contours/interpolation/selectHandles.d.ts +5 -0
  263. package/dist/types/utilities/contours/interpolation/selectHandles.d.ts.map +1 -0
  264. package/dist/types/utilities/contours/updateContourPolyline.d.ts +11 -0
  265. package/dist/types/utilities/contours/updateContourPolyline.d.ts.map +1 -0
  266. package/dist/types/utilities/livewire/LivewireScissors.d.ts +2 -1
  267. package/dist/types/utilities/livewire/LivewireScissors.d.ts.map +1 -1
  268. package/dist/types/utilities/math/polyline/containsPoints.d.ts +3 -0
  269. package/dist/types/utilities/math/polyline/containsPoints.d.ts.map +1 -0
  270. package/dist/types/utilities/math/polyline/getWindingDirection.d.ts +3 -0
  271. package/dist/types/utilities/math/polyline/getWindingDirection.d.ts.map +1 -0
  272. package/dist/types/utilities/math/polyline/index.d.ts +3 -1
  273. package/dist/types/utilities/math/polyline/index.d.ts.map +1 -1
  274. package/dist/types/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +1 -0
  275. package/dist/types/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts.map +1 -1
  276. package/dist/types/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts.map +1 -1
  277. package/dist/umd/index.js +1 -1
  278. package/dist/umd/index.js.map +1 -1
  279. package/package.json +3 -3
  280. package/src/drawingSvg/drawPath.ts +96 -0
  281. package/src/drawingSvg/drawPolyline.ts +13 -17
  282. package/src/drawingSvg/index.ts +2 -0
  283. package/src/enums/ChangeTypes.ts +4 -0
  284. package/src/eventDispatchers/keyboardEventHandlers/keyDown.ts +1 -1
  285. package/src/eventDispatchers/shared/getActiveToolForMouseEvent.ts +1 -1
  286. package/src/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.ts +194 -58
  287. package/src/stateManagement/annotation/annotationState.ts +101 -0
  288. package/src/stateManagement/annotation/helpers/state.ts +33 -3
  289. package/src/stateManagement/index.js +10 -0
  290. package/src/store/ToolGroupManager/ToolGroup.ts +9 -2
  291. package/src/tools/SegmentationIntersectionTool.ts +1 -1
  292. package/src/tools/annotation/LivewireContourSegmentationTool.ts +151 -0
  293. package/src/tools/annotation/LivewireContourTool.ts +172 -114
  294. package/src/tools/annotation/PlanarFreehandROITool.ts +13 -3
  295. package/src/tools/annotation/SplineROITool.ts +78 -31
  296. package/src/tools/annotation/planarFreehandROITool/closedContourEditLoop.ts +20 -11
  297. package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +40 -21
  298. package/src/tools/annotation/planarFreehandROITool/openContourEditLoop.ts +28 -13
  299. package/src/tools/annotation/planarFreehandROITool/renderMethods.ts +28 -10
  300. package/src/tools/annotation/splines/LinearSpline.ts +1 -1
  301. package/src/tools/annotation/splines/Spline.ts +13 -1
  302. package/src/tools/base/AnnotationTool.ts +1 -0
  303. package/src/tools/base/ContourBaseTool.ts +45 -3
  304. package/src/tools/base/ContourSegmentationBaseTool.ts +6 -0
  305. package/src/tools/displayTools/Contour/contourConfig.ts +1 -0
  306. package/src/types/AnnotationTypes.ts +14 -0
  307. package/src/types/ContourAnnotation.ts +13 -0
  308. package/src/types/ContourSegmentationAnnotation.ts +38 -0
  309. package/src/types/ContourTypes.ts +3 -0
  310. package/src/types/EventTypes.ts +9 -0
  311. package/src/types/ISpline.ts +3 -0
  312. package/src/types/InterpolationTypes.ts +6 -0
  313. package/src/types/SplineProps.ts +10 -0
  314. package/src/types/ToolSpecificAnnotationTypes.ts +7 -5
  315. package/src/utilities/contours/getContourHolesDataCanvas.ts +33 -0
  316. package/src/utilities/contours/getContourHolesDataWorld.ts +19 -0
  317. package/src/utilities/contours/index.ts +6 -0
  318. package/src/utilities/contours/interpolation/acceptAutogeneratedInterpolations.ts +3 -1
  319. package/src/utilities/contours/interpolation/createPolylineToolData.ts +7 -1
  320. package/src/utilities/contours/interpolation/findAnnotationForInterpolation.ts +2 -1
  321. package/src/utilities/contours/interpolation/getInterpolationData.ts +3 -1
  322. package/src/utilities/contours/interpolation/interpolate.ts +94 -75
  323. package/src/utilities/contours/interpolation/selectHandles.ts +240 -0
  324. package/src/utilities/contours/updateContourPolyline.ts +74 -0
  325. package/src/utilities/livewire/LivewireScissors.ts +65 -53
  326. package/src/utilities/math/polyline/containsPoint.ts +1 -1
  327. package/src/utilities/math/polyline/containsPoints.ts +22 -0
  328. package/src/utilities/math/polyline/getWindingDirection.ts +14 -0
  329. package/src/utilities/math/polyline/index.ts +4 -0
  330. package/src/utilities/math/polyline/planarFreehandROIInternalTypes.ts +1 -0
  331. package/src/utilities/segmentation/InterpolationManager/InterpolationManager.ts +39 -4
  332. package/dist/cjs/utilities/contours/PointsArray.d.ts +0 -29
  333. package/dist/cjs/utilities/contours/PointsArray.js +0 -104
  334. package/dist/cjs/utilities/contours/PointsArray.js.map +0 -1
  335. package/dist/esm/utilities/contours/PointsArray.js +0 -98
  336. package/dist/esm/utilities/contours/PointsArray.js.map +0 -1
  337. package/dist/types/utilities/contours/PointsArray.d.ts +0 -30
  338. package/dist/types/utilities/contours/PointsArray.d.ts.map +0 -1
  339. package/src/utilities/contours/PointsArray.ts +0 -165
@@ -105,45 +105,47 @@ export class LivewireScissors {
105
105
  }
106
106
 
107
107
  /**
108
- * Returns a smoothing path count for how many items to remove.
109
- * This will remove points, up to count which have a high gradient, up to
110
- * count of them where the clip value is larger than that provided.
108
+ * Finds a nearby point with a minimum cost nearby
111
109
  *
112
- * @returns Count of items to remove from the path.
110
+ * @param testPoint - to look nearby
111
+ * @param delta - how long a distance to look
112
+ * @returns A point having the minimum weighted distance from the testPoint
113
113
  */
114
- public smoothPathCount(
115
- pathPoints: Types.Point2[],
116
- lastPoint: Types.Point2,
117
- count = 5,
118
- clipValue = 0.85
119
- ) {
120
- const lastIndex =
121
- (lastPoint &&
122
- pathPoints.findIndex((point) => isEqual(point, lastPoint))) ||
123
- -1;
124
- if (pathPoints.length - lastIndex < count * 2) {
125
- // If a nearby point is clicked, just add it anyways, because that means
126
- // the user actually wants the given point
127
- return 0;
128
- }
129
- let removeCount = 0;
130
- for (
131
- let i = pathPoints.length - 1;
132
- i > pathPoints.length - count && i > 0;
133
- i--
134
- ) {
135
- const weighted = this._getWeightedDistance(
136
- pathPoints[i],
137
- pathPoints[i - 1]
138
- );
139
- if (weighted < clipValue) {
140
- return removeCount ? removeCount + 2 : 0;
114
+ public findMinNearby(testPoint: Types.Point2, delta = 2) {
115
+ const [x, y] = testPoint;
116
+ const { costs } = this;
117
+
118
+ const xRange = [
119
+ Math.max(0, x - delta),
120
+ Math.min(x + delta + 1, this.width),
121
+ ];
122
+ const yRange = [
123
+ Math.max(0, y - delta),
124
+ Math.min(y + delta + 1, this.height),
125
+ ];
126
+ let minValue = costs[this._getPointIndex(y, x)] * 0.8;
127
+
128
+ let minPoint = testPoint;
129
+ for (let xTest = xRange[0]; xTest < xRange[1]; xTest++) {
130
+ for (let yTest = yRange[0]; yTest < yRange[1]; yTest++) {
131
+ // Cost values are 0...1, with 1 being a poor choice for the
132
+ // livewire fitting - thus, we want to minimize our value, so the
133
+ // distance cost should be low for the center point.
134
+ const distanceCost =
135
+ 1 -
136
+ (Math.abs(xTest - testPoint[0]) + Math.abs(yTest - testPoint[1])) /
137
+ delta /
138
+ 2;
139
+ const weightCost = costs[this._getPointIndex(yTest, xTest)];
140
+
141
+ const weight = weightCost * 0.8 + distanceCost * 0.2;
142
+ if (weight < minValue) {
143
+ minPoint = [xTest, yTest];
144
+ minValue = weight;
145
+ }
141
146
  }
142
- removeCount++;
143
147
  }
144
- // Tried all of them, they were all too big, so assume they are really moving
145
- // along a high gradient.
146
- return 0;
148
+ return minPoint;
147
149
  }
148
150
 
149
151
  /**
@@ -281,7 +283,7 @@ export class LivewireScissors {
281
283
 
282
284
  // If it is at the end, back up one
283
285
  if (y + 1 === height) {
284
- index -= height;
286
+ index -= width;
285
287
  }
286
288
 
287
289
  return data[index] - data[index + width];
@@ -420,14 +422,9 @@ export class LivewireScissors {
420
422
  let pixelIndex = 0;
421
423
 
422
424
  for (let y = 0; y < height; y++) {
423
- for (let x = 0; x < width - 1; x++) {
425
+ for (let x = 0; x < width; x++) {
424
426
  gradX[pixelIndex++] = this._getDeltaX(x, y);
425
427
  }
426
-
427
- // Make the last column the same as the previous one because there is
428
- // no way to calculate `dx` since x+1 gets out of bounds
429
- gradX[pixelIndex] = gradX[pixelIndex - 1];
430
- pixelIndex++;
431
428
  }
432
429
 
433
430
  return gradX;
@@ -444,18 +441,12 @@ export class LivewireScissors {
444
441
  const gradY = new Float32Array(width * height);
445
442
  let pixelIndex = 0;
446
443
 
447
- for (let y = 0; y < height - 1; y++) {
444
+ for (let y = 0; y < height; y++) {
448
445
  for (let x = 0; x < width; x++) {
449
446
  gradY[pixelIndex++] = this._getDeltaY(x, y);
450
447
  }
451
448
  }
452
449
 
453
- // Make the last row the same as the previous one because there is
454
- // no way to calculate `dy` since y+1 gets out of bounds
455
- for (let len = gradY.length; pixelIndex < len; pixelIndex++) {
456
- gradY[pixelIndex] = gradY[pixelIndex - width];
457
- }
458
-
459
450
  return gradY;
460
451
  }
461
452
 
@@ -481,7 +472,7 @@ export class LivewireScissors {
481
472
  }
482
473
 
483
474
  /**
484
- * Compute the gradiant direction, in radians, between to points
475
+ * Compute the gradient direction, in radians, between two points
485
476
  *
486
477
  * @param px - Point `p` x-coordinate of point p.
487
478
  * @param py - Point `p` y-coordinate of point p.
@@ -506,23 +497,44 @@ export class LivewireScissors {
506
497
  dp = -dp;
507
498
  dq = -dq;
508
499
  }
509
-
510
500
  if (px !== qx && py !== qy) {
511
501
  // It's going diagonally between pixels
512
502
  dp *= Math.SQRT1_2;
513
503
  dq *= Math.SQRT1_2;
514
504
  }
505
+ dq = Math.min(Math.max(dq, -1), 1);
506
+
507
+ const direction =
508
+ TWO_THIRD_PI * (Math.acos(Math.min(dp, 1)) + Math.acos(dq));
509
+ if (isNaN(direction) || !isFinite(direction)) {
510
+ console.warn('Found non-direction:', px, py, qx, qy, dp, dq, direction);
511
+ return 1;
512
+ }
513
+ return direction;
514
+ }
515
515
 
516
- return TWO_THIRD_PI * (Math.acos(dp) + Math.acos(dq));
516
+ /** Gets the cost to go from A to B */
517
+ public getCost(pointA, pointB): number {
518
+ return this._getWeightedDistance(pointA, pointB);
517
519
  }
518
520
 
519
521
  /**
520
522
  * Return a weighted distance between two points
521
523
  */
522
524
  private _getWeightedDistance(pointA: Types.Point2, pointB: Types.Point2) {
523
- const { _getPointIndex: index } = this;
525
+ const { _getPointIndex: index, width, height } = this;
524
526
  const [aX, aY] = pointA;
525
527
  const [bX, bY] = pointB;
528
+ // Assign a cost of 1 to any points outside the image, prevents using invalid
529
+ // points
530
+ if (bX < 0 || bX >= width || bY < 0 || bY >= height) {
531
+ return 1;
532
+ }
533
+ // Use a cost of 0 if the point was outside and is now going inside
534
+ if (aX < 0 || aY < 0 || aX >= width || aY >= height) {
535
+ return 0;
536
+ }
537
+
526
538
  const bIndex = index(bY, bX);
527
539
 
528
540
  // Weighted distance function
@@ -10,7 +10,7 @@ import isClosed from './isClosed';
10
10
  *
11
11
  * @param polyline - Polyline points (2D)
12
12
  * @param point - 2D Point
13
- * @returns True is the point is inside the polyline or false otherwise
13
+ * @returns True if the point is inside the polyline or false otherwise
14
14
  */
15
15
  export default function containsPoint(
16
16
  polyline: Types.Point2[],
@@ -0,0 +1,22 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ import containsPoint from './containsPoint';
3
+
4
+ /**
5
+ * Checks if a polyline contains a set of points.
6
+ *
7
+ * @param polyline - Polyline points (2D)
8
+ * @param points - 2D points to verify
9
+ * @returns True if all points are inside the polyline or false otherwise
10
+ */
11
+ export default function containsPoints(
12
+ polyline: Types.Point2[],
13
+ points: Types.Point2[]
14
+ ): boolean {
15
+ for (let i = 0, numPoint = points.length; i < numPoint; i++) {
16
+ if (!containsPoint(polyline, points[i])) {
17
+ return false;
18
+ }
19
+ }
20
+
21
+ return true;
22
+ }
@@ -0,0 +1,14 @@
1
+ import type { Types } from '@cornerstonejs/core';
2
+ import getSignedArea from './getSignedArea';
3
+
4
+ /**
5
+ * Calculate the winding direction (CW or CCW) of a polyline
6
+ * @param polyline - Polyline (2D)
7
+ * @returns 1 for CW or -1 for CCW polylines
8
+ */
9
+ export default function getWindingDirection(polyline: Types.Point2[]): number {
10
+ const signedArea = getSignedArea(polyline);
11
+
12
+ // Return 1 or -1 which is also possible to convert into ContourOrientation
13
+ return signedArea >= 0 ? 1 : -1;
14
+ }
@@ -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';
@@ -19,9 +21,11 @@ import pointCanProjectOnLine from './pointCanProjectOnLine';
19
21
  export {
20
22
  isClosed,
21
23
  containsPoint,
24
+ containsPoints,
22
25
  getAABB,
23
26
  getArea,
24
27
  getSignedArea,
28
+ getWindingDirection,
25
29
  getNormal3,
26
30
  getNormal2,
27
31
  intersectPolyline,
@@ -6,6 +6,7 @@ import { PlanarFreehandROIAnnotation } from '../../../types/ToolSpecificAnnotati
6
6
  type PlanarFreehandROIDrawData = {
7
7
  polylineIndex: number;
8
8
  canvasPoints: Types.Point2[];
9
+ contourHoleProcessingEnabled: boolean;
9
10
  };
10
11
 
11
12
  type PlanarFreehandROIEditData = {
@@ -20,6 +20,11 @@ import getViewportForAnnotation from '../../getViewportForAnnotation';
20
20
 
21
21
  const { uuidv4 } = csUtils;
22
22
 
23
+ const ChangeTypesForInterpolation = [
24
+ ChangeTypes.HandlesUpdated,
25
+ ChangeTypes.InterpolationUpdated,
26
+ ];
27
+
23
28
  export default class InterpolationManager {
24
29
  static toolNames = [];
25
30
 
@@ -31,13 +36,35 @@ export default class InterpolationManager {
31
36
 
32
37
  /**
33
38
  * Accepts the autogenerated interpolations, marking them as non-autogenerated.
34
- * Can provide a selector to choose which ones to accept
39
+ * Can provide a selector to choose which ones to accept.
40
+ *
41
+ * Rules for which items to select:
42
+ * 1. Only choose annotations having the same segment index and segmentationID
43
+ * 2. Exclude all contours having the same interpolation UID as any other contours
44
+ * on the same slice.
45
+ * 3. Exclude autogenerated annotations
46
+ * 4. Exclude any reset interpolationUIDs (this is a manual operation to allow
47
+ * creating a new interpolation)
48
+ * 5. Find the set of interpolationUID's remaining
49
+ * a. If the set is of size 0, assign a new interpolationUID
50
+ * b. If the set is of size 1, assign that interpolationUID
51
+ * c. Otherwise (optional, otherwise do b for size>1 randomly),
52
+ * for every remaining annotation, find the one whose center
53
+ * point is closest to the center point of the new annotation.
54
+ * Choose that interpolationUID
55
+ *
56
+ * To allow creating new interpolated groups, the idea is to just use a new
57
+ * segment index, then have an operation to update the segment index of an
58
+ * interpolation set. That way the user can easily draw/see the difference,
59
+ * and then merge them as required.
60
+ * However, the base rules allow creating two contours on a single image to
61
+ * create a separate set.
35
62
  */
36
63
  static acceptAutoGenerated(
37
64
  annotationGroupSelector: AnnotationGroupSelector,
38
65
  selector: AcceptInterpolationSelector = {}
39
66
  ) {
40
- const { toolNames, segmentationId, segmentIndex } = selector;
67
+ const { toolNames, segmentationId, segmentIndex, sliceIndex } = selector;
41
68
  for (const toolName of toolNames || InterpolationManager.toolNames) {
42
69
  const annotations = annotationState.getAnnotations(
43
70
  toolName,
@@ -47,13 +74,20 @@ export default class InterpolationManager {
47
74
  continue;
48
75
  }
49
76
  for (const annotation of annotations) {
50
- const { data, autoGenerated } = annotation;
77
+ const { data, autoGenerated, metadata } = annotation;
51
78
  if (!autoGenerated) {
52
79
  continue;
53
80
  }
54
81
  if (segmentIndex && segmentIndex !== data.segmentation.segmentIndex) {
55
82
  continue;
56
83
  }
84
+ if (
85
+ sliceIndex !== undefined &&
86
+ metadata &&
87
+ sliceIndex !== (metadata as any).referencedSliceIndex
88
+ ) {
89
+ continue;
90
+ }
57
91
  if (
58
92
  segmentationId &&
59
93
  segmentationId !== data.segmentation.segmentationId
@@ -141,7 +175,7 @@ export default class InterpolationManager {
141
175
 
142
176
  if (
143
177
  !this.toolNames.includes(toolName) ||
144
- changeType !== ChangeTypes.HandlesUpdated
178
+ !ChangeTypesForInterpolation.includes(changeType)
145
179
  ) {
146
180
  return;
147
181
  }
@@ -162,6 +196,7 @@ export default class InterpolationManager {
162
196
  sliceData,
163
197
  annotation,
164
198
  interpolationUID: annotation.interpolationUID,
199
+ isInterpolationUpdate: changeType === ChangeTypes.InterpolationUpdated,
165
200
  };
166
201
  interpolate(viewportData);
167
202
  };
@@ -1,29 +0,0 @@
1
- import type { Types } from '@cornerstonejs/core';
2
- export declare type PolyDataPointConfiguration = {
3
- dimensions?: 2 | 3;
4
- initialSize?: number;
5
- };
6
- export declare abstract class PointsArray<T> {
7
- data: Float32Array;
8
- dimensions: number;
9
- length: number;
10
- constructor(configuration?: PolyDataPointConfiguration);
11
- protected forEach(func: (value: T, index: number) => void, point: T): void;
12
- abstract getPoint(index: number, point: T): T;
13
- reverse(): void;
14
- protected map(f: (value: any, index: number) => T, factory: (index: number) => T): any[];
15
- static fromXYZ({ x, y, z }: Types.PointsXYZ): PointsArray3;
16
- }
17
- export declare class PointsArray2 extends PointsArray<Types.Point2> {
18
- constructor(configuration?: {});
19
- forEach(func: (value: Types.Point2, index: number) => void, point?: Types.Point2): void;
20
- getPoint(index: number, point?: Types.Point2): Types.Point2;
21
- get points(): any[];
22
- }
23
- export declare class PointsArray3 extends PointsArray<Types.Point3> {
24
- constructor(configuration?: {});
25
- forEach(func: (value: Types.Point3, index: number) => void, point?: Types.Point3): void;
26
- getPoint(index: number, point?: Types.Point3): Types.Point3;
27
- get points(): any[];
28
- getXYZ(): Types.PointsXYZ;
29
- }
@@ -1,104 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PointsArray3 = exports.PointsArray2 = exports.PointsArray = void 0;
4
- const gl_matrix_1 = require("gl-matrix");
5
- class PointsArray {
6
- constructor(configuration = {}) {
7
- this.dimensions = 3;
8
- this.length = 0;
9
- const { initialSize = 1024, dimensions = 3 } = configuration;
10
- this.data = new Float32Array(initialSize * dimensions);
11
- this.dimensions = dimensions;
12
- }
13
- forEach(func, point) {
14
- for (let i = 0; i < this.length; i++) {
15
- func(this.getPoint(i, point), i);
16
- }
17
- }
18
- reverse() {
19
- const midLength = Math.floor(this.length / 2);
20
- for (let i = 0; i < midLength; i++) {
21
- const indexStart = i * this.dimensions;
22
- const indexEnd = (this.length - 1 - i) * this.dimensions;
23
- for (let dimension = 0; dimension < this.dimensions; dimension++) {
24
- const valueStart = this.data[indexStart + dimension];
25
- this.data[indexStart + dimension] = this.data[indexEnd + dimension];
26
- this.data[indexEnd + dimension] = valueStart;
27
- }
28
- }
29
- }
30
- map(f, factory) {
31
- const mapData = [];
32
- for (let i = 0; i < this.length; i++) {
33
- mapData.push(f(this.getPoint(i, factory(i)), i));
34
- }
35
- return mapData;
36
- }
37
- static fromXYZ({ x, y, z }) {
38
- const array = new PointsArray3({ initialSize: x.length });
39
- let offset = 0;
40
- for (let i = 0; i < x.length; i++) {
41
- array.data[offset++] = x[i];
42
- array.data[offset++] = y[i];
43
- array.data[offset++] = z[i];
44
- }
45
- array.length = x.length;
46
- return array;
47
- }
48
- }
49
- exports.PointsArray = PointsArray;
50
- class PointsArray2 extends PointsArray {
51
- constructor(configuration = {}) {
52
- super(Object.assign(Object.assign({}, configuration), { dimensions: 2 }));
53
- }
54
- forEach(func, point = gl_matrix_1.vec2.create()) {
55
- super.forEach(func, point);
56
- }
57
- getPoint(index, point = gl_matrix_1.vec2.create()) {
58
- if (index >= this.length) {
59
- return;
60
- }
61
- const index2 = index * 2;
62
- point[0] = this.data[index2];
63
- point[1] = this.data[index2 + 1];
64
- return point;
65
- }
66
- get points() {
67
- return this.map((point) => point, () => gl_matrix_1.vec2.create());
68
- }
69
- }
70
- exports.PointsArray2 = PointsArray2;
71
- class PointsArray3 extends PointsArray {
72
- constructor(configuration = {}) {
73
- super(Object.assign(Object.assign({}, configuration), { dimensions: 3 }));
74
- }
75
- forEach(func, point = gl_matrix_1.vec3.create()) {
76
- super.forEach(func, point);
77
- }
78
- getPoint(index, point = gl_matrix_1.vec3.create()) {
79
- if (index >= this.length) {
80
- return;
81
- }
82
- const index2 = index * 3;
83
- point[0] = this.data[index2];
84
- point[1] = this.data[index2 + 1];
85
- point[2] = this.data[index2 + 2];
86
- return point;
87
- }
88
- get points() {
89
- return this.map((point) => point, () => gl_matrix_1.vec3.create());
90
- }
91
- getXYZ() {
92
- const x = [];
93
- const y = [];
94
- const z = [];
95
- this.forEach((point) => {
96
- x.push(point[0]);
97
- y.push(point[1]);
98
- z.push(point[2]);
99
- });
100
- return { x, y, z };
101
- }
102
- }
103
- exports.PointsArray3 = PointsArray3;
104
- //# sourceMappingURL=PointsArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PointsArray.js","sourceRoot":"","sources":["../../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K,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAW,MAAM;QACf,OAAO,IAAI,CAAC,GAAG,CACb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAChB,GAAG,EAAE,CAAC,gBAAI,CAAC,MAAM,EAAkB,CACpC,CAAC;IACJ,CAAC;IAEM,MAAM;QACX,MAAM,CAAC,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;YACrB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACjB,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QACH,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;IACrB,CAAC;CACF;AAzCD,oCAyCC"}
@@ -1,98 +0,0 @@
1
- import { vec2, vec3 } from 'gl-matrix';
2
- export class PointsArray {
3
- constructor(configuration = {}) {
4
- this.dimensions = 3;
5
- this.length = 0;
6
- const { initialSize = 1024, dimensions = 3 } = configuration;
7
- this.data = new Float32Array(initialSize * dimensions);
8
- this.dimensions = dimensions;
9
- }
10
- forEach(func, point) {
11
- for (let i = 0; i < this.length; i++) {
12
- func(this.getPoint(i, point), i);
13
- }
14
- }
15
- reverse() {
16
- const midLength = Math.floor(this.length / 2);
17
- for (let i = 0; i < midLength; i++) {
18
- const indexStart = i * this.dimensions;
19
- const indexEnd = (this.length - 1 - i) * this.dimensions;
20
- for (let dimension = 0; dimension < this.dimensions; dimension++) {
21
- const valueStart = this.data[indexStart + dimension];
22
- this.data[indexStart + dimension] = this.data[indexEnd + dimension];
23
- this.data[indexEnd + dimension] = valueStart;
24
- }
25
- }
26
- }
27
- map(f, factory) {
28
- const mapData = [];
29
- for (let i = 0; i < this.length; i++) {
30
- mapData.push(f(this.getPoint(i, factory(i)), i));
31
- }
32
- return mapData;
33
- }
34
- static fromXYZ({ x, y, z }) {
35
- const array = new PointsArray3({ initialSize: x.length });
36
- let offset = 0;
37
- for (let i = 0; i < x.length; i++) {
38
- array.data[offset++] = x[i];
39
- array.data[offset++] = y[i];
40
- array.data[offset++] = z[i];
41
- }
42
- array.length = x.length;
43
- return array;
44
- }
45
- }
46
- export class PointsArray2 extends PointsArray {
47
- constructor(configuration = {}) {
48
- super({ ...configuration, dimensions: 2 });
49
- }
50
- forEach(func, point = vec2.create()) {
51
- super.forEach(func, point);
52
- }
53
- getPoint(index, point = vec2.create()) {
54
- if (index >= this.length) {
55
- return;
56
- }
57
- const index2 = index * 2;
58
- point[0] = this.data[index2];
59
- point[1] = this.data[index2 + 1];
60
- return point;
61
- }
62
- get points() {
63
- return this.map((point) => point, () => vec2.create());
64
- }
65
- }
66
- export class PointsArray3 extends PointsArray {
67
- constructor(configuration = {}) {
68
- super({ ...configuration, dimensions: 3 });
69
- }
70
- forEach(func, point = vec3.create()) {
71
- super.forEach(func, point);
72
- }
73
- getPoint(index, point = vec3.create()) {
74
- if (index >= this.length) {
75
- return;
76
- }
77
- const index2 = index * 3;
78
- point[0] = this.data[index2];
79
- point[1] = this.data[index2 + 1];
80
- point[2] = this.data[index2 + 2];
81
- return point;
82
- }
83
- get points() {
84
- return this.map((point) => point, () => vec3.create());
85
- }
86
- getXYZ() {
87
- const x = [];
88
- const y = [];
89
- const z = [];
90
- this.forEach((point) => {
91
- x.push(point[0]);
92
- y.push(point[1]);
93
- z.push(point[2]);
94
- });
95
- return { x, y, z };
96
- }
97
- }
98
- //# sourceMappingURL=PointsArray.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PointsArray.js","sourceRoot":"","sources":["../../../../src/utilities/contours/PointsArray.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAevC,MAAM,OAAgB,WAAW;IAK/B,YAAY,gBAA4C,EAAE;QAH1D,eAAU,GAAG,CAAC,CAAC;QACR,WAAM,GAAG,CAAC,CAAC;QAGhB,MAAM,EAAE,WAAW,GAAG,IAAI,EAAE,UAAU,GAAG,CAAC,EAAE,GAAG,aAAa,CAAC;QAC7D,IAAI,CAAC,IAAI,GAAG,IAAI,YAAY,CAAC,WAAW,GAAG,UAAU,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IAC/B,CAAC;IAES,OAAO,CAAC,IAAuC,EAAE,KAAQ;QACjE,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACpC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;SAClC;IACH,CAAC;IAOM,OAAO;QACZ,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QAE9C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,SAAS,EAAE,CAAC,EAAE,EAAE;YAClC,MAAM,UAAU,GAAG,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;YACvC,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,UAAU,CAAC;YACzD,KAAK,IAAI,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
- dimensions?: 2 | 3;
4
- initialSize?: number;
5
- };
6
- export declare abstract class PointsArray<T> {
7
- data: Float32Array;
8
- dimensions: number;
9
- length: number;
10
- constructor(configuration?: PolyDataPointConfiguration);
11
- protected forEach(func: (value: T, index: number) => void, point: T): void;
12
- abstract getPoint(index: number, point: T): T;
13
- reverse(): void;
14
- protected map(f: (value: any, index: number) => T, factory: (index: number) => T): any[];
15
- static fromXYZ({ x, y, z }: Types.PointsXYZ): PointsArray3;
16
- }
17
- export declare class PointsArray2 extends PointsArray<Types.Point2> {
18
- constructor(configuration?: {});
19
- forEach(func: (value: Types.Point2, index: number) => void, point?: Types.Point2): void;
20
- getPoint(index: number, point?: Types.Point2): Types.Point2;
21
- get points(): any[];
22
- }
23
- export declare class PointsArray3 extends PointsArray<Types.Point3> {
24
- constructor(configuration?: {});
25
- forEach(func: (value: Types.Point3, index: number) => void, point?: Types.Point3): void;
26
- getPoint(index: number, point?: Types.Point3): Types.Point3;
27
- get points(): any[];
28
- getXYZ(): Types.PointsXYZ;
29
- }
30
- //# sourceMappingURL=PointsArray.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PointsArray.d.ts","sourceRoot":"","sources":["../../../../src/utilities/contours/PointsArray.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAGjD,oBAAY,0BAA0B,GAAG;IACvC,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAUF,8BAAsB,WAAW,CAAC,CAAC;IACjC,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,SAAK;IACR,MAAM,SAAK;gBAEN,aAAa,GAAE,0BAA+B;IAM1D,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,EAAE,KAAK,EAAE,CAAC;IAMnE,QAAQ,CAA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