Skip to main content
Version: 4.1.0

VectorAnnotationStore

Hierarchy

  • RegionStore
    • VectorAnnotationStore

Index

Constructors

constructor

  • new VectorAnnotationStore(backendService: BackendService, fileId: number, activeFrame: FrameStore, controlPoints: Point2D[], regionType: RegionType, regionId?: number, rotation?: number, name?: string, color?: string, lineWidth?: number, dashLength?: number): VectorAnnotationStore
  • Parameters

    • backendService: BackendService
    • fileId: number
    • activeFrame: FrameStore
    • controlPoints: Point2D[]
    • regionType: RegionType
    • regionId: number = -1
    • rotation: number = 0
    • name: string = ""
    • color: string = Colors.TURQUOISE5
    • lineWidth: number = 2
    • dashLength: number = 0

    Returns VectorAnnotationStore

Properties

activeFrame

activeFrame: FrameStore

color

color: string

controlPoints

controlPoints: Point2D[]

coordinate

coordinate: CoordinateMode

creating

creating: boolean

dashLength

dashLength: number

editing

editing: boolean

readonlyfileId

fileId: number

isSimplePolygon

isSimplePolygon: boolean

lineRegionSampleWidth

lineRegionSampleWidth: number = 3

lineWidth

lineWidth: number

locked

locked: boolean = false

publicmodifiedTimestamp

modifiedTimestamp: number

name

name: string

pointerLength

pointerLength: number = 10

pointerWidth

pointerWidth: number = 10

regionId

regionId: number

regionType

regionType: RegionType

rotation

rotation: number

staticreadonlyAVAILABLE_ANNOTATION_TYPES

AVAILABLE_ANNOTATION_TYPES: Map<RegionType, string> = ...

staticreadonlyAVAILABLE_REGION_TYPES

AVAILABLE_REGION_TYPES: Map<RegionType, string> = ...

staticreadonlyMAX_DASH_LENGTH

MAX_DASH_LENGTH: 50 = 50

staticreadonlyMAX_LINE_WIDTH

MAX_LINE_WIDTH: 10 = 10

staticreadonlyMIN_LINE_WIDTH

MIN_LINE_WIDTH: 0.5 = 0.5

staticreadonlyTARGET_VERTEX_COUNT

TARGET_VERTEX_COUNT: 200 = 200

Accessors

boundingBox

  • get boundingBox(): Point2D
  • Returns Point2D

boundingBoxArea

  • get boundingBoxArea(): number
  • Returns number

center

  • get center(): Point2D
  • Returns Point2D

isAnnotation

  • get isAnnotation(): boolean
  • Returns boolean

isClosedRegion

  • get isClosedRegion(): boolean
  • Returns boolean

isPreviewCut

  • get isPreviewCut(): boolean
  • Returns boolean

isTemporary

  • get isTemporary(): boolean
  • Returns boolean

isValid

  • get isValid(): boolean
  • Returns boolean

nameString

  • get nameString(): string
  • Returns string

regionProperties

  • get regionProperties(): string
  • Returns string

size

  • get size(): Point2D
  • Returns Point2D

wcsSize

  • get wcsSize(): Point2D
  • Returns Point2D

Methods

beginCreating

  • beginCreating(): void
  • Returns void

beginEditing

  • beginEditing(): void
  • Returns void

endCreating

  • endCreating(): Generator<Promise<ISetRegionAck>, void, unknown>
  • Returns Generator<Promise<ISetRegionAck>, void, unknown>

endEditing

  • endEditing(): void
  • Returns void

focusCenter

  • focusCenter(): void
  • Returns void

publicgetAnnotationStyles

  • getAnnotationStyles(): { pointerLength: number; pointerWidth: number }
  • Returns { pointerLength: number; pointerWidth: number }

    • pointerLength: number
    • pointerWidth: number

