@cornerstonejs/tools 2.0.0-beta.20 → 2.0.0-beta.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (485) hide show
  1. package/dist/esm/cursors/SVGCursorDescriptor.d.ts +1 -1
  2. package/dist/esm/cursors/SVGCursorDescriptor.js +7 -0
  3. package/dist/esm/cursors/SVGMouseCursor.d.ts +1 -1
  4. package/dist/esm/drawingSvg/draw.d.ts +2 -1
  5. package/dist/esm/drawingSvg/drawArrow.d.ts +1 -1
  6. package/dist/esm/drawingSvg/drawCircle.d.ts +1 -1
  7. package/dist/esm/drawingSvg/drawEllipse.d.ts +1 -1
  8. package/dist/esm/drawingSvg/drawEllipse.js +1 -0
  9. package/dist/esm/drawingSvg/drawEllipseByCoordinates.d.ts +1 -1
  10. package/dist/esm/drawingSvg/drawHandle.d.ts +1 -1
  11. package/dist/esm/drawingSvg/drawHandles.d.ts +1 -1
  12. package/dist/esm/drawingSvg/drawHeight.d.ts +3 -0
  13. package/dist/esm/drawingSvg/drawHeight.js +42 -0
  14. package/dist/esm/drawingSvg/drawLine.d.ts +1 -1
  15. package/dist/esm/drawingSvg/drawLink.d.ts +1 -1
  16. package/dist/esm/drawingSvg/drawLinkedTextBox.d.ts +1 -1
  17. package/dist/esm/drawingSvg/drawPath.d.ts +1 -1
  18. package/dist/esm/drawingSvg/drawPolyline.d.ts +1 -1
  19. package/dist/esm/drawingSvg/drawRect.d.ts +1 -1
  20. package/dist/esm/drawingSvg/drawRect.js +1 -0
  21. package/dist/esm/drawingSvg/drawRectByCoordinates.d.ts +1 -1
  22. package/dist/esm/drawingSvg/drawRedactionRect.d.ts +3 -1
  23. package/dist/esm/drawingSvg/drawTextBox.d.ts +1 -1
  24. package/dist/esm/drawingSvg/getSvgDrawingHelper.d.ts +1 -1
  25. package/dist/esm/drawingSvg/getSvgDrawingHelper.js +1 -1
  26. package/dist/esm/drawingSvg/index.d.ts +2 -1
  27. package/dist/esm/drawingSvg/index.js +2 -1
  28. package/dist/esm/enums/ToolBindings.d.ts +3 -1
  29. package/dist/esm/enums/ToolBindings.js +2 -0
  30. package/dist/esm/eventDispatchers/keyboardEventHandlers/keyDown.d.ts +1 -1
  31. package/dist/esm/eventDispatchers/keyboardEventHandlers/keyUp.d.ts +1 -1
  32. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDown.d.ts +1 -1
  33. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownActivate.d.ts +1 -1
  34. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDownAnnotationAction.d.ts +1 -1
  35. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseDrag.d.ts +1 -1
  36. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseMove.d.ts +1 -1
  37. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.d.ts +2 -1
  38. package/dist/esm/eventDispatchers/mouseEventHandlers/mouseWheel.js +15 -2
  39. package/dist/esm/eventDispatchers/shared/getActiveToolForKeyboardEvent.d.ts +1 -1
  40. package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.d.ts +1 -1
  41. package/dist/esm/eventDispatchers/shared/getActiveToolForMouseEvent.js +3 -4
  42. package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.d.ts +1 -1
  43. package/dist/esm/eventDispatchers/shared/getActiveToolForTouchEvent.js +1 -1
  44. package/dist/esm/eventDispatchers/shared/getToolsWithActionsForKeyboardEvents.d.ts +2 -2
  45. package/dist/esm/eventDispatchers/shared/getToolsWithActionsForMouseEvent.d.ts +4 -3
  46. package/dist/esm/eventDispatchers/shared/getToolsWithModesForMouseEvent.d.ts +3 -3
  47. package/dist/esm/eventDispatchers/shared/getToolsWithModesForTouchEvent.d.ts +2 -2
  48. package/dist/esm/eventDispatchers/touchEventHandlers/touchDrag.d.ts +1 -1
  49. package/dist/esm/eventDispatchers/touchEventHandlers/touchStart.d.ts +1 -1
  50. package/dist/esm/eventDispatchers/touchEventHandlers/touchStartActivate.d.ts +1 -1
  51. package/dist/esm/eventListeners/annotations/annotationCompletedListener.d.ts +1 -1
  52. package/dist/esm/eventListeners/annotations/annotationRemovedListener.d.ts +1 -1
  53. package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.d.ts +3 -3
  54. package/dist/esm/eventListeners/annotations/contourSegmentation/contourSegmentationCompleted.js +1 -1
  55. package/dist/esm/eventListeners/mouse/getMouseEventPoints.d.ts +1 -1
  56. package/dist/esm/eventListeners/mouse/getMouseEventPoints.js +4 -1
  57. package/dist/esm/eventListeners/mouse/mouseDownListener.js +9 -1
  58. package/dist/esm/eventListeners/segmentation/imageChangeEventListener.js +6 -6
  59. package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.d.ts +1 -1
  60. package/dist/esm/eventListeners/segmentation/labelmap/onLabelmapSegmentationDataModified.js +3 -3
  61. package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.d.ts +1 -1
  62. package/dist/esm/eventListeners/segmentation/segmentationDataModifiedEventListener.js +2 -2
  63. package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.d.ts +1 -1
  64. package/dist/esm/eventListeners/segmentation/segmentationModifiedEventListener.js +3 -2
  65. package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.d.ts +1 -1
  66. package/dist/esm/eventListeners/segmentation/segmentationRepresentationModifiedEventListener.js +5 -5
  67. package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.d.ts +1 -1
  68. package/dist/esm/eventListeners/segmentation/segmentationRepresentationRemovedEventListener.js +4 -2
  69. package/dist/esm/eventListeners/touch/getTouchEventPoints.d.ts +1 -1
  70. package/dist/esm/index.d.ts +2 -2
  71. package/dist/esm/index.js +2 -2
  72. package/dist/esm/stateManagement/annotation/AnnotationRenderingEngine.d.ts +20 -0
  73. package/dist/esm/stateManagement/annotation/AnnotationRenderingEngine.js +112 -0
  74. package/dist/esm/stateManagement/annotation/FrameOfReferenceSpecificAnnotationManager.d.ts +3 -3
  75. package/dist/esm/stateManagement/annotation/annotationLocking.d.ts +1 -1
  76. package/dist/esm/stateManagement/annotation/annotationState.d.ts +2 -2
  77. package/dist/esm/stateManagement/annotation/annotationVisibility.d.ts +1 -1
  78. package/dist/esm/stateManagement/annotation/config/ToolStyle.d.ts +1 -1
  79. package/dist/esm/stateManagement/annotation/config/getFont.d.ts +2 -2
  80. package/dist/esm/stateManagement/annotation/config/getState.d.ts +1 -1
  81. package/dist/esm/stateManagement/annotation/config/helpers.d.ts +2 -2
  82. package/dist/esm/stateManagement/annotation/helpers/state.d.ts +2 -2
  83. package/dist/esm/stateManagement/annotation/utilities/defineProperties.d.ts +1 -1
  84. package/dist/esm/stateManagement/index.d.ts +3 -3
  85. package/dist/esm/stateManagement/index.js +2 -2
  86. package/dist/esm/{tools/displayTools → stateManagement/segmentation}/SegmentationRenderingEngine.d.ts +3 -3
  87. package/dist/esm/{tools/displayTools → stateManagement/segmentation}/SegmentationRenderingEngine.js +14 -17
  88. package/dist/esm/stateManagement/segmentation/SegmentationStateManager.d.ts +12 -12
  89. package/dist/esm/stateManagement/segmentation/SegmentationStateManager.js +27 -19
  90. package/dist/esm/stateManagement/segmentation/activeSegmentation.d.ts +5 -4
  91. package/dist/esm/stateManagement/segmentation/activeSegmentation.js +12 -5
  92. package/dist/esm/stateManagement/segmentation/addRepresentationData.d.ts +3 -3
  93. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentation.d.ts +3 -0
  94. package/dist/esm/stateManagement/segmentation/{addRepresentation.js → addSegmentationRepresentation.js} +6 -6
  95. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.d.ts +3 -0
  96. package/dist/esm/stateManagement/segmentation/addSegmentationRepresentations.js +9 -0
  97. package/dist/esm/stateManagement/segmentation/addSegmentations.d.ts +1 -1
  98. package/dist/esm/stateManagement/segmentation/config/index.d.ts +2 -2
  99. package/dist/esm/stateManagement/segmentation/config/index.js +2 -2
  100. package/dist/esm/stateManagement/segmentation/config/segmentationColor.js +2 -2
  101. package/dist/esm/stateManagement/segmentation/config/segmentationConfig.d.ts +5 -5
  102. package/dist/esm/stateManagement/segmentation/config/segmentationConfig.js +5 -5
  103. package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.d.ts +5 -5
  104. package/dist/esm/stateManagement/segmentation/config/segmentationVisibility.js +12 -12
  105. package/dist/esm/stateManagement/segmentation/convertStackToVolumeSegmentation.js +3 -7
  106. package/dist/esm/stateManagement/segmentation/convertVolumeToStackSegmentation.js +8 -53
  107. package/dist/esm/stateManagement/segmentation/helpers/clipAndCacheSurfacesForViewport.d.ts +1 -1
  108. package/dist/esm/stateManagement/segmentation/helpers/getSegmentationRepresentationRenderingConfig.d.ts +2 -0
  109. package/dist/esm/stateManagement/segmentation/helpers/{getRepresentationRenderingConfig.js → getSegmentationRepresentationRenderingConfig.js} +2 -2
  110. package/dist/esm/stateManagement/segmentation/helpers/normalizeSegmentationInput.d.ts +1 -1
  111. package/dist/esm/stateManagement/segmentation/helpers/validateSegmentationInput.d.ts +1 -1
  112. package/dist/esm/stateManagement/segmentation/index.d.ts +3 -3
  113. package/dist/esm/stateManagement/segmentation/index.js +3 -3
  114. package/dist/esm/stateManagement/segmentation/polySeg/Contour/computeAndAddContourRepresentation.d.ts +1 -1
  115. package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.d.ts +2 -2
  116. package/dist/esm/stateManagement/segmentation/polySeg/Contour/contourComputationStrategies.js +3 -3
  117. package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/createAndAddContourSegmentationsFromClippedSurfaces.d.ts +1 -1
  118. package/dist/esm/stateManagement/segmentation/polySeg/Contour/utils/extractContourData.d.ts +2 -2
  119. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/computeAndAddLabelmapRepresentation.d.ts +1 -1
  120. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.d.ts +1 -1
  121. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertContourToLabelmap.js +12 -21
  122. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.d.ts +2 -2
  123. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/convertSurfaceToLabelmap.js +2 -6
  124. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.d.ts +2 -2
  125. package/dist/esm/stateManagement/segmentation/polySeg/Labelmap/labelmapComputationStrategies.js +8 -13
  126. package/dist/esm/stateManagement/segmentation/polySeg/Surface/computeAndAddSurfaceRepresentation.d.ts +1 -1
  127. package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.d.ts +2 -2
  128. package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertContourToSurface.js +2 -1
  129. package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.d.ts +2 -2
  130. package/dist/esm/stateManagement/segmentation/polySeg/Surface/convertLabelmapToSurface.js +2 -2
  131. package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.d.ts +2 -2
  132. package/dist/esm/stateManagement/segmentation/polySeg/Surface/createAndCacheSurfacesFromRaw.js +2 -2
  133. package/dist/esm/stateManagement/segmentation/polySeg/Surface/surfaceComputationStrategies.d.ts +1 -1
  134. package/dist/esm/stateManagement/segmentation/polySeg/Surface/updateSurfaceData.js +4 -3
  135. package/dist/esm/stateManagement/segmentation/polySeg/canComputeRequestedRepresentation.js +2 -2
  136. package/dist/esm/stateManagement/segmentation/polySeg/computeAndAddRepresentation.d.ts +1 -1
  137. package/dist/esm/stateManagement/segmentation/removeSegmentationRepresentations.d.ts +2 -0
  138. package/dist/esm/stateManagement/segmentation/{removeRepresentationsFromViewport.js → removeSegmentationRepresentations.js} +9 -6
  139. package/dist/esm/stateManagement/segmentation/segmentIndex.js +2 -2
  140. package/dist/esm/stateManagement/segmentation/segmentLocking.d.ts +2 -2
  141. package/dist/esm/stateManagement/segmentation/segmentLocking.js +2 -2
  142. package/dist/esm/stateManagement/segmentation/segmentationState.d.ts +16 -16
  143. package/dist/esm/stateManagement/segmentation/segmentationState.js +30 -30
  144. package/dist/esm/store/SynchronizerManager/Synchronizer.d.ts +7 -3
  145. package/dist/esm/store/SynchronizerManager/Synchronizer.js +2 -1
  146. package/dist/esm/store/SynchronizerManager/createSynchronizer.d.ts +3 -3
  147. package/dist/esm/store/SynchronizerManager/createSynchronizer.js +1 -1
  148. package/dist/esm/store/SynchronizerManager/getAllSynchronizers.d.ts +1 -1
  149. package/dist/esm/store/SynchronizerManager/getSynchronizer.d.ts +1 -1
  150. package/dist/esm/store/SynchronizerManager/getSynchronizersForViewport.d.ts +1 -1
  151. package/dist/esm/store/ToolGroupManager/ToolGroup.d.ts +3 -3
  152. package/dist/esm/store/ToolGroupManager/ToolGroup.js +5 -2
  153. package/dist/esm/store/ToolGroupManager/createToolGroup.d.ts +1 -1
  154. package/dist/esm/store/ToolGroupManager/destroyToolGroup.js +1 -0
  155. package/dist/esm/store/ToolGroupManager/getAllToolGroups.d.ts +1 -1
  156. package/dist/esm/store/ToolGroupManager/getToolGroup.d.ts +1 -1
  157. package/dist/esm/store/ToolGroupManager/getToolGroupForViewport.d.ts +1 -1
  158. package/dist/esm/store/ToolGroupManager/getToolGroupsWithToolName.d.ts +1 -1
  159. package/dist/esm/store/addEnabledElement.d.ts +1 -1
  160. package/dist/esm/store/addEnabledElement.js +1 -1
  161. package/dist/esm/store/addTool.js +0 -3
  162. package/dist/esm/store/filterMoveableAnnotationTools.d.ts +1 -1
  163. package/dist/esm/store/filterToolsWithAnnotationsForElement.d.ts +1 -1
  164. package/dist/esm/store/filterToolsWithMoveableHandles.d.ts +1 -1
  165. package/dist/esm/store/removeEnabledElement.d.ts +1 -1
  166. package/dist/esm/store/removeEnabledElement.js +1 -1
  167. package/dist/esm/store/state.d.ts +4 -3
  168. package/dist/esm/store/state.js +1 -1
  169. package/dist/esm/synchronizers/callbacks/areViewportsCoplanar .d.ts +1 -1
  170. package/dist/esm/synchronizers/callbacks/cameraSyncCallback.d.ts +2 -2
  171. package/dist/esm/synchronizers/callbacks/imageSliceSyncCallback.d.ts +2 -2
  172. package/dist/esm/synchronizers/callbacks/presentationViewSyncCallback.d.ts +1 -1
  173. package/dist/esm/synchronizers/callbacks/slabThicknessSyncCallback.d.ts +1 -1
  174. package/dist/esm/synchronizers/callbacks/voiSyncCallback.d.ts +5 -2
  175. package/dist/esm/synchronizers/callbacks/zoomPanSyncCallback.d.ts +2 -2
  176. package/dist/esm/synchronizers/synchronizers/createCameraPositionSynchronizer.d.ts +1 -1
  177. package/dist/esm/synchronizers/synchronizers/createImageSliceSynchronizer.d.ts +1 -1
  178. package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.d.ts +2 -2
  179. package/dist/esm/synchronizers/synchronizers/createPresentationViewSynchronizer.js +1 -1
  180. package/dist/esm/synchronizers/synchronizers/createSlabThicknessSynchronizer.d.ts +1 -1
  181. package/dist/esm/synchronizers/synchronizers/createVOISynchronizer.d.ts +1 -1
  182. package/dist/esm/synchronizers/synchronizers/createZoomPanSynchronizer.d.ts +1 -1
  183. package/dist/esm/tools/AdvancedMagnifyTool.d.ts +4 -6
  184. package/dist/esm/tools/AdvancedMagnifyViewport.js +1 -1
  185. package/dist/esm/tools/AdvancedMagnifyViewportManager.d.ts +3 -2
  186. package/dist/esm/tools/AdvancedMagnifyViewportManager.js +1 -1
  187. package/dist/esm/tools/AnnotationEraserTool.d.ts +1 -1
  188. package/dist/esm/tools/CrosshairsTool.d.ts +5 -5
  189. package/dist/esm/tools/CrosshairsTool.js +4 -3
  190. package/dist/esm/tools/MIPJumpToClickTool.d.ts +1 -2
  191. package/dist/esm/tools/MIPJumpToClickTool.js +2 -3
  192. package/dist/esm/tools/MagnifyTool.d.ts +2 -3
  193. package/dist/esm/tools/OrientationMarkerTool.d.ts +41 -58
  194. package/dist/esm/tools/OrientationMarkerTool.js +8 -7
  195. package/dist/esm/tools/OverlayGridTool.d.ts +2 -4
  196. package/dist/esm/tools/OverlayGridTool.js +1 -1
  197. package/dist/esm/tools/PanTool.d.ts +1 -1
  198. package/dist/esm/tools/PanTool.js +5 -0
  199. package/dist/esm/tools/PlanarRotateTool.d.ts +3 -1
  200. package/dist/esm/tools/PlanarRotateTool.js +18 -4
  201. package/dist/esm/tools/ReferenceCursors.d.ts +2 -5
  202. package/dist/esm/tools/ReferenceLinesTool.d.ts +4 -6
  203. package/dist/esm/tools/ReferenceLinesTool.js +1 -1
  204. package/dist/esm/tools/ScaleOverlayTool.d.ts +7 -9
  205. package/dist/esm/tools/ScaleOverlayTool.js +1 -2
  206. package/dist/esm/tools/SculptorTool/CircleSculptCursor.d.ts +4 -4
  207. package/dist/esm/tools/SculptorTool.d.ts +1 -1
  208. package/dist/esm/tools/SegmentationIntersectionTool.d.ts +2 -2
  209. package/dist/esm/tools/StackScrollTool.d.ts +2 -1
  210. package/dist/esm/tools/StackScrollTool.js +17 -3
  211. package/dist/esm/tools/StackScrollToolMouseWheelTool.d.ts +1 -2
  212. package/dist/esm/tools/StackScrollToolMouseWheelTool.js +1 -2
  213. package/dist/esm/tools/TrackballRotateTool.d.ts +1 -1
  214. package/dist/esm/tools/TrackballRotateTool.js +4 -0
  215. package/dist/esm/tools/VolumeRotateMouseWheelTool.d.ts +2 -3
  216. package/dist/esm/tools/WindowLevelRegionTool.d.ts +3 -3
  217. package/dist/esm/tools/WindowLevelRegionTool.js +1 -3
  218. package/dist/esm/tools/WindowLevelTool.d.ts +1 -1
  219. package/dist/esm/tools/WindowLevelTool.js +12 -7
  220. package/dist/esm/tools/ZoomTool.d.ts +2 -2
  221. package/dist/esm/tools/ZoomTool.js +2 -2
  222. package/dist/esm/tools/annotation/AngleTool.d.ts +5 -7
  223. package/dist/esm/tools/annotation/ArrowAnnotateTool.d.ts +5 -7
  224. package/dist/esm/tools/annotation/BidirectionalTool.d.ts +5 -7
  225. package/dist/esm/tools/annotation/CircleROITool.d.ts +5 -7
  226. package/dist/esm/tools/annotation/CircleROITool.js +8 -5
  227. package/dist/esm/tools/annotation/CobbAngleTool.d.ts +5 -7
  228. package/dist/esm/tools/annotation/DragProbeTool.d.ts +3 -5
  229. package/dist/esm/tools/annotation/DragProbeTool.js +0 -5
  230. package/dist/esm/tools/annotation/EllipticalROITool.d.ts +5 -7
  231. package/dist/esm/tools/annotation/EllipticalROITool.js +8 -3
  232. package/dist/esm/tools/annotation/HeightTool.d.ts +36 -0
  233. package/dist/esm/tools/annotation/HeightTool.js +435 -0
  234. package/dist/esm/tools/annotation/KeyImageTool.d.ts +4 -6
  235. package/dist/esm/tools/annotation/LengthTool.d.ts +5 -7
  236. package/dist/esm/tools/annotation/LengthTool.js +7 -5
  237. package/dist/esm/tools/annotation/LivewireContourTool.d.ts +3 -4
  238. package/dist/esm/tools/annotation/LivewireContourTool.js +2 -1
  239. package/dist/esm/tools/annotation/PlanarFreehandROITool.d.ts +21 -4
  240. package/dist/esm/tools/annotation/PlanarFreehandROITool.js +155 -113
  241. package/dist/esm/tools/annotation/ProbeTool.d.ts +4 -6
  242. package/dist/esm/tools/annotation/ProbeTool.js +14 -29
  243. package/dist/esm/tools/annotation/RectangleROITool.d.ts +5 -5
  244. package/dist/esm/tools/annotation/RectangleROITool.js +7 -3
  245. package/dist/esm/tools/annotation/SplineContourSegmentationTool.d.ts +1 -1
  246. package/dist/esm/tools/annotation/SplineROITool.d.ts +1 -3
  247. package/dist/esm/tools/annotation/SplineROITool.js +2 -2
  248. package/dist/esm/tools/annotation/UltrasoundDirectionalTool.d.ts +5 -7
  249. package/dist/esm/tools/annotation/VideoRedactionTool.d.ts +4 -5
  250. package/dist/esm/tools/annotation/planarFreehandROITool/findOpenUShapedContourVectorToPeak.d.ts +1 -1
  251. package/dist/esm/tools/annotation/splines/CardinalSpline.d.ts +1 -1
  252. package/dist/esm/tools/annotation/splines/CubicSpline.d.ts +1 -1
  253. package/dist/esm/tools/annotation/splines/QuadraticSpline.d.ts +1 -1
  254. package/dist/esm/tools/annotation/splines/Spline.d.ts +1 -1
  255. package/dist/esm/tools/base/AnnotationDisplayTool.d.ts +3 -3
  256. package/dist/esm/tools/base/AnnotationDisplayTool.js +3 -9
  257. package/dist/esm/tools/base/AnnotationTool.d.ts +3 -14
  258. package/dist/esm/tools/base/BaseTool.d.ts +5 -5
  259. package/dist/esm/tools/base/BaseTool.js +1 -1
  260. package/dist/esm/tools/base/ContourBaseTool.d.ts +1 -1
  261. package/dist/esm/tools/base/ContourBaseTool.js +3 -3
  262. package/dist/esm/tools/base/ContourSegmentationBaseTool.js +10 -10
  263. package/dist/esm/tools/displayTools/Contour/contourConfig.d.ts +1 -1
  264. package/dist/esm/tools/displayTools/Contour/contourDisplay.d.ts +2 -2
  265. package/dist/esm/tools/displayTools/Contour/contourDisplay.js +2 -1
  266. package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.d.ts +2 -2
  267. package/dist/esm/tools/displayTools/Contour/contourHandler/handleContourSegmentation.js +4 -4
  268. package/dist/esm/tools/displayTools/Contour/contourHandler/utils.d.ts +1 -1
  269. package/dist/esm/tools/displayTools/Contour/removeContourFromElement.js +2 -2
  270. package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.d.ts +1 -1
  271. package/dist/esm/tools/displayTools/Labelmap/addLabelmapToElement.js +3 -3
  272. package/dist/esm/tools/displayTools/Labelmap/labelmapConfig.d.ts +1 -1
  273. package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.d.ts +5 -5
  274. package/dist/esm/tools/displayTools/Labelmap/labelmapDisplay.js +10 -8
  275. package/dist/esm/tools/displayTools/Labelmap/validateLabelmap.d.ts +2 -2
  276. package/dist/esm/tools/displayTools/Surface/surfaceConfig.d.ts +1 -1
  277. package/dist/esm/tools/displayTools/Surface/surfaceDisplay.d.ts +2 -2
  278. package/dist/esm/tools/distancePointToContour.d.ts +1 -1
  279. package/dist/esm/tools/index.d.ts +2 -1
  280. package/dist/esm/tools/index.js +2 -1
  281. package/dist/esm/tools/segmentation/BrushTool.js +5 -5
  282. package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.d.ts +20 -15
  283. package/dist/esm/tools/segmentation/CircleROIStartEndThresholdTool.js +199 -67
  284. package/dist/esm/tools/segmentation/CircleScissorsTool.d.ts +3 -3
  285. package/dist/esm/tools/segmentation/CircleScissorsTool.js +10 -3
  286. package/dist/esm/tools/segmentation/PaintFillTool.d.ts +1 -1
  287. package/dist/esm/tools/segmentation/PaintFillTool.js +15 -14
  288. package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.d.ts +20 -10
  289. package/dist/esm/tools/segmentation/RectangleROIStartEndThresholdTool.js +174 -55
  290. package/dist/esm/tools/segmentation/RectangleROIThresholdTool.d.ts +3 -3
  291. package/dist/esm/tools/segmentation/RectangleScissorsTool.d.ts +4 -3
  292. package/dist/esm/tools/segmentation/RectangleScissorsTool.js +8 -5
  293. package/dist/esm/tools/segmentation/SegmentSelectTool.d.ts +2 -2
  294. package/dist/esm/tools/segmentation/SegmentSelectTool.js +2 -2
  295. package/dist/esm/tools/segmentation/SphereScissorsTool.d.ts +3 -2
  296. package/dist/esm/tools/segmentation/SphereScissorsTool.js +12 -4
  297. package/dist/esm/tools/segmentation/strategies/BrushStrategy.d.ts +4 -5
  298. package/dist/esm/tools/segmentation/strategies/BrushStrategy.js +3 -1
  299. package/dist/esm/tools/segmentation/strategies/compositions/determineSegmentIndex.js +6 -3
  300. package/dist/esm/tools/segmentation/strategies/compositions/dynamicThreshold.js +1 -1
  301. package/dist/esm/tools/segmentation/strategies/compositions/islandRemoval.js +1 -1
  302. package/dist/esm/tools/segmentation/strategies/compositions/preview.js +2 -2
  303. package/dist/esm/tools/segmentation/strategies/compositions/regionFill.js +6 -3
  304. package/dist/esm/tools/segmentation/strategies/compositions/setValue.js +1 -1
  305. package/dist/esm/tools/segmentation/strategies/eraseRectangle.d.ts +1 -1
  306. package/dist/esm/tools/segmentation/strategies/fillCircle.js +1 -1
  307. package/dist/esm/tools/segmentation/strategies/fillRectangle.d.ts +1 -1
  308. package/dist/esm/tools/segmentation/strategies/fillRectangle.js +10 -7
  309. package/dist/esm/tools/segmentation/strategies/fillSphere.js +1 -1
  310. package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.d.ts +1 -1
  311. package/dist/esm/tools/segmentation/strategies/utils/getStrategyData.js +7 -24
  312. package/dist/esm/tools/segmentation/strategies/utils/isWithinThreshold.d.ts +9 -2
  313. package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.d.ts +3 -3
  314. package/dist/esm/tools/segmentation/strategies/utils/stackVolumeCheck.js +0 -3
  315. package/dist/esm/types/AnnotationGroupSelector.d.ts +1 -1
  316. package/dist/esm/types/AnnotationRenderContext.d.ts +3 -2
  317. package/dist/esm/types/AnnotationStyle.d.ts +2 -2
  318. package/dist/esm/types/AnnotationTypes.d.ts +3 -3
  319. package/dist/esm/types/BoundsIJK.d.ts +1 -1
  320. package/dist/esm/types/CINETypes.d.ts +1 -0
  321. package/dist/esm/types/CalculatorTypes.d.ts +1 -1
  322. package/dist/esm/types/CardinalSplineProps.d.ts +1 -1
  323. package/dist/esm/types/ClosestPoint.d.ts +1 -1
  324. package/dist/esm/types/ContourAnnotation.d.ts +1 -1
  325. package/dist/esm/types/ContourSegmentationAnnotation.d.ts +2 -2
  326. package/dist/esm/types/ControlPointInfo.d.ts +1 -1
  327. package/dist/esm/types/EventTypes.d.ts +13 -12
  328. package/dist/esm/types/FloodFillTypes.d.ts +2 -2
  329. package/dist/esm/types/IAnnotationManager.d.ts +3 -3
  330. package/dist/esm/types/IDistance.d.ts +1 -1
  331. package/dist/esm/types/IPoints.d.ts +2 -2
  332. package/dist/esm/types/ISetToolModeOptions.d.ts +2 -2
  333. package/dist/esm/types/ISpline.d.ts +1 -1
  334. package/dist/esm/types/ISynchronizerEventHandler.d.ts +3 -3
  335. package/dist/esm/types/IToolClassReference.d.ts +3 -3
  336. package/dist/esm/types/IToolGroup.d.ts +8 -8
  337. package/dist/esm/types/ITouchPoints.d.ts +2 -2
  338. package/dist/esm/types/InteractionTypes.d.ts +1 -1
  339. package/dist/esm/types/InternalToolTypes.d.ts +4 -4
  340. package/dist/esm/types/InterpolationTypes.d.ts +3 -3
  341. package/dist/esm/types/JumpToSliceOptions.d.ts +1 -1
  342. package/dist/esm/types/LabelmapToolOperationData.d.ts +3 -2
  343. package/dist/esm/types/PlanarBoundingBox.d.ts +1 -1
  344. package/dist/esm/types/SVGDrawingHelper.d.ts +1 -1
  345. package/dist/esm/types/ScrollOptions.d.ts +1 -1
  346. package/dist/esm/types/SegmentationStateTypes.d.ts +7 -6
  347. package/dist/esm/types/SplineCurveSegment.d.ts +1 -1
  348. package/dist/esm/types/SplineLineSegment.d.ts +1 -1
  349. package/dist/esm/types/ToolAction.d.ts +1 -1
  350. package/dist/esm/types/ToolHandle.d.ts +1 -1
  351. package/dist/esm/types/ToolProps.d.ts +1 -1
  352. package/dist/esm/types/ToolSpecificAnnotationTypes.d.ts +34 -12
  353. package/dist/esm/types/index.d.ts +2 -2
  354. package/dist/esm/utilities/annotationFrameRange.d.ts +1 -1
  355. package/dist/esm/utilities/annotationHydration.d.ts +3 -2
  356. package/dist/esm/utilities/cine/playClip.d.ts +6 -2
  357. package/dist/esm/utilities/cine/playClip.js +53 -6
  358. package/dist/esm/utilities/cine/state.d.ts +1 -1
  359. package/dist/esm/utilities/contourSegmentation/addContourSegmentationAnnotation.d.ts +1 -1
  360. package/dist/esm/utilities/contourSegmentation/areSameSegment.d.ts +1 -1
  361. package/dist/esm/utilities/contourSegmentation/isContourSegmentationAnnotation.d.ts +2 -2
  362. package/dist/esm/utilities/contourSegmentation/removeContourSegmentationAnnotation.d.ts +1 -1
  363. package/dist/esm/utilities/contours/AnnotationToPointData.d.ts +1 -1
  364. package/dist/esm/utilities/contours/areCoplanarContours.d.ts +1 -1
  365. package/dist/esm/utilities/contours/findHandlePolylineIndex.d.ts +1 -1
  366. package/dist/esm/utilities/contours/interpolation/createPolylineToolData.d.ts +1 -1
  367. package/dist/esm/utilities/contours/interpolation/getInterpolationData.d.ts +1 -1
  368. package/dist/esm/utilities/contours/interpolation/interpolate.d.ts +1 -1
  369. package/dist/esm/utilities/contours/reverseIfAntiClockwise.d.ts +1 -1
  370. package/dist/esm/utilities/contours/updateContourPolyline.d.ts +1 -1
  371. package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.d.ts +3 -2
  372. package/dist/esm/utilities/dynamicVolume/generateImageFromTimeData.js +31 -23
  373. package/dist/esm/utilities/dynamicVolume/getDataInTime.d.ts +1 -1
  374. package/dist/esm/utilities/dynamicVolume/getDataInTime.js +14 -9
  375. package/dist/esm/utilities/getAnnotationNearPoint.d.ts +1 -1
  376. package/dist/esm/utilities/getCalibratedUnits.d.ts +0 -6
  377. package/dist/esm/utilities/getCalibratedUnits.js +13 -4
  378. package/dist/esm/utilities/getPixelValueUnits.d.ts +2 -1
  379. package/dist/esm/utilities/getPixelValueUnits.js +1 -0
  380. package/dist/esm/utilities/getSphereBoundsInfo.d.ts +1 -1
  381. package/dist/esm/utilities/getToolsWithModesForElement.d.ts +1 -1
  382. package/dist/esm/utilities/getVOIMultipliers.d.ts +1 -1
  383. package/dist/esm/utilities/index.d.ts +1 -3
  384. package/dist/esm/utilities/index.js +1 -3
  385. package/dist/esm/utilities/livewire/LiveWirePath.d.ts +1 -1
  386. package/dist/esm/utilities/livewire/LivewireScissors.d.ts +1 -1
  387. package/dist/esm/utilities/math/aabb/distanceToPoint.d.ts +1 -1
  388. package/dist/esm/utilities/math/aabb/distanceToPointSquared.d.ts +1 -1
  389. package/dist/esm/utilities/math/aabb/intersectAABB.d.ts +1 -1
  390. package/dist/esm/utilities/math/basic/BasicStatsCalculator.d.ts +2 -2
  391. package/dist/esm/utilities/math/basic/BasicStatsCalculator.js +1 -1
  392. package/dist/esm/utilities/math/basic/Calculator.d.ts +1 -1
  393. package/dist/esm/utilities/math/circle/getCanvasCircleCorners.d.ts +1 -1
  394. package/dist/esm/utilities/math/circle/getCanvasCircleRadius.d.ts +1 -1
  395. package/dist/esm/utilities/math/line/distanceToPointSquared.d.ts +1 -1
  396. package/dist/esm/utilities/math/midPoint.d.ts +1 -1
  397. package/dist/esm/utilities/math/point/mirror.d.ts +1 -1
  398. package/dist/esm/utilities/math/polyline/addCanvasPointsToArray.d.ts +1 -1
  399. package/dist/esm/utilities/math/polyline/combinePolyline.d.ts +1 -1
  400. package/dist/esm/utilities/math/polyline/getAABB.d.ts +1 -1
  401. package/dist/esm/utilities/math/polyline/getLinesIntersection.d.ts +1 -1
  402. package/dist/esm/utilities/math/polyline/getNormal2.d.ts +1 -1
  403. package/dist/esm/utilities/math/polyline/getNormal3.d.ts +1 -1
  404. package/dist/esm/utilities/math/polyline/intersectPolyline.d.ts +1 -1
  405. package/dist/esm/utilities/math/polyline/planarFreehandROIInternalTypes.d.ts +2 -2
  406. package/dist/esm/utilities/math/sphere/pointInSphere.d.ts +1 -1
  407. package/dist/esm/utilities/orientation/getOrientationStringLPS.d.ts +1 -1
  408. package/dist/esm/utilities/planar/filterAnnotationsForDisplay.d.ts +1 -1
  409. package/dist/esm/utilities/planar/filterAnnotationsWithinPlane.d.ts +3 -0
  410. package/dist/esm/utilities/planar/filterAnnotationsWithinPlane.js +26 -0
  411. package/dist/esm/utilities/planar/filterAnnotationsWithinSlice.d.ts +1 -1
  412. package/dist/esm/utilities/planar/index.d.ts +3 -1
  413. package/dist/esm/utilities/planar/index.js +3 -1
  414. package/dist/esm/utilities/planarFreehandROITool/interpolation/algorithms/bspline.d.ts +1 -1
  415. package/dist/esm/utilities/planarFreehandROITool/interpolation/interpolateSegmentPoints.d.ts +1 -1
  416. package/dist/esm/utilities/planarFreehandROITool/smoothAnnotation.d.ts +2 -2
  417. package/dist/esm/utilities/planarFreehandROITool/smoothPoints.d.ts +11 -3
  418. package/dist/esm/utilities/polyData/utils.d.ts +1 -1
  419. package/dist/esm/utilities/scroll.d.ts +4 -3
  420. package/dist/esm/utilities/scroll.js +3 -10
  421. package/dist/esm/utilities/segmentation/InterpolationManager/InterpolationManager.d.ts +1 -1
  422. package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.d.ts +2 -11
  423. package/dist/esm/utilities/segmentation/createLabelmapVolumeForViewport.js +1 -1
  424. package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.d.ts +1 -1
  425. package/dist/esm/utilities/segmentation/createMergedLabelmapForIndex.js +7 -7
  426. package/dist/esm/utilities/segmentation/floodFill.d.ts +1 -1
  427. package/dist/esm/utilities/segmentation/getDefaultRepresentationConfig.d.ts +1 -1
  428. package/dist/esm/utilities/segmentation/getSegmentIndexAtLabelmapBorder.js +8 -5
  429. package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.d.ts +1 -1
  430. package/dist/esm/utilities/segmentation/getSegmentIndexAtWorldPoint.js +7 -4
  431. package/dist/esm/utilities/segmentation/getUniqueSegmentIndices.js +4 -5
  432. package/dist/esm/utilities/segmentation/index.d.ts +2 -2
  433. package/dist/esm/utilities/segmentation/index.js +2 -2
  434. package/dist/esm/utilities/segmentation/isValidRepresentationConfig.d.ts +1 -1
  435. package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.d.ts +1 -1
  436. package/dist/esm/utilities/segmentation/rectangleROIThresholdVolumeByRange.js +3 -2
  437. package/dist/esm/utilities/segmentation/segmentContourAction.d.ts +1 -1
  438. package/dist/esm/utilities/segmentation/segmentContourAction.js +4 -4
  439. package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.d.ts +2 -2
  440. package/dist/esm/utilities/segmentation/thresholdSegmentationByRange.js +24 -17
  441. package/dist/esm/utilities/segmentation/thresholdVolumeByRange.d.ts +3 -3
  442. package/dist/esm/utilities/segmentation/thresholdVolumeByRange.js +21 -12
  443. package/dist/esm/utilities/segmentation/triggerSegmentationRender.d.ts +3 -3
  444. package/dist/esm/utilities/segmentation/triggerSegmentationRender.js +7 -5
  445. package/dist/esm/utilities/segmentation/utilities.d.ts +12 -2
  446. package/dist/esm/utilities/segmentation/utilities.js +5 -6
  447. package/dist/esm/utilities/stackPrefetch/stackContextPrefetch.js +30 -25
  448. package/dist/esm/utilities/stackPrefetch/stackPrefetch.js +3 -8
  449. package/dist/esm/utilities/stackPrefetch/stackPrefetchUtils.js +2 -3
  450. package/dist/esm/utilities/stackPrefetch/state.d.ts +20 -1
  451. package/dist/esm/utilities/touch/index.d.ts +1 -1
  452. package/dist/esm/utilities/triggerAnnotationRender.d.ts +0 -20
  453. package/dist/esm/utilities/triggerAnnotationRender.js +1 -112
  454. package/dist/esm/utilities/viewport/isViewportPreScaled.d.ts +1 -1
  455. package/dist/esm/utilities/viewport/isViewportPreScaled.js +2 -5
  456. package/dist/esm/utilities/viewport/jumpToSlice.d.ts +1 -1
  457. package/dist/esm/utilities/viewport/jumpToSlice.js +4 -6
  458. package/dist/esm/utilities/voi/colorbar/ColorbarCanvas.d.ts +2 -2
  459. package/dist/esm/utilities/voi/colorbar/ViewportColorbar.d.ts +1 -1
  460. package/dist/esm/utilities/voi/colorbar/ViewportColorbar.js +1 -1
  461. package/dist/esm/utilities/voi/colorbar/types/ColorbarCanvasProps.d.ts +1 -1
  462. package/dist/esm/utilities/voi/colorbar/types/ColorbarCommonProps.d.ts +1 -1
  463. package/dist/esm/utilities/voi/colorbar/types/ColorbarProps.d.ts +3 -3
  464. package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.d.ts +8 -0
  465. package/dist/esm/utilities/voi/windowlevel/extractWindowLevelRegionToolData.js +4 -10
  466. package/dist/esm/widgets/types/index.d.ts +2 -2
  467. package/dist/esm/workers/polySegConverters.js +65 -32
  468. package/dist/umd/78.index.js +1 -1
  469. package/dist/umd/78.index.js.map +1 -1
  470. package/dist/umd/985.index.js +1 -1
  471. package/dist/umd/985.index.js.map +1 -1
  472. package/dist/umd/index.js +1 -1
  473. package/dist/umd/index.js.map +1 -1
  474. package/package.json +5 -7
  475. package/dist/esm/stateManagement/segmentation/addRepresentation.d.ts +0 -3
  476. package/dist/esm/stateManagement/segmentation/addRepresentations.d.ts +0 -3
  477. package/dist/esm/stateManagement/segmentation/addRepresentations.js +0 -9
  478. package/dist/esm/stateManagement/segmentation/helpers/getRepresentationRenderingConfig.d.ts +0 -2
  479. package/dist/esm/stateManagement/segmentation/removeRepresentationsFromViewport.d.ts +0 -2
  480. package/dist/esm/utilities/pointInShapeCallback.d.ts +0 -18
  481. package/dist/esm/utilities/pointInShapeCallback.js +0 -82
  482. package/dist/esm/utilities/pointInSurroundingSphereCallback.d.ts +0 -4
  483. package/dist/esm/utilities/pointInSurroundingSphereCallback.js +0 -63
  484. package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.d.ts +0 -3
  485. package/dist/esm/utilities/segmentation/triggerSegmentationRenderForViewports.js +0 -6
