@cornerstonejs/tools 1.48.2 → 1.49.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 (333) hide show
  1. package/dist/cjs/enums/AnnotationStyleStates.d.ts +2 -1
  2. package/dist/cjs/enums/AnnotationStyleStates.js +1 -0
  3. package/dist/cjs/enums/AnnotationStyleStates.js.map +1 -1
  4. package/dist/cjs/enums/ChangeTypes.d.ts +8 -0
  5. package/dist/cjs/enums/ChangeTypes.js +12 -0
  6. package/dist/cjs/enums/ChangeTypes.js.map +1 -0
  7. package/dist/cjs/enums/Events.d.ts +2 -0
  8. package/dist/cjs/enums/Events.js +2 -0
  9. package/dist/cjs/enums/Events.js.map +1 -1
  10. package/dist/cjs/enums/index.d.ts +2 -1
  11. package/dist/cjs/enums/index.js +3 -1
  12. package/dist/cjs/enums/index.js.map +1 -1
  13. package/dist/cjs/eventDispatchers/annotationInterpolationEventDispatcher.d.ts +5 -0
  14. package/dist/cjs/eventDispatchers/annotationInterpolationEventDispatcher.js +23 -0
  15. package/dist/cjs/eventDispatchers/annotationInterpolationEventDispatcher.js.map +1 -0
  16. package/dist/cjs/eventDispatchers/index.d.ts +2 -1
  17. package/dist/cjs/eventDispatchers/index.js +3 -1
  18. package/dist/cjs/eventDispatchers/index.js.map +1 -1
  19. package/dist/cjs/init.js +3 -0
  20. package/dist/cjs/init.js.map +1 -1
  21. package/dist/cjs/stateManagement/annotation/config/getState.js +3 -0
  22. package/dist/cjs/stateManagement/annotation/config/getState.js.map +1 -1
  23. package/dist/cjs/tools/annotation/LivewireContourTool.d.ts +1 -1
  24. package/dist/cjs/tools/annotation/LivewireContourTool.js +1 -1
  25. package/dist/cjs/tools/annotation/LivewireContourTool.js.map +1 -1
  26. package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.js +1 -0
  27. package/dist/cjs/tools/annotation/PlanarFreehandContourSegmentationTool.js.map +1 -1
  28. package/dist/cjs/tools/annotation/PlanarFreehandROITool.d.ts +2 -2
  29. package/dist/cjs/tools/annotation/PlanarFreehandROITool.js +9 -4
  30. package/dist/cjs/tools/annotation/PlanarFreehandROITool.js.map +1 -1
  31. package/dist/cjs/tools/annotation/SplineROITool.d.ts +4 -1
  32. package/dist/cjs/tools/annotation/SplineROITool.js +50 -20
  33. package/dist/cjs/tools/annotation/SplineROITool.js.map +1 -1
  34. package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +12 -3
  35. package/dist/cjs/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
  36. package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js +9 -5
  37. package/dist/cjs/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
  38. package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js +3 -3
  39. package/dist/cjs/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
  40. package/dist/cjs/tools/base/ContourBaseTool.js +4 -0
  41. package/dist/cjs/tools/base/ContourBaseTool.js.map +1 -1
  42. package/dist/cjs/tools/base/ContourSegmentationBaseTool.js +21 -9
  43. package/dist/cjs/tools/base/ContourSegmentationBaseTool.js.map +1 -1
  44. package/dist/cjs/tools/displayTools/Contour/contourConfig.js +8 -3
  45. package/dist/cjs/tools/displayTools/Contour/contourConfig.js.map +1 -1
  46. package/dist/cjs/tools/displayTools/Contour/contourDisplay.js +0 -1
  47. package/dist/cjs/tools/displayTools/Contour/contourDisplay.js.map +1 -1
  48. package/dist/cjs/types/AnnotationStyle.d.ts +2 -2
  49. package/dist/cjs/types/AnnotationTypes.d.ts +1 -0
  50. package/dist/cjs/types/ContourSegmentationAnnotation.d.ts +1 -0
  51. package/dist/cjs/types/ContourTypes.d.ts +3 -0
  52. package/dist/cjs/types/EventTypes.d.ts +19 -1
  53. package/dist/cjs/types/InterpolationTypes.d.ts +18 -0
  54. package/dist/cjs/types/InterpolationTypes.js +3 -0
  55. package/dist/cjs/types/InterpolationTypes.js.map +1 -0
  56. package/dist/cjs/types/ToolSpecificAnnotationTypes.d.ts +14 -0
  57. package/dist/cjs/types/index.d.ts +2 -1
  58. package/dist/cjs/utilities/contours/PointsArray.d.ts +29 -0
  59. package/dist/cjs/utilities/contours/PointsArray.js +104 -0
  60. package/dist/cjs/utilities/contours/PointsArray.js.map +1 -0
  61. package/dist/cjs/utilities/contours/index.d.ts +3 -1
  62. package/dist/cjs/utilities/contours/index.js +28 -1
  63. package/dist/cjs/utilities/contours/index.js.map +1 -1
  64. package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts +3 -0
  65. package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js +11 -0
  66. package/dist/cjs/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js.map +1 -0
  67. package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.d.ts +2 -0
  68. package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.js +39 -0
  69. package/dist/cjs/utilities/contours/interpolation/createPolylineToolData.js.map +1 -0
  70. package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts +7 -0
  71. package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.js +107 -0
  72. package/dist/cjs/utilities/contours/interpolation/findAnnotationForInterpolation.js.map +1 -0
  73. package/dist/cjs/utilities/contours/interpolation/getInterpolationData.d.ts +7 -0
  74. package/dist/cjs/utilities/contours/interpolation/getInterpolationData.js +30 -0
  75. package/dist/cjs/utilities/contours/interpolation/getInterpolationData.js.map +1 -0
  76. package/dist/cjs/utilities/contours/interpolation/getInterpolationDataCollection.d.ts +4 -0
  77. package/dist/cjs/utilities/contours/interpolation/getInterpolationDataCollection.js +21 -0
  78. package/dist/cjs/utilities/contours/interpolation/getInterpolationDataCollection.js.map +1 -0
  79. package/dist/cjs/utilities/contours/interpolation/index.d.ts +2 -0
  80. package/dist/cjs/utilities/contours/interpolation/index.js +9 -0
  81. package/dist/cjs/utilities/contours/interpolation/index.js.map +1 -0
  82. package/dist/cjs/utilities/contours/interpolation/interpolate.d.ts +3 -0
  83. package/dist/cjs/utilities/contours/interpolation/interpolate.js +343 -0
  84. package/dist/cjs/utilities/contours/interpolation/interpolate.js.map +1 -0
  85. package/dist/cjs/utilities/contours/reverseIfAntiClockwise.d.ts +2 -0
  86. package/dist/cjs/utilities/contours/reverseIfAntiClockwise.js +34 -0
  87. package/dist/cjs/utilities/contours/reverseIfAntiClockwise.js.map +1 -0
  88. package/dist/cjs/utilities/getViewportForAnnotation.d.ts +2 -0
  89. package/dist/cjs/utilities/getViewportForAnnotation.js +19 -0
  90. package/dist/cjs/utilities/getViewportForAnnotation.js.map +1 -0
  91. package/dist/cjs/utilities/index.d.ts +2 -1
  92. package/dist/cjs/utilities/index.js +3 -1
  93. package/dist/cjs/utilities/index.js.map +1 -1
  94. package/dist/cjs/utilities/planar/filterAnnotationsForDisplay.js +2 -1
  95. package/dist/cjs/utilities/planar/filterAnnotationsForDisplay.js.map +1 -1
  96. package/dist/cjs/utilities/planarFreehandROITool/index.d.ts +3 -3
  97. package/dist/cjs/utilities/planarFreehandROITool/index.js +4 -4
  98. package/dist/cjs/utilities/planarFreehandROITool/index.js.map +1 -1
  99. package/dist/cjs/utilities/planarFreehandROITool/smoothAnnotation.d.ts +3 -0
  100. package/dist/cjs/utilities/planarFreehandROITool/{interpolateAnnotation.js → smoothAnnotation.js} +5 -5
  101. package/dist/cjs/utilities/planarFreehandROITool/smoothAnnotation.js.map +1 -0
  102. package/dist/cjs/utilities/planarFreehandROITool/{interpolatePoints.d.ts → smoothPoints.d.ts} +1 -1
  103. package/dist/cjs/utilities/planarFreehandROITool/{interpolatePoints.js → smoothPoints.js} +11 -8
  104. package/dist/cjs/utilities/planarFreehandROITool/smoothPoints.js.map +1 -0
  105. package/dist/cjs/utilities/polyData/utils.d.ts +2 -1
  106. package/dist/cjs/utilities/polyData/utils.js +4 -2
  107. package/dist/cjs/utilities/polyData/utils.js.map +1 -1
  108. package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +11 -0
  109. package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.js +159 -0
  110. package/dist/cjs/utilities/segmentation/InterpolationManager/InterpolationManager.js.map +1 -0
  111. package/dist/cjs/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts +2 -0
  112. package/dist/cjs/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js +96 -0
  113. package/dist/cjs/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js.map +1 -0
  114. package/dist/cjs/utilities/triggerAnnotationRenderForViewportIds.js +7 -2
  115. package/dist/cjs/utilities/triggerAnnotationRenderForViewportIds.js.map +1 -1
  116. package/dist/esm/enums/AnnotationStyleStates.js +1 -0
  117. package/dist/esm/enums/AnnotationStyleStates.js.map +1 -1
  118. package/dist/esm/enums/ChangeTypes.js +10 -0
  119. package/dist/esm/enums/ChangeTypes.js.map +1 -0
  120. package/dist/esm/enums/Events.js +2 -0
  121. package/dist/esm/enums/Events.js.map +1 -1
  122. package/dist/esm/enums/index.js +2 -1
  123. package/dist/esm/enums/index.js.map +1 -1
  124. package/dist/esm/eventDispatchers/annotationInterpolationEventDispatcher.js +18 -0
  125. package/dist/esm/eventDispatchers/annotationInterpolationEventDispatcher.js.map +1 -0
  126. package/dist/esm/eventDispatchers/index.js +2 -1
  127. package/dist/esm/eventDispatchers/index.js.map +1 -1
  128. package/dist/esm/init.js +3 -0
  129. package/dist/esm/init.js.map +1 -1
  130. package/dist/esm/stateManagement/annotation/config/getState.js +3 -0
  131. package/dist/esm/stateManagement/annotation/config/getState.js.map +1 -1
  132. package/dist/esm/tools/annotation/LivewireContourTool.js +2 -2
  133. package/dist/esm/tools/annotation/LivewireContourTool.js.map +1 -1
  134. package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js +1 -0
  135. package/dist/esm/tools/annotation/PlanarFreehandContourSegmentationTool.js.map +1 -1
  136. package/dist/esm/tools/annotation/PlanarFreehandROITool.js +9 -4
  137. package/dist/esm/tools/annotation/PlanarFreehandROITool.js.map +1 -1
  138. package/dist/esm/tools/annotation/SplineROITool.js +49 -21
  139. package/dist/esm/tools/annotation/SplineROITool.js.map +1 -1
  140. package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js +11 -2
  141. package/dist/esm/tools/annotation/planarFreehandROITool/closedContourEditLoop.js.map +1 -1
  142. package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js +8 -4
  143. package/dist/esm/tools/annotation/planarFreehandROITool/drawLoop.js.map +1 -1
  144. package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js +2 -2
  145. package/dist/esm/tools/annotation/planarFreehandROITool/openContourEditLoop.js.map +1 -1
  146. package/dist/esm/tools/base/ContourBaseTool.js +4 -0
  147. package/dist/esm/tools/base/ContourBaseTool.js.map +1 -1
  148. package/dist/esm/tools/base/ContourSegmentationBaseTool.js +12 -1
  149. package/dist/esm/tools/base/ContourSegmentationBaseTool.js.map +1 -1
  150. package/dist/esm/tools/displayTools/Contour/contourConfig.js +8 -3
  151. package/dist/esm/tools/displayTools/Contour/contourConfig.js.map +1 -1
  152. package/dist/esm/tools/displayTools/Contour/contourDisplay.js +0 -1
  153. package/dist/esm/tools/displayTools/Contour/contourDisplay.js.map +1 -1
  154. package/dist/esm/types/InterpolationTypes.js +2 -0
  155. package/dist/esm/types/InterpolationTypes.js.map +1 -0
  156. package/dist/esm/utilities/contours/PointsArray.js +98 -0
  157. package/dist/esm/utilities/contours/PointsArray.js.map +1 -0
  158. package/dist/esm/utilities/contours/index.js +3 -1
  159. package/dist/esm/utilities/contours/index.js.map +1 -1
  160. package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js +5 -0
  161. package/dist/esm/utilities/contours/interpolation/acceptAutogeneratedInterpolations.js.map +1 -0
  162. package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js +36 -0
  163. package/dist/esm/utilities/contours/interpolation/createPolylineToolData.js.map +1 -0
  164. package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js +102 -0
  165. package/dist/esm/utilities/contours/interpolation/findAnnotationForInterpolation.js.map +1 -0
  166. package/dist/esm/utilities/contours/interpolation/getInterpolationData.js +27 -0
  167. package/dist/esm/utilities/contours/interpolation/getInterpolationData.js.map +1 -0
  168. package/dist/esm/utilities/contours/interpolation/getInterpolationDataCollection.js +15 -0
  169. package/dist/esm/utilities/contours/interpolation/getInterpolationDataCollection.js.map +1 -0
  170. package/dist/esm/utilities/contours/interpolation/index.js +3 -0
  171. package/dist/esm/utilities/contours/interpolation/index.js.map +1 -0
  172. package/dist/esm/utilities/contours/interpolation/interpolate.js +314 -0
  173. package/dist/esm/utilities/contours/interpolation/interpolate.js.map +1 -0
  174. package/dist/esm/utilities/contours/reverseIfAntiClockwise.js +31 -0
  175. package/dist/esm/utilities/contours/reverseIfAntiClockwise.js.map +1 -0
  176. package/dist/esm/utilities/getViewportForAnnotation.js +16 -0
  177. package/dist/esm/utilities/getViewportForAnnotation.js.map +1 -0
  178. package/dist/esm/utilities/index.js +2 -1
  179. package/dist/esm/utilities/index.js.map +1 -1
  180. package/dist/esm/utilities/planar/filterAnnotationsForDisplay.js +1 -1
  181. package/dist/esm/utilities/planar/filterAnnotationsForDisplay.js.map +1 -1
  182. package/dist/esm/utilities/planarFreehandROITool/index.js +3 -3
  183. package/dist/esm/utilities/planarFreehandROITool/index.js.map +1 -1
  184. package/dist/esm/utilities/planarFreehandROITool/{interpolateAnnotation.js → smoothAnnotation.js} +4 -4
  185. package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.js.map +1 -0
  186. package/dist/esm/utilities/planarFreehandROITool/{interpolatePoints.js → smoothPoints.js} +9 -6
  187. package/dist/esm/utilities/planarFreehandROITool/smoothPoints.js.map +1 -0
  188. package/dist/esm/utilities/polyData/utils.js +4 -2
  189. package/dist/esm/utilities/polyData/utils.js.map +1 -1
  190. package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js +150 -0
  191. package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.js.map +1 -0
  192. package/dist/esm/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js +67 -0
  193. package/dist/esm/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.js.map +1 -0
  194. package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.js +7 -2
  195. package/dist/esm/utilities/triggerAnnotationRenderForViewportIds.js.map +1 -1
  196. package/dist/types/enums/AnnotationStyleStates.d.ts +2 -1
  197. package/dist/types/enums/AnnotationStyleStates.d.ts.map +1 -1
  198. package/dist/types/enums/ChangeTypes.d.ts +9 -0
  199. package/dist/types/enums/ChangeTypes.d.ts.map +1 -0
  200. package/dist/types/enums/Events.d.ts +2 -0
  201. package/dist/types/enums/Events.d.ts.map +1 -1
  202. package/dist/types/enums/index.d.ts +2 -1
  203. package/dist/types/eventDispatchers/annotationInterpolationEventDispatcher.d.ts +6 -0
  204. package/dist/types/eventDispatchers/annotationInterpolationEventDispatcher.d.ts.map +1 -0
  205. package/dist/types/eventDispatchers/index.d.ts +2 -1
  206. package/dist/types/init.d.ts.map +1 -1
  207. package/dist/types/stateManagement/annotation/config/getState.d.ts.map +1 -1
  208. package/dist/types/tools/annotation/LivewireContourTool.d.ts +1 -1
  209. package/dist/types/tools/annotation/LivewireContourTool.d.ts.map +1 -1
  210. package/dist/types/tools/annotation/PlanarFreehandContourSegmentationTool.d.ts.map +1 -1
  211. package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts +2 -2
  212. package/dist/types/tools/annotation/PlanarFreehandROITool.d.ts.map +1 -1
  213. package/dist/types/tools/annotation/SplineROITool.d.ts +4 -1
  214. package/dist/types/tools/annotation/SplineROITool.d.ts.map +1 -1
  215. package/dist/types/tools/annotation/planarFreehandROITool/closedContourEditLoop.d.ts.map +1 -1
  216. package/dist/types/tools/annotation/planarFreehandROITool/drawLoop.d.ts.map +1 -1
  217. package/dist/types/tools/base/ContourBaseTool.d.ts.map +1 -1
  218. package/dist/types/tools/base/ContourSegmentationBaseTool.d.ts.map +1 -1
  219. package/dist/types/tools/displayTools/Contour/contourConfig.d.ts.map +1 -1
  220. package/dist/types/tools/displayTools/Contour/contourDisplay.d.ts.map +1 -1
  221. package/dist/types/types/AnnotationStyle.d.ts +2 -2
  222. package/dist/types/types/AnnotationStyle.d.ts.map +1 -1
  223. package/dist/types/types/AnnotationTypes.d.ts +1 -0
  224. package/dist/types/types/AnnotationTypes.d.ts.map +1 -1
  225. package/dist/types/types/ContourSegmentationAnnotation.d.ts +1 -0
  226. package/dist/types/types/ContourSegmentationAnnotation.d.ts.map +1 -1
  227. package/dist/types/types/ContourTypes.d.ts +3 -0
  228. package/dist/types/types/ContourTypes.d.ts.map +1 -1
  229. package/dist/types/types/EventTypes.d.ts +19 -1
  230. package/dist/types/types/EventTypes.d.ts.map +1 -1
  231. package/dist/types/types/InterpolationTypes.d.ts +19 -0
  232. package/dist/types/types/InterpolationTypes.d.ts.map +1 -0
  233. package/dist/types/types/ToolSpecificAnnotationTypes.d.ts +14 -0
  234. package/dist/types/types/ToolSpecificAnnotationTypes.d.ts.map +1 -1
  235. package/dist/types/types/index.d.ts +2 -1
  236. package/dist/types/types/index.d.ts.map +1 -1
  237. package/dist/types/utilities/contours/PointsArray.d.ts +30 -0
  238. package/dist/types/utilities/contours/PointsArray.d.ts.map +1 -0
  239. package/dist/types/utilities/contours/index.d.ts +3 -1
  240. package/dist/types/utilities/contours/index.d.ts.map +1 -1
  241. package/dist/types/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts +4 -0
  242. package/dist/types/utilities/contours/interpolation/acceptAutogeneratedInterpolations.d.ts.map +1 -0
  243. package/dist/types/utilities/contours/interpolation/createPolylineToolData.d.ts +3 -0
  244. package/dist/types/utilities/contours/interpolation/createPolylineToolData.d.ts.map +1 -0
  245. package/dist/types/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts +8 -0
  246. package/dist/types/utilities/contours/interpolation/findAnnotationForInterpolation.d.ts.map +1 -0
  247. package/dist/types/utilities/contours/interpolation/getInterpolationData.d.ts +8 -0
  248. package/dist/types/utilities/contours/interpolation/getInterpolationData.d.ts.map +1 -0
  249. package/dist/types/utilities/contours/interpolation/getInterpolationDataCollection.d.ts +5 -0
  250. package/dist/types/utilities/contours/interpolation/getInterpolationDataCollection.d.ts.map +1 -0
  251. package/dist/types/utilities/contours/interpolation/index.d.ts +3 -0
  252. package/dist/types/utilities/contours/interpolation/index.d.ts.map +1 -0
  253. package/dist/types/utilities/contours/interpolation/interpolate.d.ts +4 -0
  254. package/dist/types/utilities/contours/interpolation/interpolate.d.ts.map +1 -0
  255. package/dist/types/utilities/contours/reverseIfAntiClockwise.d.ts +3 -0
  256. package/dist/types/utilities/contours/reverseIfAntiClockwise.d.ts.map +1 -0
  257. package/dist/types/utilities/getViewportForAnnotation.d.ts +3 -0
  258. package/dist/types/utilities/getViewportForAnnotation.d.ts.map +1 -0
  259. package/dist/types/utilities/index.d.ts +2 -1
  260. package/dist/types/utilities/index.d.ts.map +1 -1
  261. package/dist/types/utilities/planar/filterAnnotationsForDisplay.d.ts.map +1 -1
  262. package/dist/types/utilities/planarFreehandROITool/index.d.ts +3 -3
  263. package/dist/types/utilities/planarFreehandROITool/index.d.ts.map +1 -1
  264. package/dist/types/utilities/planarFreehandROITool/smoothAnnotation.d.ts +4 -0
  265. package/dist/types/utilities/planarFreehandROITool/smoothAnnotation.d.ts.map +1 -0
  266. package/dist/types/utilities/planarFreehandROITool/{interpolatePoints.d.ts → smoothPoints.d.ts} +2 -2
  267. package/dist/types/utilities/planarFreehandROITool/smoothPoints.d.ts.map +1 -0
  268. package/dist/types/utilities/polyData/utils.d.ts +2 -1
  269. package/dist/types/utilities/polyData/utils.d.ts.map +1 -1
  270. package/dist/types/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +12 -0
  271. package/dist/types/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts.map +1 -0
  272. package/dist/types/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts +3 -0
  273. package/dist/types/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.d.ts.map +1 -0
  274. package/dist/types/utilities/triggerAnnotationRenderForViewportIds.d.ts.map +1 -1
  275. package/dist/umd/index.js +1 -1
  276. package/dist/umd/index.js.map +1 -1
  277. package/package.json +3 -3
  278. package/src/enums/AnnotationStyleStates.ts +3 -0
  279. package/src/enums/ChangeTypes.ts +32 -0
  280. package/src/enums/Events.ts +16 -0
  281. package/src/enums/index.js +2 -0
  282. package/src/eventDispatchers/annotationInterpolationEventDispatcher.ts +42 -0
  283. package/src/eventDispatchers/index.js +2 -0
  284. package/src/init.ts +3 -0
  285. package/src/stateManagement/annotation/config/getState.ts +16 -2
  286. package/src/tools/annotation/LivewireContourTool.ts +3 -8
  287. package/src/tools/annotation/PlanarFreehandContourSegmentationTool.ts +6 -0
  288. package/src/tools/annotation/PlanarFreehandROITool.ts +47 -25
  289. package/src/tools/annotation/SplineROITool.ts +80 -28
  290. package/src/tools/annotation/planarFreehandROITool/closedContourEditLoop.ts +15 -3
  291. package/src/tools/annotation/planarFreehandROITool/drawLoop.ts +10 -6
  292. package/src/tools/annotation/planarFreehandROITool/openContourEditLoop.ts +3 -3
  293. package/src/tools/base/ContourBaseTool.ts +4 -0
  294. package/src/tools/base/ContourSegmentationBaseTool.ts +11 -1
  295. package/src/tools/displayTools/Contour/contourConfig.ts +8 -3
  296. package/src/tools/displayTools/Contour/contourDisplay.ts +1 -3
  297. package/src/types/AnnotationStyle.ts +3 -1
  298. package/src/types/AnnotationTypes.ts +2 -0
  299. package/src/types/ContourSegmentationAnnotation.ts +1 -0
  300. package/src/types/ContourTypes.ts +8 -0
  301. package/src/types/EventTypes.ts +43 -0
  302. package/src/types/InterpolationTypes.ts +42 -0
  303. package/src/types/ToolSpecificAnnotationTypes.ts +15 -0
  304. package/src/types/index.ts +6 -0
  305. package/src/utilities/contours/PointsArray.ts +165 -0
  306. package/src/utilities/contours/index.ts +4 -1
  307. package/src/utilities/contours/interpolation/acceptAutogeneratedInterpolations.ts +16 -0
  308. package/src/utilities/contours/interpolation/createPolylineToolData.ts +56 -0
  309. package/src/utilities/contours/interpolation/findAnnotationForInterpolation.ts +225 -0
  310. package/src/utilities/contours/interpolation/getInterpolationData.ts +75 -0
  311. package/src/utilities/contours/interpolation/getInterpolationDataCollection.ts +31 -0
  312. package/src/utilities/contours/interpolation/index.ts +3 -0
  313. package/src/utilities/contours/interpolation/interpolate.ts +695 -0
  314. package/src/utilities/contours/reverseIfAntiClockwise.ts +50 -0
  315. package/src/utilities/getViewportForAnnotation.ts +29 -0
  316. package/src/utilities/index.ts +2 -0
  317. package/src/utilities/livewire/LivewireScissors.ts +1 -1
  318. package/src/utilities/planar/filterAnnotationsForDisplay.ts +6 -1
  319. package/src/utilities/planarFreehandROITool/index.ts +3 -3
  320. package/src/utilities/planarFreehandROITool/{interpolateAnnotation.ts → smoothAnnotation.ts} +5 -3
  321. package/src/utilities/planarFreehandROITool/{interpolatePoints.ts → smoothPoints.ts} +12 -6
  322. package/src/utilities/polyData/utils.ts +12 -5
  323. package/src/utilities/segmentation/InterpolationManager/InterpolationManager.ts +207 -0
  324. package/src/utilities/segmentation/InterpolationManager/deleteRelatedAnnotations.ts +97 -0
  325. package/src/utilities/triggerAnnotationRenderForViewportIds.ts +7 -2
  326. package/dist/cjs/utilities/planarFreehandROITool/interpolateAnnotation.d.ts +0 -3
  327. package/dist/cjs/utilities/planarFreehandROITool/interpolateAnnotation.js.map +0 -1
  328. package/dist/cjs/utilities/planarFreehandROITool/interpolatePoints.js.map +0 -1
  329. package/dist/esm/utilities/planarFreehandROITool/interpolateAnnotation.js.map +0 -1
  330. package/dist/esm/utilities/planarFreehandROITool/interpolatePoints.js.map +0 -1
  331. package/dist/types/utilities/planarFreehandROITool/interpolateAnnotation.d.ts +0 -4
  332. package/dist/types/utilities/planarFreehandROITool/interpolateAnnotation.d.ts.map +0 -1
  333. package/dist/types/utilities/planarFreehandROITool/interpolatePoints.d.ts.map +0 -1
