import { AnnotationType } from './annotation-type'; import { Class } from './class'; import { DataCreatorType } from './creator'; export declare enum AnnotationReferenceType { Wsi = "wsi" } /** * public interface - defines a base Annotation * concrete Annotation classes should implement an * extended interface of this base interface * * App needs to define a conversion between Annotation API types and * SlideViewer Annotation types * see file: annotation-conversion.ts in demo app for example */ export interface IAnnotation { id?: string | null; createdAt?: Date; updatedAt?: Date; name?: string; description?: string | null; creatorId?: string; creatorType?: DataCreatorType; referenceId?: string; nppCreated?: number; nppViewing?: number[] | null; centroid?: number[] | null; annotationType: AnnotationType; center?: number[]; classes?: Array; referenceType?: string; isLocked?: boolean | null; } /** * public interface - defines a circular Annotation */ export interface IAnnotationCircle extends IAnnotation { radius: number; } /** * public interface - defines a rectangular Annotation */ export interface IAnnotationRectangle extends IAnnotation { coordinates: number[][]; } /** * public interface - defines a polygonal Annotation */ export interface IAnnotationPolygon extends IAnnotation { coordinates: number[][]; } /** * public interface - defines a point Annotation */ export interface IAnnotationPoint extends IAnnotation { coordinates: number[]; } /** * implementation of Annotation interface * sets all base properties via constructor parameter */ export declare class Annotation implements IAnnotation { constructor(opt: Annotation); id?: string; createdAt?: Date; updatedAt?: Date; name?: string; description?: string; creatorId?: string; creatorType?: DataCreatorType; referenceId?: string; nppCreated?: number; nppViewing?: number[]; centroid?: number[]; annotationType: AnnotationType; center?: number[]; classes?: Class[]; referenceType?: string; isLocked?: boolean; } /** * Circle annotation implementation */ export declare class AnnotationCircle extends Annotation { constructor(opt: AnnotationCircle); radius: number; } /** * Rectangle annotation implementation */ export declare class AnnotationRectangle extends Annotation { constructor(opt: AnnotationRectangle); coordinates: number[][]; } /** * Polygon annotation implementation */ export declare class AnnotationPolygon extends Annotation { constructor(opt: AnnotationPolygon); coordinates: number[][]; } /** * Point annotation implementation */ export declare class AnnotationPoint extends Annotation { constructor(opt: AnnotationPoint); coordinates: number[]; } /** * That's for annotation from the api * in certain occasions we need the id * set */ export interface AnnotationEntity extends Annotation { id: string; } export interface AnnotationsWithUpdates { annotations: Annotation[]; updatedAnnotationIds: string[]; }