@@ -10,11 +10,12 @@ import { Enums, eventTarget, getEnabledElementByIds, getRenderingEngines, } from
10
10
  import { filterViewportsWithToolEnabled } from '../utilities/viewportFilters';
11
11
  import { getToolGroup } from '../store/ToolGroupManager';
12
12
  import { Events } from '../enums';
13
- const OverlayMarkerType = {
14
- ANNOTATED_CUBE: 1,
15
- AXES: 2,
16
- CUSTOM: 3,
17
- };
13
+ var OverlayMarkerType;
14
+ (function (OverlayMarkerType) {
15
+ OverlayMarkerType[OverlayMarkerType["ANNOTATED_CUBE"] = 1] = "ANNOTATED_CUBE";
16
+ OverlayMarkerType[OverlayMarkerType["AXES"] = 2] = "AXES";
17
+ OverlayMarkerType[OverlayMarkerType["CUSTOM"] = 3] = "CUSTOM";
18
+ })(OverlayMarkerType || (OverlayMarkerType = {}));
18
19
  class OrientationMarkerTool extends BaseTool {
19
20
  static { this.CUBE = 1; }
20
21
  static { this.AXIS = 2; }
@@ -33,8 +34,8 @@ class OrientationMarkerTool extends BaseTool {
33
34
  overlayConfiguration: {
34
35
  [OrientationMarkerTool.OVERLAY_MARKER_TYPES.ANNOTATED_CUBE]: {
35
36
  faceProperties: {
36
- xPlus: { text: 'R', faceColor: '#ffff00', faceRotation: 90 },
37
- xMinus: { text: 'L', faceColor: '#ffff00', faceRotation: 270 },
37
+ xPlus: { text: 'L', faceColor: '#ffff00', faceRotation: 90 },
38
+ xMinus: { text: 'R', faceColor: '#ffff00', faceRotation: 270 },
38
39
  yPlus: {
39
40
  text: 'P',
40
41
  faceColor: '#00ffff',
@@ -1,5 +1,5 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- import { PublicToolProps, ToolProps, SVGDrawingHelper, Annotation } from '../types';
2
+ import type { PublicToolProps, ToolProps, SVGDrawingHelper, Annotation } from '../types';
3
3
  import AnnotationDisplayTool from './base/AnnotationDisplayTool';
4
4
  export interface OverlayGridAnnotation extends Annotation {
5
5
  data: {
@@ -9,9 +9,7 @@ export interface OverlayGridAnnotation extends Annotation {
9
9
  }
10
10
  declare class OverlayGridTool extends AnnotationDisplayTool {
11
11
  static toolName: any;
12
- touchDragCallback: any;
13
- mouseDragCallback: any;
14
- _throttledCalculateCachedStats: any;
12
+ _throttledCalculateCachedStats: Function;
15
13
  isDrawing: boolean;
16
14
  isHandleOutsideImage: boolean;
17
15
  constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
@@ -1,5 +1,5 @@
1
1
  import { vec3 } from 'gl-matrix';
2
- import { metaData, CONSTANTS, utilities as csUtils, } from '@cornerstonejs/core';
2
+ import { metaData, CONSTANTS, getRenderingEngine, utilities as csUtils, } from '@cornerstonejs/core';
3
3
  import { addAnnotation, getAnnotations, } from '../stateManagement/annotation/annotationState';
4
4
  import { getToolGroup } from '../store/ToolGroupManager';
5
5
  import { drawLine as drawLineSvg } from '../drawingSvg';
@@ -1,5 +1,5 @@
1
1
  import { BaseTool } from './base';
2
- import { EventTypes, PublicToolProps, ToolProps } from '../types';
2
+ import type { EventTypes, PublicToolProps, ToolProps } from '../types';
3
3
  declare class PanTool extends BaseTool {
4
4
  static toolName: any;
5
5
  constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
@@ -16,6 +16,11 @@ class PanTool extends BaseTool {
16
16
  const { element, deltaPoints } = evt.detail;
17
17
  const enabledElement = getEnabledElement(element);
18
18
  const deltaPointsWorld = deltaPoints.world;
19
+ if (deltaPointsWorld[0] === 0 &&
20
+ deltaPointsWorld[1] === 0 &&
21
+ deltaPointsWorld[2] === 0) {
22
+ return;
23
+ }
19
24
  const camera = enabledElement.viewport.getCamera();
20
25
  const { focalPoint, position } = camera;
21
26
  const updatedPosition = [
@@ -1,10 +1,12 @@
1
1
  import { BaseTool } from './base';
2
- import { PublicToolProps, ToolProps, EventTypes } from '../types';
2
+ import type { PublicToolProps, ToolProps, EventTypes } from '../types';
3
3
  declare class PlanarRotateTool extends BaseTool {
4
4
  static toolName: any;
5
5
  touchDragCallback: (evt: EventTypes.MouseDragEventType) => void;
6
6
  mouseDragCallback: (evt: EventTypes.MouseDragEventType) => void;
7
7
  constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
8
+ mouseWheelCallback: (evt: EventTypes.MouseWheelEventType) => void;
8
9
  _dragCallback(evt: EventTypes.MouseDragEventType): void;
10
+ setAngle(viewport: any, angle: any): void;
9
11
  }
10
12
  export default PlanarRotateTool;
@@ -1,4 +1,4 @@
1
- import { BaseVolumeViewport, getEnabledElement, } from '@cornerstonejs/core';
1
+ import { BaseVolumeViewport, getEnabledElement } from '@cornerstonejs/core';
2
2
  import { mat4, vec3 } from 'gl-matrix';
3
3
  import { BaseTool } from './base';
4
4
  import angleBetweenLines from '../utilities/math/angle/angleBetweenLines';
@@ -7,6 +7,14 @@ class PlanarRotateTool extends BaseTool {
7
7
  supportedInteractionTypes: ['Mouse', 'Touch'],
8
8
  }) {
9
9
  super(toolProps, defaultToolProps);
10
+ this.mouseWheelCallback = (evt) => {
11
+ const { element, wheel } = evt.detail;
12
+ const enabledElement = getEnabledElement(element);
13
+ const { viewport } = enabledElement;
14
+ const { invert } = this.configuration;
15
+ const angle = wheel.direction * 10 * (invert ? -1 : 1);
16
+ this.setAngle(viewport, angle);
17
+ };
10
18
  this.touchDragCallback = this._dragCallback.bind(this);
11
19
  this.mouseDragCallback = this._dragCallback.bind(this);
12
20
  }
@@ -22,7 +30,7 @@ class PlanarRotateTool extends BaseTool {
22
30
  const centerCanvas = [width * 0.5, height * 0.5];
23
31
  const centerWorld = viewport.canvasToWorld(centerCanvas);
24
32
  let angle = angleBetweenLines([startPointWorld, centerWorld], [centerWorld, currentPointWorld]);
25
- const { viewPlaneNormal, viewUp } = camera;
33
+ const { viewPlaneNormal } = camera;
26
34
  const v1 = vec3.sub(vec3.create(), centerWorld, startPointWorld);
27
35
  const v2 = vec3.sub(vec3.create(), centerWorld, currentPointWorld);
28
36
  const cross = vec3.cross(vec3.create(), v1, v2);
@@ -32,8 +40,12 @@ class PlanarRotateTool extends BaseTool {
32
40
  if (Number.isNaN(angle)) {
33
41
  return;
34
42
  }
43
+ this.setAngle(viewport, angle);
44
+ }
45
+ setAngle(viewport, angle) {
46
+ const { viewPlaneNormal, viewUp } = viewport.getCamera();
35
47
  if (viewport instanceof BaseVolumeViewport) {
36
- const rotAngle = (angle * Math.PI) / 180;
48
+ const rotAngle = (((angle + 360) % 360) * Math.PI) / 180;
37
49
  const rotMat = mat4.identity(new Float32Array(16));
38
50
  mat4.rotate(rotMat, rotMat, rotAngle, viewPlaneNormal);
39
51
  const rotatedViewUp = vec3.transformMat4(vec3.create(), viewUp, rotMat);
@@ -41,7 +53,9 @@ class PlanarRotateTool extends BaseTool {
41
53
  }
42
54
  else {
43
55
  const { rotation } = viewport.getViewPresentation();
44
- viewport.setViewPresentation({ rotation: rotation + angle });
56
+ viewport.setViewPresentation({
57
+ rotation: (rotation + angle + 360) % 360,
58
+ });
45
59
  }
46
60
  viewport.render();
47
61
  }
@@ -1,11 +1,8 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- import { EventTypes, PublicToolProps, ToolProps, SVGDrawingHelper, Annotation, Annotations } from '../types';
2
+ import type { EventTypes, PublicToolProps, ToolProps, SVGDrawingHelper, Annotation, Annotations } from '../types';
3
3
  import AnnotationDisplayTool from './base/AnnotationDisplayTool';
4
4
  declare class ReferenceCursors extends AnnotationDisplayTool {
5
5
  static toolName: any;
6
- touchDragCallback: any;
7
- mouseDragCallback: any;
8
- _throttledCalculateCachedStats: any;
9
6
  isDrawing: boolean;
10
7
  isHandleOutsideImage: boolean;
11
8
  _elementWithCursor: null | HTMLDivElement;
@@ -19,7 +16,7 @@ declare class ReferenceCursors extends AnnotationDisplayTool {
19
16
  createInitialAnnotation: (worldPos: Types.Point3, element: HTMLDivElement) => void;
20
17
  getActiveAnnotation(element: HTMLDivElement): null | Annotation;
21
18
  updateAnnotationPosition(element: HTMLDivElement, annotation: Annotation): void;
22
- onCameraModified: (evt: any) => void;
19
+ onCameraModified: (evt: Types.EventTypes.CameraModifiedEvent) => void;
23
20
  filterInteractableAnnotationsForElement(element: HTMLDivElement, annotations: Annotations): Annotations;
24
21
  renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean;
25
22
  updateViewportImage(viewport: Types.IStackViewport | Types.IVolumeViewport): void;
@@ -1,14 +1,12 @@
1
1
  import { type Types } from '@cornerstonejs/core';
2
- import { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
3
- import { ReferenceLineAnnotation } from '../types/ToolSpecificAnnotationTypes';
2
+ import type { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
3
+ import type { ReferenceLineAnnotation } from '../types/ToolSpecificAnnotationTypes';
4
4
  import AnnotationDisplayTool from './base/AnnotationDisplayTool';
5
5
  declare class ReferenceLines extends AnnotationDisplayTool {
6
6
  static toolName: any;
7
- touchDragCallback: any;
8
- mouseDragCallback: any;
9
- _throttledCalculateCachedStats: any;
7
+ _throttledCalculateCachedStats: Function;
10
8
  editData: {
11
- renderingEngine: any;
9
+ renderingEngine: Types.IRenderingEngine;
12
10
  sourceViewportId: string;
13
11
  annotation: ReferenceLineAnnotation;
14
12
  } | null;
@@ -16,7 +16,7 @@ class ReferenceLines extends AnnotationDisplayTool {
16
16
  },
17
17
  }) {
18
18
  super(toolProps, defaultToolProps);
19
- this.editData = {};
19
+ this.editData = null;
20
20
  this._init = () => {
21
21
  const renderingEngines = getRenderingEngines();
22
22
  const renderingEngine = renderingEngines[0];
@@ -1,15 +1,13 @@
1
1
  import AnnotationDisplayTool from './base/AnnotationDisplayTool';
2
- import { ScaleOverlayAnnotation } from '../types/ToolSpecificAnnotationTypes';
2
+ import type { ScaleOverlayAnnotation } from '../types/ToolSpecificAnnotationTypes';
3
3
  import type { Types } from '@cornerstonejs/core';
4
- import { EventTypes, PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
4
+ import type { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
5
5
  declare class ScaleOverlayTool extends AnnotationDisplayTool {
6
6
  static toolName: any;
7
- touchDragCallback: any;
8
- mouseDragCallback: any;
9
- _throttledCalculateCachedStats: any;
7
+ _throttledCalculateCachedStats: Function;
10
8
  editData: {
11
- renderingEngine: any;
12
- viewport: any;
9
+ renderingEngine: Types.IRenderingEngine;
10
+ viewport: Types.IViewport;
13
11
  annotation: ScaleOverlayAnnotation;
14
12
  } | null;
15
13
  isDrawing: boolean;
@@ -20,12 +18,12 @@ declare class ScaleOverlayTool extends AnnotationDisplayTool {
20
18
  onCameraModified: (evt: Types.EventTypes.CameraModifiedEvent) => void;
21
19
  renderAnnotation(enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper): boolean;
22
20
  _getTextLines(scaleSize: number): string[] | undefined;
23
- computeScaleSize: (worldWidthViewport: number, worldHeightViewport: number, location: any) => any;
21
+ computeScaleSize: (worldWidthViewport: number, worldHeightViewport: number, location: string) => any;
24
22
  computeEndScaleTicks: (canvasCoordinates: any, location: any) => {
25
23
  endTick1: any[][];
26
24
  endTick2: any[][];
27
25
  };
28
- computeInnerScaleTicks: (scaleSize: number, location: string, annotationUID: string, leftTick: any[][], rightTick: any[][]) => {
26
+ computeInnerScaleTicks: (scaleSize: number, location: string, annotationUID: string, leftTick: Types.Point2[], rightTick: Types.Point2[]) => {
29
27
  tickIds: any[];
30
28
  tickUIDs: any[];
31
29
  tickCoordinates: any[];
@@ -4,7 +4,6 @@ import { getEnabledElementByIds, getRenderingEngines, utilities as csUtils, } fr
4
4
  import { addAnnotation, getAnnotations, } from '../stateManagement/annotation/annotationState';
5
5
  import { drawLine as drawLineSvg, drawTextBox as drawTextBoxSvg, } from '../drawingSvg';
6
6
  import { getToolGroup } from '../store/ToolGroupManager';
7
- const SCALEOVERLAYTOOL_ID = 'scaleoverlay-viewport';
8
7
  const viewportsWithAnnotations = [];
9
8
  class ScaleOverlayTool extends AnnotationDisplayTool {
10
9
  constructor(toolProps = {}, defaultToolProps = {
@@ -14,7 +13,7 @@ class ScaleOverlayTool extends AnnotationDisplayTool {
14
13
  },
15
14
  }) {
16
15
  super(toolProps, defaultToolProps);
17
- this.editData = {};
16
+ this.editData = null;
18
17
  this._init = () => {
19
18
  const renderingEngines = getRenderingEngines();
20
19
  const renderingEngine = renderingEngines[0];
@@ -1,7 +1,7 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- import { ISculptToolShape } from '../../types/ISculptToolShape';
3
- import { SculptData } from '../SculptorTool';
4
- import { SVGDrawingHelper, EventTypes, ContourAnnotationData } from '../../types';
2
+ import type { ISculptToolShape } from '../../types/ISculptToolShape';
3
+ import type { SculptData } from '../SculptorTool';
4
+ import type { SVGDrawingHelper, EventTypes, ContourAnnotationData } from '../../types';
5
5
  export type PushedHandles = {
6
6
  first?: number;
7
7
  last?: number;
@@ -9,7 +9,7 @@ export type PushedHandles = {
9
9
  declare class CircleSculptCursor implements ISculptToolShape {
10
10
  static shapeName: string;
11
11
  private toolInfo;
12
- renderShape(svgDrawingHelper: SVGDrawingHelper, canvasLocation: Types.Point2, options: any): void;
12
+ renderShape(svgDrawingHelper: SVGDrawingHelper, canvasLocation: Types.Point2, options: unknown): void;
13
13
  pushHandles(viewport: Types.IViewport, sculptData: SculptData): PushedHandles;
14
14
  configureToolSize(evt: EventTypes.InteractionEventType): void;
15
15
  updateToolSize(canvasCoords: Types.Point2, viewport: Types.IViewport, activeAnnotation: ContourAnnotationData): void;
@@ -1,6 +1,6 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { BaseTool } from './base';
3
- import { EventTypes, PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
3
+ import type { EventTypes, PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
4
4
  import type { ISculptToolShape } from '../types/ISculptToolShape';
5
5
  export type SculptData = {
6
6
  mousePoint: Types.Point3;
@@ -1,7 +1,7 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
- import { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
2
+ import type { PublicToolProps, ToolProps, SVGDrawingHelper } from '../types';
3
3
  import AnnotationDisplayTool from './base/AnnotationDisplayTool';
4
- import { Annotation } from '../types';
4
+ import type { Annotation } from '../types';
5
5
  export interface SegmentationIntersectionAnnotation extends Annotation {
6
6
  data: {
7
7
  actorsWorldPointsMap: Map<string, Map<string, object>>;
@@ -1,9 +1,10 @@
1
1
  import { BaseTool } from './base';
2
- import { PublicToolProps, ToolProps, EventTypes } from '../types';
2
+ import type { PublicToolProps, ToolProps, EventTypes } from '../types';
3
3
  declare class StackScrollTool extends BaseTool {
4
4
  static toolName: any;
5
5
  deltaY: number;
6
6
  constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
7
+ mouseWheelCallback(evt: EventTypes.MouseWheelEventType): void;
7
8
  mouseDragCallback(evt: EventTypes.InteractionEventType): void;
8
9
  touchDragCallback(evt: EventTypes.InteractionEventType): void;
9
10
  _dragCallback(evt: EventTypes.InteractionEventType): void;
@@ -1,4 +1,4 @@
1
- import { getEnabledElementByIds, VolumeViewport } from '@cornerstonejs/core';
1
+ import { getEnabledElementByIds, getEnabledElement, VolumeViewport, } from '@cornerstonejs/core';
2
2
  import { BaseTool } from './base';
3
3
  import { scroll } from '../utilities';
4
4
  class StackScrollTool extends BaseTool {
@@ -13,6 +13,21 @@ class StackScrollTool extends BaseTool {
13
13
  super(toolProps, defaultToolProps);
14
14
  this.deltaY = 1;
15
15
  }
16
+ mouseWheelCallback(evt) {
17
+ const { wheel, element } = evt.detail;
18
+ const { direction } = wheel;
19
+ const { invert } = this.configuration;
20
+ const { viewport } = getEnabledElement(element);
21
+ const delta = direction * (invert ? -1 : 1);
22
+ const volumeId = this.getTargetVolumeId(viewport);
23
+ scroll(viewport, {
24
+ delta,
25
+ debounceLoading: this.configuration.debounceIfNotLoaded,
26
+ loop: this.configuration.loop,
27
+ volumeId,
28
+ scrollSlabs: this.configuration.scrollSlabs,
29
+ });
30
+ }
16
31
  mouseDragCallback(evt) {
17
32
  this._dragCallback(evt);
18
33
  }
@@ -22,12 +37,11 @@ class StackScrollTool extends BaseTool {
22
37
  _dragCallback(evt) {
23
38
  const { deltaPoints, viewportId, renderingEngineId } = evt.detail;
24
39
  const { viewport } = getEnabledElementByIds(viewportId, renderingEngineId);
25
- const targetId = this.getTargetId(viewport);
26
40
  const { debounceIfNotLoaded, invert, loop } = this.configuration;
27
41
  const deltaPointY = deltaPoints.canvas[1];
28
42
  let volumeId;
29
43
  if (viewport instanceof VolumeViewport) {
30
- volumeId = targetId.split(/volumeId:|\?/)[1];
44
+ volumeId = this.getTargetVolumeId(viewport);
31
45
  }
32
46
  const pixelsPerImage = this._getPixelPerImage(viewport);
33
47
  const deltaY = deltaPointY + this.deltaY;
@@ -1,8 +1,7 @@
1
1
  import { BaseTool } from './base';
2
- import { MouseWheelEventType } from '../types/EventTypes';
2
+ import type { MouseWheelEventType } from '../types/EventTypes';
3
3
  declare class StackScrollMouseWheelTool extends BaseTool {
4
4
  static toolName: any;
5
- _configuration: any;
6
5
  constructor(toolProps?: {}, defaultToolProps?: {
7
6
  supportedInteractionTypes: string[];
8
7
  configuration: {
@@ -19,8 +19,7 @@ class StackScrollMouseWheelTool extends BaseTool {
19
19
  const { invert } = this.configuration;
20
20
  const { viewport } = getEnabledElement(element);
21
21
  const delta = direction * (invert ? -1 : 1);
22
- const targetId = this.getTargetId(viewport);
23
- const volumeId = utilities.getVolumeId(targetId);
22
+ const volumeId = this.getTargetVolumeId(viewport);
24
23
  scroll(viewport, {
25
24
  delta,
26
25
  debounceLoading: this.configuration.debounceIfNotLoaded,
@@ -1,4 +1,4 @@
1
- import { EventTypes, PublicToolProps, ToolProps } from '../types';
1
+ import type { EventTypes, PublicToolProps, ToolProps } from '../types';
2
2
  import { BaseTool } from './base';
3
3
  declare class TrackballRotateTool extends BaseTool {
4
4
  static toolName: any;
@@ -22,6 +22,10 @@ class TrackballRotateTool extends BaseTool {
22
22
  const actorEntry = viewport.getDefaultActor();
23
23
  const actor = actorEntry.actor;
24
24
  const mapper = actor.getMapper();
25
+ const hasSampleDistance = 'getSampleDistance' in mapper || 'getCurrentSampleDistance' in mapper;
26
+ if (!hasSampleDistance) {
27
+ return true;
28
+ }
25
29
  const originalSampleDistance = mapper.getSampleDistance();
26
30
  if (!this._hasResolutionChanged) {
27
31
  mapper.setSampleDistance(originalSampleDistance * 2);
@@ -1,9 +1,8 @@
1
1
  import { BaseTool } from './base';
2
- import { PublicToolProps, ToolProps } from '../types';
3
- import { MouseWheelEventType } from '../types/EventTypes';
2
+ import type { PublicToolProps, ToolProps } from '../types';
3
+ import type { MouseWheelEventType } from '../types/EventTypes';
4
4
  declare class VolumeRotateMouseWheelTool extends BaseTool {
5
5
  static toolName: any;
6
- _configuration: any;
7
6
  constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
8
7
  mouseWheelCallback(evt: MouseWheelEventType): void;
9
8
  }
@@ -1,15 +1,15 @@
1
1
  import { AnnotationTool } from './base';
2
2
  import type { Types } from '@cornerstonejs/core';
3
- import { EventTypes, ToolProps, PublicToolProps, SVGDrawingHelper } from '../types';
3
+ import type { EventTypes, ToolProps, PublicToolProps, SVGDrawingHelper, Annotation } from '../types';
4
4
  declare class WindowLevelRegionTool extends AnnotationTool {
5
5
  static toolName: any;
6
6
  editData: {
7
- annotation: any;
7
+ annotation: Annotation;
8
8
  viewportIdsToRender: string[];
9
9
  } | null;
10
10
  isDrawing: boolean;
11
11
  constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps);
12
- addNewAnnotation: (evt: EventTypes.InteractionEventType) => any;
12
+ addNewAnnotation: (evt: EventTypes.InteractionEventType) => Annotation;
13
13
  _endCallback: (evt: EventTypes.InteractionEventType) => void;
14
14
  _dragCallback: (evt: EventTypes.InteractionEventType) => void;
15
15
  _activateDraw: (element: any) => void;
@@ -23,7 +23,7 @@ class WindowLevelRegionTool extends AnnotationTool {
23
23
  const { currentPoints, element } = eventDetail;
24
24
  const worldPos = currentPoints.world;
25
25
  const enabledElement = getEnabledElement(element);
26
- const { viewport, renderingEngine } = enabledElement;
26
+ const { viewport } = enabledElement;
27
27
  this.isDrawing = true;
28
28
  const camera = viewport.getCamera();
29
29
  const { viewPlaneNormal, viewUp } = camera;
@@ -69,7 +69,6 @@ class WindowLevelRegionTool extends AnnotationTool {
69
69
  const { annotation, viewportIdsToRender } = this.editData;
70
70
  this._deactivateDraw(element);
71
71
  resetElementCursor(element);
72
- const { renderingEngine } = getEnabledElement(element);
73
72
  this.editData = null;
74
73
  this.isDrawing = false;
75
74
  removeAnnotation(annotation.annotationUID);
@@ -105,7 +104,6 @@ class WindowLevelRegionTool extends AnnotationTool {
105
104
  points[1] = bottomRightWorld;
106
105
  points[2] = topLeftWorld;
107
106
  annotation.invalidated = true;
108
- const { renderingEngine } = enabledElement;
109
107
  triggerAnnotationRenderForViewportIds(viewportIdsToRender);
110
108
  };
111
109
  this._activateDraw = (element) => {
@@ -1,5 +1,5 @@
1
1
  import { BaseTool } from './base';
2
- import { EventTypes } from '../types';
2
+ import type { EventTypes } from '../types';
3
3
  declare class WindowLevelTool extends BaseTool {
4
4
  static toolName: any;
5
5
  constructor(toolProps?: {}, defaultToolProps?: {
@@ -47,8 +47,7 @@ class WindowLevelTool extends BaseTool {
47
47
  let isPreScaled = false;
48
48
  const properties = viewport.getProperties();
49
49
  if (viewport instanceof VolumeViewport) {
50
- const targetId = this.getTargetId(viewport);
51
- volumeId = utilities.getVolumeId(targetId);
50
+ volumeId = this.getTargetVolumeId(viewport);
52
51
  viewportsContainingVolumeUID = utilities.getViewportsWithVolumeId(volumeId, renderingEngine.id);
53
52
  ({ lower, upper } = properties.voiRange);
54
53
  const volume = cache.getVolume(volumeId);
@@ -135,9 +134,11 @@ class WindowLevelTool extends BaseTool {
135
134
  let imageDynamicRange;
136
135
  if (volumeId) {
137
136
  const imageVolume = cache.getVolume(volumeId);
138
- const { dimensions } = imageVolume;
139
- const scalarData = imageVolume.getScalarData();
140
- const calculatedDynamicRange = this._getImageDynamicRangeFromMiddleSlice(scalarData, dimensions);
137
+ const { voxelManager } = viewport.getImageData();
138
+ const middleSlicePixelData = voxelManager.getMiddleSliceData();
139
+ const calculatedDynamicRange = middleSlicePixelData.reduce((acc, pixel) => {
140
+ return [Math.min(acc[0], pixel), Math.max(acc[1], pixel)];
141
+ }, [Infinity, -Infinity]);
141
142
  const BitsStored = imageVolume?.metadata?.BitsStored;
142
143
  const metadataDynamicRange = BitsStored ? 2 ** BitsStored : Infinity;
143
144
  imageDynamicRange = Math.min(calculatedDynamicRange, metadataDynamicRange);
@@ -149,7 +150,11 @@ class WindowLevelTool extends BaseTool {
149
150
  return ratio > 1 ? Math.round(ratio) : ratio;
150
151
  }
151
152
  _getImageDynamicRangeFromViewport(viewport) {
152
- const { imageData } = viewport.getImageData();
153
+ const { imageData, voxelManager } = viewport.getImageData();
154
+ if (voxelManager?.getRange) {
155
+ const range = voxelManager.getRange();
156
+ return range[1] - range[0];
157
+ }
153
158
  const dimensions = imageData.getDimensions();
154
159
  if (imageData.getRange) {
155
160
  const imageDataRange = imageData.getRange();
@@ -160,7 +165,7 @@ class WindowLevelTool extends BaseTool {
160
165
  scalarData = imageData.getScalarData();
161
166
  }
162
167
  else {
163
- scalarData = imageData.getPointData().getScalars();
168
+ scalarData = imageData.getPointData().getScalars().getData();
164
169
  }
165
170
  if (dimensions[2] !== 1) {
166
171
  return this._getImageDynamicRangeFromMiddleSlice(scalarData, dimensions);
@@ -1,6 +1,6 @@
1
- import { Types } from '@cornerstonejs/core';
1
+ import type { Types } from '@cornerstonejs/core';
2
2
  import { BaseTool } from './base';
3
- import { EventTypes, PublicToolProps, ToolProps } from '../types';
3
+ import type { EventTypes, PublicToolProps, ToolProps } from '../types';
4
4
  declare class ZoomTool extends BaseTool {
5
5
  static toolName: any;
6
6
  touchDragCallback: (evt: EventTypes.InteractionEventType) => void;
@@ -7,8 +7,8 @@ class ZoomTool extends BaseTool {
7
7
  supportedInteractionTypes: ['Mouse', 'Touch'],
8
8
  configuration: {
9
9
  zoomToCenter: false,
10
- minZoomScale: 0.1,
11
- maxZoomScale: 30,
10
+ minZoomScale: 0.001,
11
+ maxZoomScale: 3000,
12
12
  pinchToZoom: true,
13
13
  pan: true,
14
14
  invert: false,
@@ -1,15 +1,13 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { AnnotationTool } from '../base';
3
- import { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper } from '../../types';
4
- import { AngleAnnotation } from '../../types/ToolSpecificAnnotationTypes';
3
+ import type { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper, Annotation } from '../../types';
4
+ import type { AngleAnnotation } from '../../types/ToolSpecificAnnotationTypes';
5
5
  declare class AngleTool extends AnnotationTool {
6
6
  static toolName: any;
7
- touchDragCallback: any;
8
- mouseDragCallback: any;
9
7
  angleStartedNotYetCompleted: boolean;
10
- _throttledCalculateCachedStats: any;
8
+ _throttledCalculateCachedStats: Function;
11
9
  editData: {
12
- annotation: any;
10
+ annotation: Annotation;
13
11
  viewportIdsToRender: string[];
14
12
  handleIndex?: number;
15
13
  movingTextBox?: boolean;
@@ -25,7 +23,7 @@ declare class AngleTool extends AnnotationTool {
25
23
  handleSelectedCallback(evt: EventTypes.InteractionEventType, annotation: AngleAnnotation, handle: ToolHandle): void;
26
24
  _endCallback: (evt: EventTypes.InteractionEventType) => void;
27
25
  _dragCallback: (evt: EventTypes.InteractionEventType) => void;
28
- cancel: (element: HTMLDivElement) => any;
26
+ cancel: (element: HTMLDivElement) => string;
29
27
  _activateModify: (element: HTMLDivElement) => void;
30
28
  _deactivateModify: (element: HTMLDivElement) => void;
31
29
  _activateDraw: (element: HTMLDivElement) => void;
@@ -1,14 +1,12 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { AnnotationTool } from '../base';
3
- import { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper } from '../../types';
4
- import { ArrowAnnotation } from '../../types/ToolSpecificAnnotationTypes';
3
+ import type { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper, Annotation } from '../../types';
4
+ import type { ArrowAnnotation } from '../../types/ToolSpecificAnnotationTypes';
5
5
  declare class ArrowAnnotateTool extends AnnotationTool {
6
6
  static toolName: any;
7
- touchDragCallback: any;
8
- mouseDragCallback: any;
9
- _throttledCalculateCachedStats: any;
7
+ _throttledCalculateCachedStats: Function;
10
8
  editData: {
11
- annotation: any;
9
+ annotation: Annotation;
12
10
  viewportIdsToRender: string[];
13
11
  handleIndex?: number;
14
12
  movingTextBox?: boolean;
@@ -27,7 +25,7 @@ declare class ArrowAnnotateTool extends AnnotationTool {
27
25
  touchTapCallback: (evt: EventTypes.TouchTapEventType) => void;
28
26
  doubleClickCallback: (evt: EventTypes.TouchTapEventType) => void;
29
27
  _doneChangingTextCallback(element: any, annotation: any, updatedText: any): void;
30
- cancel: (element: HTMLDivElement) => any;
28
+ cancel: (element: HTMLDivElement) => string;
31
29
  _activateModify: (element: HTMLDivElement) => void;
32
30
  _deactivateModify: (element: HTMLDivElement) => void;
33
31
  _activateDraw: (element: HTMLDivElement) => void;
@@ -1,14 +1,12 @@
1
1
  import type { Types } from '@cornerstonejs/core';
2
2
  import { AnnotationTool } from '../base';
3
- import { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper } from '../../types';
4
- import { BidirectionalAnnotation } from '../../types/ToolSpecificAnnotationTypes';
3
+ import type { EventTypes, ToolHandle, PublicToolProps, ToolProps, SVGDrawingHelper, Annotation } from '../../types';
4
+ import type { BidirectionalAnnotation } from '../../types/ToolSpecificAnnotationTypes';
5
5
  declare class BidirectionalTool extends AnnotationTool {
6
6
  static toolName: any;
7
- touchDragCallback: any;
8
- mouseDragCallback: any;
9
- _throttledCalculateCachedStats: any;
7
+ _throttledCalculateCachedStats: Function;
10
8
  editData: {
11
- annotation: any;
9
+ annotation: Annotation;
12
10
  viewportIdsToRender: string[];
13
11
  handleIndex?: number;
14
12
  movingTextBox: boolean;
@@ -27,7 +25,7 @@ declare class BidirectionalTool extends AnnotationTool {
27
25
  _dragDrawCallback: (evt: EventTypes.InteractionEventType) => void;
28
26
  _dragModifyCallback: (evt: EventTypes.InteractionEventType) => void;
29
27
  _dragModifyHandle: (evt: EventTypes.InteractionEventType) => void;
30
- cancel: (element: HTMLDivElement) => any;
28
+ cancel: (element: HTMLDivElement) => string;
31
29
  _activateDraw: (element: any) => void;
32
30
  _deactivateDraw: (element: any) => void;
33
31
  _activateModify: (element: any) => void;