@@ -0,0 +1,50 @@
1
+ import { Types } from '@cornerstonejs/core';
2
+
3
+ /**
4
+ * getSumReducer - A reducer function that calculates the sum of an array.
5
+ *
6
+ * @param total - The running total.
7
+ * @param num - The numerical value of the array element.
8
+ * @returns The updated running total.
9
+ */
10
+ function getSumReducer(total: number, num: number): number {
11
+ return total + num;
12
+ }
13
+
14
+ /**
15
+ * _reverseIfAntiClockwise - If the contour's nodes run anti-clockwise,
16
+ * reverse them.
17
+ *
18
+ * @param points - The points array.
19
+ * @returns The contour, corrected to be clockwise if appropriate.
20
+ */
21
+ export default function reverseIfAntiClockwise(points: Types.Point2[]) {
22
+ const length = points.length;
23
+ if (!length) {
24
+ return points;
25
+ }
26
+ let xSum = 0;
27
+ for (const point of points) {
28
+ xSum += point[0];
29
+ }
30
+ const xMean = xSum / length;
31
+
32
+ let checkSum = 0;
33
+
34
+ for (let k = 0, i = 1, j = 2; k < length; k++) {
35
+ checkSum += (points[i][0] - xMean) * (points[j][1] - points[k][1]);
36
+ i++;
37
+ j++;
38
+ if (i >= length) {
39
+ i = 0;
40
+ }
41
+ if (j >= length) {
42
+ j = 0;
43
+ }
44
+ }
45
+
46
+ if (checkSum > 0) {
47
+ return points.slice().reverse();
48
+ }
49
+ return points;
50
+ }
@@ -0,0 +1,29 @@
1
+ import { getEnabledElements, utilities as csUtils } from '@cornerstonejs/core';
2
+ import type { Annotation } from '../types';
3
+
4
+ const { isEqual } = csUtils;
5
+
6
+ /**
7
+ * Finds a matching viewport in terms of the orientation of the annotation data
8
+ * and the frame of reference. This doesn't mean the annotation IS being displayed
9
+ * in the viewport, just that it could be by navigating the slice, and/or pan/zoom,
10
+ * without changing the orientation.
11
+ *
12
+ * @param annotation - to find a viewport that it could display in
13
+ * @returns The viewport to display in
14
+ */
15
+ export default function getViewportForAnnotation(annotation: Annotation) {
16
+ const { metadata } = annotation;
17
+ const enabledElement = getEnabledElements().find((enabledElement) => {
18
+ if (enabledElement.FrameOfReferenceUID === metadata.FrameOfReferenceUID) {
19
+ const viewport = enabledElement.viewport;
20
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
21
+ return (
22
+ isEqual(viewPlaneNormal, metadata.viewPlaneNormal) &&
23
+ (!metadata.viewUp || isEqual(viewUp, metadata.viewUp))
24
+ );
25
+ }
26
+ return;
27
+ });
28
+ return enabledElement?.viewport;
29
+ }
@@ -26,6 +26,7 @@ import scroll from './scroll';
26
26
  import { pointToString } from './pointToString';
