import { AnnotationTool } from './base'; import type { Types } from '@cornerstonejs/core'; import type { Annotation, Annotations, EventTypes, ToolHandle, PublicToolProps, ToolProps, InteractionTypes, SVGDrawingHelper } from '../types'; import { type ClippingPlane } from '../utilities/volumeCropping'; type ReferenceLine = [ viewport: { id: string; canvas?: HTMLCanvasElement; canvasToWorld?: (...args: unknown[]) => Types.Point3; }, startPoint: Types.Point2, endPoint: Types.Point2, type: 'min' | 'max', planeIndex?: number ]; interface VolumeCroppingAnnotation extends Annotation { data: { handles: { activeOperation: number | null; activeType?: 'min' | 'max'; activePlaneIndex?: number; clippingPlanes: ClippingPlane[]; }; activeViewportIds: string[]; viewportId: string; referenceLines: ReferenceLine[]; orientation?: string; }; } declare class VolumeCroppingControlTool extends AnnotationTool { static toolName: any; seriesInstanceUID?: string; clippingPlanes: ClippingPlane[]; _getReferenceLineColor?: (viewportId: string) => string; _getReferenceLineControllable?: (viewportId: string) => boolean; constructor(toolProps?: PublicToolProps, defaultToolProps?: ToolProps); initializeViewport: ({ renderingEngineId, viewportId, }: Types.IViewportId) => void; _getViewportsInfo: () => any[]; onSetToolInactive(): void; onSetToolActive(): void; onSetToolEnabled(): void; onSetToolDisabled(): void; resetCroppingSpheres: () => void; _initializeViewports: (viewportsInfo: Types.IViewportId[]) => void; _syncWithVolumeCroppingTool(originalClippingPlanes: ClippingPlane[]): void; addNewAnnotation(evt: EventTypes.InteractionEventType): VolumeCroppingAnnotation; cancel: () => void; isPointNearTool: (element: HTMLDivElement, annotation: VolumeCroppingAnnotation, canvasCoords: Types.Point2, proximity: number) => boolean; toolSelectedCallback: (evt: EventTypes.InteractionEventType, annotation: Annotation, interactionType: InteractionTypes) => void; handleSelectedCallback(evt: EventTypes.InteractionEventType, annotation: Annotation, handle: ToolHandle, interactionType: InteractionTypes): void; onResetCamera: (evt: any) => void; mouseMoveCallback: (evt: EventTypes.MouseMoveEventType, filteredToolAnnotations: Annotations) => boolean; filterInteractableAnnotationsForElement: (element: any, annotations: any) => any; renderAnnotation: (enabledElement: Types.IEnabledElement, svgDrawingHelper: SVGDrawingHelper) => boolean; _getAnnotations: (enabledElement: Types.IEnabledElement) => Annotation[]; _onSphereMoved: (evt: any) => void; _onNewVolume: () => void; _unsubscribeToViewportNewVolumeSet(viewportsInfo: any): void; _subscribeToViewportNewVolumeSet(viewports: any): void; _activateModify: (element: any) => void; _deactivateModify: (element: any) => void; _endCallback: (evt: EventTypes.InteractionEventType) => void; _dragCallback: (evt: EventTypes.InteractionEventType) => void; _pointNearTool(element: any, annotation: any, canvasCoords: any, proximity: any): boolean; } export default VolumeCroppingControlTool;