@saran-ign/react-image-annotate
Version:
An Image Annotate Library for React
55 lines (54 loc) • 2.5 kB
TypeScript
import { AnnotatorToolEnum, Image, MainLayoutState, MainLayoutStateBase, RegionAllowedActions } from '../MainLayout/types';
import { ComponentType, FunctionComponent } from 'react';
import { KeypointsDefinition } from '../types/region-tools.ts';
import { AutosegOptions } from 'autoseg/webworker';
export type AnnotatorProps = {
taskDescription?: string;
allowedArea?: {
x: number;
y: number;
w: number;
h: number;
};
regionTagList?: Array<string>;
regionTagSingleSelection?: boolean;
regionAllowedActions?: Partial<RegionAllowedActions>;
regionClsList?: Array<string | {
id: string;
label: string;
}>;
imageTagList?: Array<string>;
imageClsList?: Array<string>;
classificationTitle?: String;
enabledTools?: Array<AnnotatorToolEnum>;
onRegionClassAdded?: (state: MainLayoutState) => void;
selectedTool?: String;
showTags?: boolean;
selectedImage?: string | number;
images?: Array<Image>;
showPointDistances?: boolean;
pointDistancePrecision?: number;
RegionEditLabel?: ComponentType<any> | FunctionComponent<any> | null;
onExit: (state: MainLayoutState) => void;
videoTime?: number;
videoSrc?: string;
keyframes?: Object;
videoName?: string;
keypointDefinitions?: KeypointsDefinition;
fullImageSegmentationMode?: boolean;
autoSegmentationOptions?: AutosegOptions;
hideHeader?: boolean;
hideHeaderText?: boolean;
hideNext?: boolean;
hidePrev?: boolean;
hideClone?: boolean;
hideSettings?: boolean;
hideFullScreen?: boolean;
hideSave?: boolean;
allowComments?: boolean;
onNextImage?: (state: MainLayoutState) => void;
onPrevImage?: (state: MainLayoutState) => void;
onDeleteRegion?: (state: MainLayoutStateBase) => void;
};
export declare const Annotator: ({ images, allowedArea, selectedImage, showPointDistances, pointDistancePrecision, showTags, enabledTools, selectedTool, regionTagSingleSelection, regionTagList, regionClsList, regionAllowedActions, imageTagList, imageClsList, keyframes, taskDescription, fullImageSegmentationMode, RegionEditLabel, videoSrc, videoTime, videoName, onExit, onNextImage, onPrevImage, keypointDefinitions, autoSegmentationOptions, hideHeader, hideHeaderText, hideNext, hidePrev, hideClone, hideSettings, hideFullScreen, hideSave, allowComments, classificationTitle }: AnnotatorProps) => import("react/jsx-runtime").JSX.Element;
export default Annotator;