27
27
  import annotationFrameRange from './annotationFrameRange';
28
28
  import pointInSurroundingSphereCallback from './pointInSurroundingSphereCallback';
29
+ import getViewportForAnnotation from './getViewportForAnnotation';
29
30
 
30
31
  // name spaces
31
32
  import * as contours from './contours';
@@ -74,6 +75,7 @@ export {
74
75
  pointInShapeCallback,
75
76
  getSphereBoundsInfo,
76
77
  getAnnotationNearPoint,
78
+ getViewportForAnnotation,
77
79
  getAnnotationNearPointOnEnabledElement,
78
80
  jumpToSlice,
79
81
  pointInSurroundingSphereCallback,
@@ -14,7 +14,7 @@ const TWO_THIRD_PI = 2 / (3 * Math.PI);
14
14
  *
15
15
  * {@link http://www.sciencedirect.com/science/article/B6WG4-45JB8WN-9/2/6fe59d8089fd1892c2bfb82283065579}
16
16
  *
17
- * Implementation based on
17
+ * Implementation based on MIT licensed code at:
18
18
  * {@link http://code.google.com/p/livewire-javascript/}
19
19
  */
20
20
  export class LivewireScissors {
@@ -42,7 +42,12 @@ export default function filterAnnotationsForDisplay(
42
42
  return false;
43
43
  }
44
44
 
45
- const imageId = annotation.metadata.referencedImageId;
45
+ // The referenced image id can be a targetId, so handle removing the
46
+ // imageId portion to make the base comparison work.
47
+ const imageId = annotation.metadata.referencedImageId?.replace(
48
+ 'imageId:',
49
+ ''
50
+ );
46
51
 
47
52
  if (imageId === undefined) {
48
53
  // This annotation was not drawn on a non-coplanar reformat, and such does
@@ -1,7 +1,7 @@
1
- import interpolateAnnotation from './interpolateAnnotation';
1
+ import smoothAnnotation from './smoothAnnotation';
2
2
 
3
3
  export default {
4
- interpolateAnnotation,
4
+ smoothAnnotation,
5
5
  };
6
6
 
7
- export { interpolateAnnotation };
7
+ export { smoothAnnotation };
@@ -50,7 +50,7 @@ function shouldPreventInterpolation(
50
50
  * The param knotsRatioPercentage defines the percentage of points to be considered as knots on the interpolation process.
51
51
  * Interpolation will be skipped in case: annotation is not present in enabledElement (or there is no toolGroup associated with it), related tool is being modified.
52
52
  */
53
- export default function interpolateAnnotation(
53
+ export default function smoothAnnotation(
54
54
  enabledElement: Types.IEnabledElement,
55
55
  annotation: PlanarFreehandROIAnnotation,
56
56
  knotsRatioPercentage: number
@@ -65,7 +65,9 @@ export default function interpolateAnnotation(
65
65
  const { viewport } = enabledElement;
66
66
  // use only 2 dimensions on interpolation (what visually matters),
67
67
  // otherwise a 3d interpolation might have a totally different output as it consider one more dimension.
68
- const canvasPoints = annotation.data.polyline.map(viewport.worldToCanvas);
68
+ const canvasPoints = annotation.data.contour.polyline.map(
69
+ viewport.worldToCanvas
70
+ );
69
71
  const interpolatedCanvasPoints = <Types.Point2[]>(
70
72
  interpolateSegmentPoints(
71
73
  canvasPoints,
@@ -79,7 +81,7 @@ export default function interpolateAnnotation(
79
81
  return false;
80
82
  }
81
83
 
82
- annotation.data.polyline = interpolatedCanvasPoints.map(
84
+ annotation.data.contour.polyline = interpolatedCanvasPoints.map(
83
85
  viewport.canvasToWorld
84
86
  );
85
87
 
@@ -2,10 +2,16 @@ import { Types } from '@cornerstonejs/core';
2
2
  import { point } from '../math';
3
3
  import interpolateSegmentPoints from './interpolation/interpolateSegmentPoints';
4
4
 
5
- export function shouldInterpolate(configuration: Record<any, any>): boolean {
5
+ export function shouldSmooth(
6
+ configuration: Record<any, any>,
7
+ annotation?
8
+ ): boolean {
9
+ if (annotation?.autoGenerated) {
10
+ return false;
11
+ }
6
12
  return (
7
- configuration?.interpolation?.interpolateOnAdd === true ||
8
- configuration?.interpolation?.interpolateOnEdit === true
13
+ configuration?.smoothing?.smoothOnAdd === true ||
14
+ configuration?.smoothing?.smoothOnEdit === true
9
15
  );
10
16
  }
11
17
 
@@ -179,14 +185,14 @@ export function getInterpolatedPoints(
179
185
  const {
180
186
  knotsRatioPercentageOnAdd,
181
187
  knotsRatioPercentageOnEdit,
182
- interpolateOnAdd = false,
183
- interpolateOnEdit = false,
188
+ smoothOnAdd = false,
189
+ smoothOnEdit = false,
184
190
  } = interpolation;
185
191
 
186
192
  const knotsRatioPercentage = pointsOfReference
187
193
  ? knotsRatioPercentageOnEdit
188
194
  : knotsRatioPercentageOnAdd;
189
- const isEnabled = pointsOfReference ? interpolateOnEdit : interpolateOnAdd;
195
+ const isEnabled = pointsOfReference ? smoothOnEdit : smoothOnAdd;
190
196
 
191
197
  if (isEnabled) {
192
198
  // partial or total interpolation
@@ -1,14 +1,21 @@
1
1
  import vtkPolyData from '@kitware/vtk.js/Common/DataModel/PolyData';
2
+ import type { Types } from '@cornerstonejs/core';
3
+ import { vec3 } from 'gl-matrix';
2
4
 
3
5
  /**
4
6
  * Gets a point from an array of numbers given its index
5
- * @param points array of number, each point defined by three consecutive numbers
6
- * @param idx index of the point to retrieve
7
+ * @param points - array of number, each point defined by three consecutive numbers
8
+ * @param idx - index of the point to retrieve
7
9
  * @returns
8
10
  */
9
- export function getPoint(points, idx) {
10
- if (idx < points.length / 3) {
11
- return [points[idx * 3], points[idx * 3 + 1], points[idx * 3 + 2]];
11
+ export function getPoint(points, idx): Types.Point3 {
12
+ const idx3 = idx * 3;
13
+ if (idx3 < points.length) {
14
+ return vec3.fromValues(
15
+ points[idx3],
16
+ points[idx3 + 1],
17
+ points[idx3 + 2]
18
+ ) as Types.Point3;
12
19
  }
13
20
  }
14
21
 
@@ -0,0 +1,207 @@
1
+ import { utilities as csUtils } from '@cornerstonejs/core';
2
+ import type { Types } from '@cornerstonejs/core';
3
+ import {
4
+ AnnotationCompletedEventType,
5
+ AnnotationModifiedEventType,
6
+ AnnotationRemovedEventType,
7
+ } from '../../../types/EventTypes';
8
+ import { state as annotationState } from '../../../stateManagement/annotation';
9
+ import type AnnotationGroupSelector from '../../../types/AnnotationGroupSelector';
10
+ import getInterpolationDataCollection from '../../contours/interpolation/getInterpolationDataCollection';
11
+ import type {
12
+ InterpolationViewportData,
13
+ AcceptInterpolationSelector,
14
+ } from '../../../types/InterpolationTypes';
15
+ import interpolate from '../../contours/interpolation/interpolate';
16
+ import deleteRelatedAnnotations from './deleteRelatedAnnotations';
17
+ import { InterpolationROIAnnotation } from '../../../types/ToolSpecificAnnotationTypes';
18
+ import ChangeTypes from '../../../enums/ChangeTypes';
19
+ import getViewportForAnnotation from '../../getViewportForAnnotation';
20
+
21
+ const { uuidv4 } = csUtils;
22
+
23
+ export default class InterpolationManager {
24
+ static toolNames = [];
25
+
26
+ static addTool(toolName: string) {
27
+ if (!this.toolNames.includes(toolName)) {
28
+ this.toolNames.push(toolName);
29
+ }
30
+ }
31
+
32
+ /**
33
+ * Accepts the autogenerated interpolations, marking them as non-autogenerated.
34
+ * Can provide a selector to choose which ones to accept
35
+ */
36
+ static acceptAutoGenerated(
37
+ annotationGroupSelector: AnnotationGroupSelector,
38
+ selector: AcceptInterpolationSelector = {}
39
+ ) {
40
+ const { toolNames, segmentationId, segmentIndex } = selector;
41
+ for (const toolName of toolNames || InterpolationManager.toolNames) {
42
+ const annotations = annotationState.getAnnotations(
43
+ toolName,
44
+ annotationGroupSelector
45
+ );
46
+ if (!annotations?.length) {
47
+ continue;
48
+ }
49
+ for (const annotation of annotations) {
50
+ const { data, autoGenerated } = annotation;
51
+ if (!autoGenerated) {
52
+ continue;
53
+ }
54
+ if (segmentIndex && segmentIndex !== data.segmentation.segmentIndex) {
55
+ continue;
56
+ }
57
+ if (
58
+ segmentationId &&
59
+ segmentationId !== data.segmentation.segmentationId
60
+ ) {
61
+ continue;
62
+ }
63
+ annotation.autoGenerated = false;
64
+ }
65
+ }
66
+ }
67
+
68
+ static handleAnnotationCompleted = (evt: AnnotationCompletedEventType) => {
69
+ const annotation = evt.detail.annotation as InterpolationROIAnnotation;
70
+ if (!annotation?.metadata) {
71
+ return;
72
+ }
73
+ const { toolName } = annotation.metadata;
74
+
75
+ if (!this.toolNames.includes(toolName)) {
76
+ return;
77
+ }
78
+
79
+ const viewport = getViewportForAnnotation(annotation);
80
+ if (!viewport) {
81
+ console.warn('Unable to find viewport for', annotation);
82
+ return;
83
+ }
84
+ const sliceData: Types.ImageSliceData = getSliceData(viewport);
85
+ const viewportData: InterpolationViewportData = {
86
+ viewport,
87
+ sliceData,
88
+ annotation,
89
+ interpolationUID: annotation.interpolationUID,
90
+ };
91
+ const hasInterpolationUID = !!annotation.interpolationUID;
92
+ // If any update, triggered on an annotation, then it will be treated as non-autogenerated.
93
+ annotation.autoGenerated = false;
94
+ if (hasInterpolationUID) {
95
+ // This has already been configured with matching details, so just run
96
+ // the interpolation again.
97
+ deleteRelatedAnnotations(viewportData);
98
+ interpolate(viewportData);
99
+ return;
100
+ }
101
+ const filterData = [
102
+ {
103
+ key: 'segmentIndex',
104
+ value: annotation.data.segmentation.segmentIndex,
105
+ parentKey: (annotation) => annotation.data.segmentation,
106
+ },
107
+ {
108
+ key: 'viewPlaneNormal',
109
+ value: annotation.metadata.viewPlaneNormal,
110
+ parentKey: (annotation) => annotation.metadata,
111
+ },
112
+ {
113
+ key: 'viewUp',
114
+ value: annotation.metadata.viewUp,
115
+ parentKey: (annotation) => annotation.metadata,
116
+ },
117
+ ];
118
+ let interpolationAnnotations = getInterpolationDataCollection(
119
+ viewportData,
120
+ filterData
121
+ );
122
+ // Skip other type of annotations with same location
123
+ interpolationAnnotations = interpolationAnnotations.filter(
124
+ (interpolationAnnotation) => interpolationAnnotation.interpolationUID
125
+ );
126
+ if (!annotation.interpolationUID) {
127
+ annotation.interpolationUID =
128
+ interpolationAnnotations[0]?.interpolationUID || uuidv4();
129
+ viewportData.interpolationUID = annotation.interpolationUID;
130
+ }
131
+ interpolate(viewportData);
132
+ };
133
+
134
+ static handleAnnotationUpdate = (evt: AnnotationModifiedEventType) => {
135
+ const annotation = evt.detail.annotation as InterpolationROIAnnotation;
136
+ const { changeType = ChangeTypes.HandlesUpdated } = evt.detail;
137
+ if (!annotation?.metadata) {
138
+ return;
139
+ }
140
+ const { toolName } = annotation.metadata;
141
+
142
+ if (
143
+ !this.toolNames.includes(toolName) ||
144
+ changeType !== ChangeTypes.HandlesUpdated
145
+ ) {
146
+ return;
147
+ }
148
+
149
+ const viewport = getViewportForAnnotation(annotation);
150
+ if (!viewport) {
151
+ console.warn(
152
+ 'Unable to find matching viewport for annotation interpolation',
153
+ annotation
154
+ );
155
+ return;
156
+ }
157
+
158
+ const sliceData: Types.ImageSliceData = getSliceData(viewport);
159
+ const viewportData: InterpolationViewportData = {
160
+ viewport,
161
+ sliceData,
162
+ annotation,
163
+ interpolationUID: annotation.interpolationUID,
164
+ };
165
+ interpolate(viewportData);
166
+ };
167
+
168
+ static handleAnnotationDelete = (evt: AnnotationRemovedEventType) => {
169
+ const annotation = evt.detail.annotation as InterpolationROIAnnotation;
170
+ if (!annotation?.metadata) {
171
+ return;
172
+ }
173
+ const { toolName } = annotation.metadata;
174
+
175
+ if (!this.toolNames.includes(toolName) || annotation.autoGenerated) {
176
+ return;
177
+ }
178
+ const viewport = getViewportForAnnotation(annotation);
179
+
180
+ if (!viewport) {
181
+ console.warn(
182
+ "No viewport, can't delete interpolated results",
183
+ annotation
184
+ );
185
+ return;
186
+ }
187
+
188
+ const sliceData: Types.ImageSliceData = getSliceData(viewport);
189
+ const viewportData: InterpolationViewportData = {
190
+ viewport,
191
+ sliceData,
192
+ annotation,
193
+ interpolationUID: annotation.interpolationUID,
194
+ };
195
+ // If any update, triggered on an annotation, then it will be treated as non-interpolated.
196
+ annotation.autoGenerated = false;
197
+ deleteRelatedAnnotations(viewportData);
198
+ };
199
+ }
200
+
201
+ function getSliceData(viewport): Types.ImageSliceData {
202
+ const sliceData: Types.ImageSliceData = {
203
+ numberOfSlices: viewport.getNumberOfSlices(),
204
+ imageIndex: viewport.getCurrentImageIdIndex(),
205
+ };
206
+ return sliceData;
207
+ }
@@ -0,0 +1,97 @@
1
+ import { triggerEvent } from '@cornerstonejs/core';
2
+ import * as annotationStateManagement from '../../../stateManagement/annotation';
3
+ import interpolate from '../../contours/interpolation/interpolate';
4
+ import type { InterpolationViewportData } from '../../../types/InterpolationTypes';
5
+ import getInterpolationData from '../../contours/interpolation/getInterpolationData';
6
+ import type { InterpolationROIAnnotation } from '../../../types/ToolSpecificAnnotationTypes';
7
+ import EventTypes from '../../../enums/Events';
8
+ import type { AnnotationInterpolationRemovedEventDetail } from '../../../types/EventTypes';
9
+
10
+ /**
11
+ * deleteRelatedAnnotations - Delete the same interpolation uid on deleting one of them.
12
+ *
13
+ * @param eventData - Object.
14
+ * @returns null
15
+ */
16
+ export default function deleteRelatedAnnotations(
17
+ viewportData: InterpolationViewportData
18
+ ) {
19
+ const { annotation } = viewportData;
20
+ const interpolationAnnotations = getInterpolationData(viewportData, [
21
+ { key: 'interpolationUID', value: viewportData.interpolationUID },
22
+ ]);
23
+
24
+ const referencedSliceIndex = annotation.metadata.referencedSliceIndex;
25
+ let minInterpolation = -1;
26
+ let maxInterpolation = viewportData.sliceData.numberOfSlices;
27
+ for (const [sliceIndex, annotations] of interpolationAnnotations.entries()) {
28
+ if (sliceIndex === referencedSliceIndex) {
29
+ continue;
30
+ }
31
+ const nonInterpolated = annotations.find(
32
+ (annotation) => !annotation.autoGenerated
33
+ );
34
+ if (!nonInterpolated) {
35
+ continue;
36
+ }
37
+ if (sliceIndex < referencedSliceIndex) {
38
+ minInterpolation = Math.max(sliceIndex, minInterpolation);
39
+ } else {
40
+ maxInterpolation = Math.min(sliceIndex, maxInterpolation);
41
+ }
42
+ }
43
+
44
+ const removedAnnotations = [];
45
+ for (const [sliceIndex, annotations] of interpolationAnnotations.entries()) {
46
+ if (
47
+ sliceIndex <= minInterpolation ||
48
+ sliceIndex >= maxInterpolation ||
49
+ sliceIndex === referencedSliceIndex
50
+ ) {
51
+ continue;
52
+ }
53
+ annotations.forEach((annotationToDelete) => {
54
+ if (annotationToDelete.autoGenerated) {
55
+ annotationStateManagement.state.removeAnnotation(
56
+ annotationToDelete.annotationUID
57
+ );
58
+ removedAnnotations.push(annotationToDelete);
59
+ }
60
+ });
61
+ }
62
+
63
+ if (removedAnnotations.length) {
64
+ const eventDetails: AnnotationInterpolationRemovedEventDetail = {
65
+ annotations: removedAnnotations,
66
+ element: viewportData.viewport.element,
67
+ viewportId: viewportData.viewport.id,
68
+ renderingEngineId: viewportData.viewport.getRenderingEngine().id,
69
+ };
70
+
71
+ triggerEvent(
72
+ viewportData.viewport.element,
73
+ EventTypes.INTERPOLATED_ANNOTATIONS_REMOVED,
74
+ eventDetails
75
+ );
76
+ }
77
+
78
+ if (
79
+ minInterpolation >= 0 &&
80
+ maxInterpolation < viewportData.sliceData.numberOfSlices
81
+ ) {
82
+ const nextAnnotation = interpolationAnnotations.get(
83
+ maxInterpolation
84
+ )[0] as InterpolationROIAnnotation;
85
+ // Trigger interpolation for the next non-interpolated annotation
86
+ const viewportNewData: InterpolationViewportData = {
87
+ viewport: viewportData.viewport,
88
+ sliceData: {
89
+ numberOfSlices: viewportData.sliceData.numberOfSlices,
90
+ imageIndex: nextAnnotation.metadata.referencedSliceIndex,
91
+ },
92
+ annotation: nextAnnotation,
93
+ interpolationUID: nextAnnotation.interpolationUID,
94
+ };
95
+ interpolate(viewportNewData);
96
+ }
97
+ }
@@ -5,12 +5,17 @@ export function triggerAnnotationRenderForViewportIds(
5
5
  renderingEngine: Types.IRenderingEngine,
6
6
  viewportIdsToRender: string[]
7
7
  ): void {
8
- if (!viewportIdsToRender.length) {
8
+ if (!viewportIdsToRender.length || !renderingEngine) {
9
9
  return;
10
10
  }
11
11
 
12
12
  viewportIdsToRender.forEach((viewportId) => {
13
- const { element } = renderingEngine.getViewport(viewportId);
13
+ const viewport = renderingEngine.getViewport(viewportId);
14
+ if (!viewport) {
15
+ console.warn(`Viewport not available for ${viewportId}`);
16
+ return;
17
+ }
18
+ const { element } = viewport;
14
19
  triggerAnnotationRender(element);
15
20
  });
16
21
  }
@@ -1,3 +0,0 @@
1
- import { Types } from '@cornerstonejs/core';
2
- import { PlanarFreehandROIAnnotation } from '../../types/ToolSpecificAnnotationTypes';
3
- export default function interpolateAnnotation(enabledElement: Types.IEnabledElement, annotation: PlanarFreehandROIAnnotation, knotsRatioPercentage: number): boolean;
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolateAnnotation.js","sourceRoot":"","sources":["../../../../src/utilities/planarFreehandROITool/interpolateAnnotation.ts"],"names":[],"mappings":";;;;;AACA,uCAAoD;AACpD,uCAA+C;AAE/C,wGAAgF;AAEhF,SAAS,0BAA0B,CACjC,cAAqC,EACrC,UAAuC,EACvC,oBAA4B;;IAE5B,IAAI,CAAC,CAAA,MAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,0CAAE,QAAQ,CAAA,IAAI,oBAAoB,IAAI,CAAC,EAAE;QAC5D,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,cAAc,CAAC;IAC9E,MAAM,SAAS,GAAG,wBAAgB,CAAC,uBAAuB,CACxD,UAAU,EACV,iBAAiB,CAClB,CAAC;IAEF,IAAI,UAAU,CAAC,QAAQ,CAAC,mBAAmB,KAAK,mBAAmB,EAAE;QACnE,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAG7E,IAAI,CAAC,CAAC,YAAY,YAAY,6BAAqB,CAAC,EAAE;QACpD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,YAAY,CAAC,SAAS;QACtB,YAAY,CAAC,aAAa;QAC1B,YAAY,CAAC,eAAe,CAC7B,CAAC;AACJ,CAAC;AAOD,SAAwB,qBAAqB,CAC3C,cAAqC,EACrC,UAAuC,EACvC,oBAA4B;IAG5B,IACE,0BAA0B,CAAC,cAAc,EAAE,UAAU,EAAE,oBAAoB,CAAC,EAC5E;QACA,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAGpC,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1E,MAAM,wBAAwB,GAAmB,CAC/C,IAAA,kCAAwB,EACtB,YAAY,EACZ,CAAC,EACD,YAAY,CAAC,MAAM,EACnB,oBAAoB,CACrB,CACF,CAAC;IAEF,IAAI,wBAAwB,KAAK,YAAY,EAAE;QAC7C,OAAO,KAAK,CAAC;KACd;IAED,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,wBAAwB,CAAC,GAAG,CACrD,QAAQ,CAAC,aAAa,CACvB,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC;AAlCD,wCAkCC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolatePoints.js","sourceRoot":"","sources":["../../../../src/utilities/planarFreehandROITool/interpolatePoints.ts"],"names":[],"mappings":";;;;;;AACA,kCAAgC;AAChC,wGAAgF;AAEhF,SAAgB,iBAAiB,CAAC,aAA+B;;IAC/D,OAAO,CACL,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,aAAa,0CAAE,gBAAgB,MAAK,IAAI;QACvD,CAAA,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,aAAa,0CAAE,iBAAiB,MAAK,IAAI,CACzD,CAAC;AACJ,CAAC;AALD,8CAKC;AAKD,SAAS,kBAAkB,CAAC,MAAM,EAAE,MAAM;IACxC,OAAO,YAAK,CAAC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,CAAC;AAChB,CAAC;AA7CD,sDA6CC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolateAnnotation.js","sourceRoot":"","sources":["../../../../src/utilities/planarFreehandROITool/interpolateAnnotation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,wBAAwB,MAAM,0CAA0C,CAAC;AAEhF,SAAS,0BAA0B,CACjC,cAAqC,EACrC,UAAuC,EACvC,oBAA4B;IAE5B,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,QAAQ,IAAI,oBAAoB,IAAI,CAAC,EAAE;QAC5D,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,cAAc,CAAC,QAAQ,EAAE;QAC5B,OAAO,IAAI,CAAC;KACb;IAED,MAAM,EAAE,iBAAiB,EAAE,UAAU,EAAE,mBAAmB,EAAE,GAAG,cAAc,CAAC;IAC9E,MAAM,SAAS,GAAG,gBAAgB,CAAC,uBAAuB,CACxD,UAAU,EACV,iBAAiB,CAClB,CAAC;IAEF,IAAI,UAAU,CAAC,QAAQ,CAAC,mBAAmB,KAAK,mBAAmB,EAAE;QACnE,OAAO,IAAI,CAAC;KACb;IAED,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,MAAM,YAAY,GAAG,SAAS,CAAC,eAAe,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAG7E,IAAI,CAAC,CAAC,YAAY,YAAY,qBAAqB,CAAC,EAAE;QACpD,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,YAAY,CAAC,SAAS;QACtB,YAAY,CAAC,aAAa;QAC1B,YAAY,CAAC,eAAe,CAC7B,CAAC;AACJ,CAAC;AAOD,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,cAAqC,EACrC,UAAuC,EACvC,oBAA4B;IAG5B,IACE,0BAA0B,CAAC,cAAc,EAAE,UAAU,EAAE,oBAAoB,CAAC,EAC5E;QACA,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAC;IAGpC,MAAM,YAAY,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAC;IAC1E,MAAM,wBAAwB,GAAmB,CAC/C,wBAAwB,CACtB,YAAY,EACZ,CAAC,EACD,YAAY,CAAC,MAAM,EACnB,oBAAoB,CACrB,CACF,CAAC;IAEF,IAAI,wBAAwB,KAAK,YAAY,EAAE;QAC7C,OAAO,KAAK,CAAC;KACd;IAED,UAAU,CAAC,IAAI,CAAC,QAAQ,GAAG,wBAAwB,CAAC,GAAG,CACrD,QAAQ,CAAC,aAAa,CACvB,CAAC;IAEF,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolatePoints.js","sourceRoot":"","sources":["../../../../src/utilities/planarFreehandROITool/interpolatePoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,wBAAwB,MAAM,0CAA0C,CAAC;AAEhF,MAAM,UAAU,iBAAiB,CAAC,aAA+B;IAC/D,OAAO,CACL,aAAa,EAAE,aAAa,EAAE,gBAAgB,KAAK,IAAI;QACvD,aAAa,EAAE,aAAa,EAAE,iBAAiB,KAAK,IAAI,CACzD,CAAC;AACJ,CAAC;AAKD,SAAS,kBAAkB,CAAC,MAAM,EAAE,MAAM;IACxC,OAAO,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC;AACvD,CAAC;AAKD,SAAS,OAAO,CAAC,MAAM,EAAE,MAAM;IAC7B,OAAO,KAAK,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC;AACrD,CAAC;AAKD,SAAS,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AAC,CACH,CAAC;IAEF,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACnC,CAAC;AAKD,MAAM,UAAU,qBAAqB,CACnC,aAA+B,EAC/B,MAAsB,EACtB,iBAAkC;IAElC,MAAM,EAAE,aAAa,EAAE,GAAG,aAAa,CAAC;IAExC,MAAM,MAAM,GAAG,MAAM,CAAC;IAEtB,IAAI,aAAa,EAAE;QACjB,MAAM,EACJ,yBAAyB,EACzB,0BAA0B,EAC1B,gBAAgB,GAAG,KAAK,EACxB,iBAAiB,GAAG,KAAK,GAC1B,GAAG,aAAa,CAAC;QAElB,MAAM,oBAAoB,GAAG,iBAAiB;YAC5C,CAAC,CAAC,0BAA0B;YAC5B,CAAC,CAAC,yBAAyB,CAAC;QAC9B,MAAM,SAAS,GAAG,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,gBAAgB,CAAC;QAE3E,IAAI,SAAS,EAAE;YAEb,MAAM,CAAC,eAAe,EAAE,eAAe,CAAC,GAAG,iBAAiB;gBAC1D,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,CAAC;gBAC/C,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;YAG3B,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,EAAE;gBACxD,OAAO,MAAM,CAAC;aACf;YAED,OAAuB,CACrB,wBAAwB,CACtB,MAAM,EACN,eAAe,EACf,eAAe,EACf,oBAAoB,CACrB,CACF,CAAC;SACH;KACF;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { Types } from '@cornerstonejs/core';
2
- import { PlanarFreehandROIAnnotation } from '../../types/ToolSpecificAnnotationTypes';
3
- export default function interpolateAnnotation(enabledElement: Types.IEnabledElement, annotation: PlanarFreehandROIAnnotation, knotsRatioPercentage: number): boolean;
4
- //# sourceMappingURL=interpolateAnnotation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolateAnnotation.d.ts","sourceRoot":"","sources":["../../../../src/utilities/planarFreehandROITool/interpolateAnnotation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAG5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,yCAAyC,CAAC;AAiDtF,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,cAAc,EAAE,KAAK,CAAC,eAAe,EACrC,UAAU,EAAE,2BAA2B,EACvC,oBAAoB,EAAE,MAAM,GAC3B,OAAO,CA8BT"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"interpolatePoints.d.ts","sourceRoot":"","sources":["../../../../src/utilities/planarFreehandROITool/interpolatePoints.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAI5C,wBAAgB,iBAAiB,CAAC,aAAa,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,CAK1E;AA+JD,wBAAgB,qBAAqB,CACnC,aAAa,EAAE,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,EAC/B,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EACtB,iBAAiB,CAAC,EAAE,KAAK,CAAC,MAAM,EAAE,GACjC,KAAK,CAAC,MAAM,EAAE,CAyChB"}