import { PanTool, WindowLevelTool, StackScrollTool, StackScrollMouseWheelTool, ZoomTool, VolumeRotateMouseWheelTool, MIPJumpToClickTool, LengthTool, RectangleROITool, EllipticalROITool, BidirectionalTool, ArrowAnnotateTool, DragProbeTool, ProbeTool, AngleTool, CobbAngleTool, PlanarFreehandROITool, MagnifyTool, CrosshairsTool, SegmentationDisplayTool, init, addTool, annotation, ReferenceLinesTool, } from '@cornerstonejs/tools'; export default function initCornerstoneTools(configuration = {}) { init(configuration); addTool(PanTool); addTool(WindowLevelTool); addTool(StackScrollMouseWheelTool); addTool(StackScrollTool); addTool(ZoomTool); addTool(ProbeTool); addTool(VolumeRotateMouseWheelTool); addTool(MIPJumpToClickTool); addTool(LengthTool); addTool(RectangleROITool); addTool(EllipticalROITool); addTool(BidirectionalTool); addTool(ArrowAnnotateTool); addTool(DragProbeTool); addTool(AngleTool); addTool(CobbAngleTool); addTool(PlanarFreehandROITool); addTool(MagnifyTool); addTool(CrosshairsTool); addTool(SegmentationDisplayTool); addTool(ReferenceLinesTool); // Modify annotation tools to use dashed lines on SR const annotationStyle = { textBoxFontSize: '15px', lineWidth: '1.5', }; const defaultStyles = annotation.config.style.getDefaultToolStyles(); annotation.config.style.setDefaultToolStyles({ global: { ...defaultStyles.global, ...annotationStyle, }, }); } const toolNames = { Pan: PanTool.toolName, ArrowAnnotate: ArrowAnnotateTool.toolName, WindowLevel: WindowLevelTool.toolName, StackScroll: StackScrollTool.toolName, StackScrollMouseWheel: StackScrollMouseWheelTool.toolName, Zoom: ZoomTool.toolName, VolumeRotateMouseWheel: VolumeRotateMouseWheelTool.toolName, MipJumpToClick: MIPJumpToClickTool.toolName, Length: LengthTool.toolName, DragProbe: DragProbeTool.toolName, Probe: ProbeTool.toolName, RectangleROI: RectangleROITool.toolName, EllipticalROI: EllipticalROITool.toolName, Bidirectional: BidirectionalTool.toolName, Angle: AngleTool.toolName, CobbAngle: CobbAngleTool.toolName, PlanarFreehandROI: PlanarFreehandROITool.toolName, Magnify: MagnifyTool.toolName, Crosshairs: CrosshairsTool.toolName, SegmentationDisplay: SegmentationDisplayTool.toolName, ReferenceLines: ReferenceLinesTool.toolName, }; export { toolNames };