Skip to main content
Version: Next

RegionSetStore

Index

Constructors

constructor

Properties

isHoverImage

isHoverImage: Boolean = false

locked

locked: boolean = false

mode

newRegionType

newRegionType: RegionType

opacity

opacity: number = 1

regions

regions: RegionStore[]

selectedRegion

selectedRegion: RegionStore

Accessors

isNewRegionAnnotation

  • get isNewRegionAnnotation(): boolean
  • Returns boolean

regionList

  • get regionList(): { id: number; type: RegionType }[]
  • Returns an array of region IDs and types in the region set.


    Returns { id: number; type: RegionType }[]

regionMap

  • Returns a map associating region IDs with their corresponding RegionStore instances.


    Returns Map<number, RegionStore>

regionsAndAnnotationsForRender

Methods

addAnnCompassRegion

addAnnEllipticalRegion

  • addAnnEllipticalRegion(center: Point2D, semiMajor: number, semiMinor: number, temporary?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • semiMajor: number
    • semiMinor: number
    • temporary: boolean = false

    Returns RegionStore

addAnnLineRegion

addAnnPointRegion

  • addAnnPointRegion(center: Point2D, shape: PointAnnotationShape, cursorRegion?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • shape: PointAnnotationShape
    • cursorRegion: boolean = false

    Returns RegionStore

addAnnPolygonalRegion

addAnnPolylineRegion

addAnnRectangularRegion

  • addAnnRectangularRegion(center: Point2D, width: number, height: number, temporary?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • width: number
    • height: number
    • temporary: boolean = false

    Returns RegionStore

addAnnRulerRegion

addAnnTextRegion

  • addAnnTextRegion(center: Point2D, width: number, height: number, temporary?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • width: number
    • height: number
    • temporary: boolean = false

    Returns RegionStore

addAnnVectorRegion

addEllipticalRegion

  • addEllipticalRegion(center: Point2D, semiMajor: number, semiMinor: number, temporary?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • semiMajor: number
    • semiMinor: number
    • temporary: boolean = false

    Returns RegionStore

addExistingRegion

  • addExistingRegion(points: Point2D[], rotation: number, regionType: RegionType, regionId: number, name: string, color: string, lineWidth: number, dashes: number[], temporary?: boolean, annotationStyles?: any): RegionStore
  • Parameters

    • points: Point2D[]
    • rotation: number
    • regionType: RegionType
    • regionId: number
    • name: string
    • color: string
    • lineWidth: number
    • dashes: number[]
    • temporary: boolean = true
    • optionalannotationStyles: any

    Returns RegionStore

addLineRegion

addPointRegion

addPolygonalRegion

addPolylineRegion

addRectangularRegion

  • addRectangularRegion(center: Point2D, width: number, height: number, temporary?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • width: number
    • height: number
    • temporary: boolean = false

    Returns RegionStore

addRegionAsync

  • addRegionAsync(regionType: RegionType, points: Point2D[], rotation?: number, regionName?: string): Promise<RegionStore>
  • Adds a new region and returns the corresponding RegionStore object.


    Parameters

    • regionType: RegionType

      Type of the region.

    • points: Point2D[]

      Points defining the shape of the region. For rectangles, ellipses, text annotations, and compass annotations, provide [center, size]; for other types, provide an array of positions.

    • rotation: number = 0

      Rotation angle of the region in degrees. Only applicable for rectangles, ellipses, and text annotations.

    • regionName: string = ""

      Optional name for the region. If it is not provided or is an empty string, a default name will be applied.

    Returns Promise<RegionStore>

    A promise that resolves to the RegionStore object representing the added region.

deleteRegion

deselectRegion

  • deselectRegion(): void
  • Returns void

migrateRegionsFromExistingSet

  • migrateRegionsFromExistingSet(sourceRegionSet: RegionSetStore, spatialTransformAST: Mapping, forward?: boolean): void
  • Parameters

    • sourceRegionSet: RegionSetStore
    • spatialTransformAST: Mapping
    • forward: boolean = false

    Returns void

selectRegion

selectRegionByIndex

  • selectRegionByIndex(index: number): void
  • Parameters

    • index: number

    Returns void

setIsHover

  • setIsHover(bool: boolean): void
  • Parameters

    • bool: boolean

    Returns void

setLocked

  • setLocked(locked?: boolean): void
  • Parameters

    • optionallocked: boolean

    Returns void

setMode

  • setMode(mode: any): void
  • Parameters

    • mode: any

    Returns void

setNewRegionType

  • setNewRegionType(type: RegionType): void
  • Parameters

    • type: RegionType

    Returns void

setOpacity

toggleMode

  • toggleMode(): void
  • Returns void

publicupdateCursorRegionPosition

  • updateCursorRegionPosition(pos: Point2D): void