import { Coords, EventData, HandlePosition, MeasurementMouseEvent, TPAAnnotation, TPAMeasurementState } from "../types"; declare const BaseAnnotationTool: any; export default class TPAAnnotationTool extends BaseAnnotationTool { private currentState; private currentAnnotation; private isDragging; constructor(props?: any); createNewMeasurement(eventData: EventData): { visible: boolean; active: boolean; color: undefined; invalidated: boolean; handles: { ftaStart: { x: number; y: number; highlight: boolean; active: boolean; }; ftaEnd: { x: number; y: number; highlight: boolean; active: boolean; }; mtpStart: { x: number; y: number; highlight: boolean; active: boolean; }; mtpEnd: { x: number; y: number; highlight: boolean; active: boolean; }; refStart: { x: number; y: number; highlight: boolean; active: boolean; }; refEnd: { x: number; y: number; highlight: boolean; active: boolean; }; intersectionPoint: { x: number; y: number; }; ftaTextBox: { active: boolean; hasMoved: boolean; movesIndependently: boolean; drawnIndependently: boolean; allowedOutsideImage: boolean; hasBoundingBox: boolean; x: number; y: number; }; mtpTextBox: { active: boolean; hasMoved: boolean; movesIndependently: boolean; drawnIndependently: boolean; allowedOutsideImage: boolean; hasBoundingBox: boolean; x: number; y: number; }; refTextBox: { active: boolean; hasMoved: boolean; movesIndependently: boolean; drawnIndependently: boolean; allowedOutsideImage: boolean; hasBoundingBox: boolean; x: number; y: number; }; tpaTextBox: { active: boolean; hasMoved: boolean; movesIndependently: boolean; drawnIndependently: boolean; allowedOutsideImage: boolean; hasBoundingBox: boolean; x: number; y: number; }; }; cachedStats: { tpaAngle: number; ftaLength: number; mtpLength: number; }; measurementState: TPAMeasurementState; } | null; addNewMeasurement(evt: MeasurementMouseEvent): TPAAnnotation | null; mouseMoveCallback(evt: MeasurementMouseEvent): void; mouseDragCallback(evt: MeasurementMouseEvent): void; /** * Extracted logic to finalize the Functional Tibial Axis (Step 1) */ private _finishFTA; /** * Extracted logic to finalize the Medial Tibial Plateau (Step 2) */ private _finishMTP; preMouseDownCallback(evt: MeasurementMouseEvent): void; mouseUpCallback(evt: MeasurementMouseEvent): void; /** * Computes the intersection point of the infinite MTP line with the * infinite FTA line using parametric line-line intersection. * */ computeLineLineIntersection(p1: Coords, d1: Coords, // FTA: point + direction p2: Coords, d2: Coords): Coords | null; computeReferenceLineAndAngle(data: any): void; updateCachedStats(image: any, element: HTMLElement, data: any): any; renderToolData(evt: MeasurementMouseEvent): void; /** * The arc sweeps from the Reference Line direction to the MTP direction */ drawAngleArc(context: CanvasRenderingContext2D, element: HTMLElement, handles: any, cachedStats: any, color: string): void; pointNearTool(element: HTMLElement, data: any, coords: Coords, interactionType: string): boolean; isPointNearHandle(element: HTMLElement, handle: HandlePosition, coords: Coords, PROXIMITY_DISTANCE: number): boolean; isPointNearLine(element: HTMLElement, startHandle: HandlePosition, endHandle: HandlePosition, coords: Coords, PROXIMITY_DISTANCE: number): boolean; PROXIMITY_DISTANCEToLineSegment(point: Coords, lineStart: Coords, lineEnd: Coords): number; getHandleNearImagePoint(element: HTMLElement, data: any, coords: Coords, interactionType: string): any; } export {};