Skip to main content
Version: Next

CompassAnnotationStore

Hierarchy

Index

Constructors

constructor

  • new CompassAnnotationStore(backendService: BackendService, fileId: number, activeFrame: FrameStore, controlPoints: Point2D[], regionType: RegionType, regionId?: number, rotation?: number, name?: string, color?: string, lineWidth?: number, dashLength?: number): CompassAnnotationStore
  • 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 CompassAnnotationStore

Properties

activeFrame

activeFrame: FrameStore

color

color: string

controlPoints

controlPoints: Point2D[]

coordinate

coordinate: CoordinateMode

creating

creating: boolean

dashLength

dashLength: number

eastArrowhead

eastArrowhead: boolean = true

eastLabel

eastLabel: string = "E"

eastTextOffset

eastTextOffset: Point2D = ...

editing

editing: boolean

readonlyfileId

fileId: number

font

font: Font = Font.HELVETICA

fontSize

fontSize: number = 20

fontStyle

fontStyle: FontStyle = FontStyle.NORMAL

isSimplePolygon

isSimplePolygon: boolean

length

length: number = 100

lineRegionSampleWidth

lineRegionSampleWidth: number = 3

lineWidth

lineWidth: number

locked

locked: boolean = false

publicmodifiedTimestamp

modifiedTimestamp: number

name

name: string

northArrowhead

northArrowhead: boolean = true

northLabel

northLabel: string = "N"

northTextOffset

northTextOffset: Point2D = ...

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

  • Returns Point2D

boundingBoxArea

  • get boundingBoxArea(): number
  • Returns number

center

  • 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

  • Returns the sizes of regions and annotations. For line regions and annotations, vector annotations, and ruler annotations, returns x and y absolute displacements.


    Returns Point2D

    The x and y size components.

wcsSize

  • 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(): { eastTextOffset: Point2D; font: Font; fontSize: number; fontStyle: FontStyle; isEastArrow: boolean; isNorthArrow: boolean; length: number; northTextOffset: Point2D; pointerLength: number; pointerWidth: number; textLabel0: string; textLabel1: string }
  • Returns { eastTextOffset: Point2D; font: Font; fontSize: number; fontStyle: FontStyle; isEastArrow: boolean; isNorthArrow: boolean; length: number; northTextOffset: Point2D; pointerLength: number; pointerWidth: number; textLabel0: string; textLabel1: string }

    • eastTextOffset: Point2D
    • font: Font
    • fontSize: number
    • fontStyle: FontStyle
    • isEastArrow: boolean
    • isNorthArrow: boolean
    • length: number
    • northTextOffset: Point2D
    • pointerLength: number
    • pointerWidth: number
    • textLabel0: string
    • textLabel1: string

publicgetAnnotationStylesForExport

  • getAnnotationStylesForExport(): { coordinateSystem: string; font: Font; fontSize: number; fontStyle: FontStyle; isEastArrow: boolean; isNorthArrow: boolean; textLabel0: string; textLabel1: string }
  • Returns { coordinateSystem: string; font: Font; fontSize: number; fontStyle: FontStyle; isEastArrow: boolean; isNorthArrow: boolean; textLabel0: string; textLabel1: string }

    • coordinateSystem: string
    • font: Font
    • fontSize: number
    • fontStyle: FontStyle
    • isEastArrow: boolean
    • isNorthArrow: boolean
    • textLabel0: string
    • textLabel1: string

publicgetCompassApproximation

  • getCompassApproximation(wcsInfo: FrameSet, spatiallyMatched?: boolean, spatialTransform?: Mapping): { eastApproximatePoints: number[]; northApproximatePoints: number[] }
  • Parameters

    • wcsInfo: FrameSet
    • optionalspatiallyMatched: boolean
    • optionalspatialTransform: Mapping

    Returns { eastApproximatePoints: number[]; northApproximatePoints: number[] }

    • eastApproximatePoints: number[]
    • northApproximatePoints: number[]

publicgetRegionApproximation

  • getRegionApproximation(astTransform: Mapping): Point2D[]
  • Parameters

    • astTransform: Mapping

    Returns Point2D[]

publicinitializeStyles

  • initializeStyles(annotationStyles: { eastTextOffset: Point2D; font: Font; fontSize: number; fontStyle: FontStyle; isEastArrow: boolean; isNorthArrow: boolean; length: number; northTextOffset: Point2D; pointerLength: number; pointerWidth: number; textLabel0: string; textLabel1: string }): void
  • Parameters

    • annotationStyles: { eastTextOffset: Point2D; font: Font; fontSize: number; fontStyle: FontStyle; isEastArrow: boolean; isNorthArrow: boolean; length: number; northTextOffset: Point2D; pointerLength: number; pointerWidth: number; textLabel0: string; textLabel1: string }

    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

  • Parameters

    Returns void

setDashLength

  • setDashLength(dashLength: number): void
  • Parameters

    • dashLength: number

    Returns void

setEastArrowhead

  • setEastArrowhead(eastArrowhead: boolean): void
  • Parameters

    • eastArrowhead: boolean

    Returns void

setEastTextOffset

  • setEastTextOffset(offset: number, isX: boolean, skipTimeStampUpdate?: boolean): void
  • Parameters

    • offset: number
    • isX: boolean
    • skipTimeStampUpdate: boolean = false

    Returns void

setFont

  • setFont(font: Font): void
  • Parameters

    Returns void

setFontSize

  • setFontSize(fontSize: number): void
  • Parameters

    • fontSize: number

    Returns void

setFontStyle

  • setFontStyle(fontStyle: string): void
  • Parameters

    • fontStyle: string

    Returns void

setLabel

  • setLabel(label: string, isNorth: boolean): void
  • Parameters

    • label: string
    • isNorth: boolean

    Returns void

setLength

  • setLength(length: number, skipUpdate?: boolean): void
  • Parameters

    • length: number
    • skipUpdate: boolean = false

    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

setNorthArrowhead

  • setNorthArrowhead(northArrowhead: boolean): void
  • Parameters

    • northArrowhead: boolean

    Returns void

setNorthTextOffset

  • setNorthTextOffset(offset: number, isX: boolean, skipTimeStampUpdate?: boolean): void
  • Parameters

    • offset: number
    • isX: boolean
    • skipTimeStampUpdate: boolean = false

    Returns void

setPointerLength

  • setPointerLength(length: number): void
  • Parameters

    • length: number

    Returns void

setPointerWidth

  • setPointerWidth(width: number): void
  • Parameters

    • width: 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
  • Sets the size for regions and annotations


    Parameters

    • p: Point2D

      Specifies the x and y size components. For line regions and annotations, vector annotations, and ruler annotations, the function sets the new start and end positions while keeping the rotation within the same quadrant.

    • skipUpdate: boolean = false

      Whether to update the changes with the backend.

    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): any
  • Parameters

    • regionType: RegionType

    Returns any

publicstaticRegionTypeString

  • RegionTypeString(regionType: RegionType): string
  • Parameters

    • regionType: RegionType

    Returns string