publicgetRegionApproximation

  • getRegionApproximation(astTransform: Mapping): Point2D[] | { eastApproximatePoints: number[]; northApproximatePoints: number[] } | { hypotenuseApproximatePoints: number[]; xApproximatePoints: number[]; yApproximatePoints: number[] }
  • Parameters

    • astTransform: Mapping

    Returns Point2D[] | { eastApproximatePoints: number[]; northApproximatePoints: number[] } | { hypotenuseApproximatePoints: number[]; xApproximatePoints: number[]; yApproximatePoints: number[] }

publicinitializeStyles

  • initializeStyles(annotationStyles: { pointerLength: number; pointerWidth: number }): void
  • Parameters

    • annotationStyles: { pointerLength: number; pointerWidth: number }

    Returns void

setCenter

  • setCenter(p: Point2D, skipUpdate?: boolean): void
  • Parameters

    • p: Point2D
    • skipUpdate: boolean = false

    Returns void

setColor

  • setColor(color: string): void
  • Parameters

    • color: string

    Returns void

setControlPoint

  • setControlPoint(index: number, p: Point2D, skipUpdate?: boolean): void
  • Parameters

    • index: number
    • p: Point2D
    • skipUpdate: boolean = false

    Returns void

setControlPoints

  • setControlPoints(points: Point2D[], skipUpdate?: boolean, shapeChanged?: boolean): void
  • Parameters

    • points: Point2D[]
    • skipUpdate: boolean = false
    • shapeChanged: boolean = true

    Returns void

setCoordinate

  • setCoordinate(coordinate: CoordinateMode): void
  • Parameters

    • coordinate: CoordinateMode

    Returns void

setDashLength

  • setDashLength(dashLength: number): void
  • Parameters

    • dashLength: number

    Returns void

setLineWidth

  • setLineWidth(lineWidth: number): void
  • Parameters

    • lineWidth: number

    Returns void

setLocked

  • setLocked(locked: boolean): void
  • Parameters

    • locked: boolean

    Returns void

setName

  • setName(name: string): void
  • Parameters

    • name: string

    Returns void

setPointerLength

  • setPointerLength(pointerLength: number): void
  • Parameters

    • pointerLength: number

    Returns void

setPointerWidth

  • setPointerWidth(pointerWidth: number): void
  • Parameters

    • pointerWidth: number

    Returns void

setRegionId

  • setRegionId(id: number): void
  • Parameters

    • id: number

    Returns void

setRotation

  • setRotation(angle: number, skipUpdate?: boolean): void
  • Parameters

    • angle: number
    • skipUpdate: boolean = false

    Returns void

setSize

  • setSize(p: Point2D, skipUpdate?: boolean): void
  • Parameters

    • p: Point2D
    • skipUpdate: boolean = false

    Returns void

toggleLock

  • toggleLock(): void
  • Returns void

publicstaticGetRegionProperties

  • GetRegionProperties(regionType: RegionType, controlPoints: Point2D[], rotation: number): string
  • Parameters

    • regionType: RegionType
    • controlPoints: Point2D[]
    • rotation: number

    Returns string

publicstaticIsRegionCustomIcon

  • IsRegionCustomIcon(regionType: RegionType): boolean
  • Parameters

    • regionType: RegionType

    Returns boolean

publicstaticIsRegionDashLengthValid

  • IsRegionDashLengthValid(regionDashLength: number): boolean
  • Parameters

    • regionDashLength: number

    Returns boolean

publicstaticIsRegionLineWidthValid

  • IsRegionLineWidthValid(regionLineWidth: number): boolean
  • Parameters

    • regionLineWidth: number

    Returns boolean

publicstaticIsRegionTypeValid

  • IsRegionTypeValid(regionType: RegionType): boolean
  • Parameters

    • regionType: RegionType

    Returns boolean

publicstaticRegionIconString

  • RegionIconString(regionType: RegionType): IconName | CustomIconName
  • Parameters

    • regionType: RegionType

    Returns IconName | CustomIconName

publicstaticRegionTypeString

  • RegionTypeString(regionType: RegionType): string
  • Parameters

    • regionType: RegionType

    Returns string