import type { Types } from '@cornerstonejs/core'; import { AnnotationTool } from './base/index.js'; import type { Annotation, Annotations, EventTypes, InteractionTypes, PublicToolProps, SVGDrawingHelper, ToolHandle, ToolProps } from '../types/index.js'; export type WorldCrosshairJumpMode = 'sliceOnly' | 'centered'; export type WorldCrosshairOffSliceDisplay = 'hide' | 'projected' | 'projectedWithDistance'; export type WorldCrosshairState = { toolGroupId: string; worldPoint: Types.Point3 | null; sourceViewportId?: string; sourceRenderingEngineId?: string; frameOfReferenceUID?: string; visible: boolean; locked: boolean; cursorWorldPoint?: Types.Point3 | null; }; export type WorldCrosshairMarkerStyle = 'crosshair' | 'point'; export type WorldCrosshairToolConfiguration = { pointColor: string; pointRadius: number; markerStyle: WorldCrosshairMarkerStyle; centerGapRadius: number; offSliceDisplay: WorldCrosshairOffSliceDisplay; offSliceToleranceMm: number; autoInitializeOnEnable: boolean; clickToSet: boolean; snapToSlabIntensity: boolean; jumpOnSet: boolean; jumpMode: WorldCrosshairJumpMode; preservePanZoom: boolean; liveUpdateOnShiftMouseMove: boolean; liveJumpOnShiftMouseMove: boolean; showIn2D: boolean; showIn3D: boolean; threeDViewportIds: string[]; threeDLineLengthMm: number; linkPolicy: 'toolGroup' | 'frameOfReferenceUID' | 'explicit'; explicitLinkedViewportIds: string[]; }; export type WorldCrosshairPointChangedEventDetail = { toolGroupId: string; worldPoint: Types.Point3 | null; sourceViewportId?: string; sourceRenderingEngineId?: string; frameOfReferenceUID?: string; }; export type WorldCrosshairAnnotation = Annotation & { data: { handles: { points: Types.Point3[]; }; }; }; declare class WorldCrosshairTool extends AnnotationTool { static toolName: any; static toolLabel: string; private _state; private _annotation; private _isDragging; private _autoInitialized; constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps); setWorldPoint(worldPoint: Types.Point3, options?: { sourceViewportId?: string; sourceRenderingEngineId?: string; frameOfReferenceUID?: string; jump?: boolean; suppressEvents?: boolean; }): void; getWorldPoint(): Types.Point3 | null; clearWorldPoint(options?: { suppressEvents?: boolean; }): void; clearWorldCrosshair(options?: { suppressEvents?: boolean; }): void; jumpLinkedViewportsToWorldPoint(options?: { jumpMode?: WorldCrosshairJumpMode; preservePanZoom?: boolean; }): void; setVisibility(visible: boolean): void; setLocked(locked: boolean): void; getState(): WorldCrosshairState; onSetToolEnabled(): void; onSetToolActive(): void; onSetToolPassive(): void; onSetToolDisabled(): void; addNewAnnotation: (evt: EventTypes.InteractionEventType) => WorldCrosshairAnnotation; toolSelectedCallback: (evt: EventTypes.InteractionEventType, annotation: Annotation) => void; handleSelectedCallback: (evt: EventTypes.InteractionEventType, annotation: Annotation, _handle: ToolHandle, _interactionType?: InteractionTypes) => void; doubleClickCallback: (evt: EventTypes.MouseDoubleClickEventType) => void; mouseMoveCallback: (evt: EventTypes.MouseMoveEventType, filteredToolAnnotations?: Annotations) => boolean; isPointNearTool: (element: HTMLDivElement, _annotation: WorldCrosshairAnnotation, canvasCoords: Types.Point2, proximity: number, _interactionType?: string) => boolean; getHandleNearImagePoint(element: HTMLDivElement, annotation: Annotation, canvasCoords: Types.Point2, proximity: number): ToolHandle | undefined; filterInteractableAnnotationsForElement: (element: HTMLDivElement, annotations: Annotations) => Annotations; cancel: (element: HTMLDivElement) => void; private _startDrag; _dragCallback: (evt: EventTypes.InteractionEventType) => void; _endCallback: (evt: EventTypes.InteractionEventType) => void; renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean; private _maybeAutoInitialize; private _jumpLinkedViewports; private _jumpViewportToPoint; private _get3DViewports; private _update3DLines; private _getMarkerUIDPrefix; private _isPlanarViewport; protected _getViewportsInfo(): Types.IViewportId[]; protected _getLinkedViewports(): Types.IViewport[]; private _isViewportLinked; private _renderLinkedViewports; private _getMarkerCanvasPosition; private _resolveInteractionWorldPoint; private _getSourceSlabThicknessMm; private _getEffectiveOffSliceTolerance; private _syncAnnotation; private _getAnnotationOrDetached; private _getEventDetail; } export default WorldCrosshairTool;