Skip to main content
Version: 4.1.0

RegionSetStore

Index

Constructors

constructor

  • new RegionSetStore(frame: FrameStore, preference: PreferenceStore, backendService: BackendService): RegionSetStore
  • Parameters

    • frame: FrameStore
    • preference: PreferenceStore
    • backendService: BackendService

    Returns RegionSetStore

Properties

isHoverImage

isHoverImage: Boolean = false

locked

locked: boolean = false

mode

mode: RegionMode

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

  • get regionMap(): Map<number, RegionStore>
  • Returns a map associating region IDs with their corresponding RegionStore instances.


    Returns Map<number, RegionStore>

regionsAndAnnotationsForRender

  • get regionsAndAnnotationsForRender(): RegionStore[]
  • Returns RegionStore[]

Methods

addAnnCompassRegion

  • addAnnCompassRegion(point: Point2D, length: number, temporary?: boolean): RegionStore
  • Parameters

    • point: Point2D
    • length: number
    • temporary: boolean = false

    Returns RegionStore

addAnnEllipticalRegion

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

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

    Returns RegionStore

addAnnLineRegion

  • addAnnLineRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

addAnnPointRegion

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

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

    Returns RegionStore

addAnnPolygonalRegion

  • addAnnPolygonalRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

addAnnPolylineRegion

  • addAnnPolylineRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

addAnnRectangularRegion

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

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

    Returns RegionStore

addAnnRulerRegion

  • addAnnRulerRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

addAnnTextRegion

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

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

    Returns RegionStore

addAnnVectorRegion

  • addAnnVectorRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

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

  • addLineRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

addPointRegion

  • addPointRegion(center: Point2D, cursorRegion?: boolean): RegionStore
  • Parameters

    • center: Point2D
    • cursorRegion: boolean = false

    Returns RegionStore

addPolygonalRegion

  • addPolygonalRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

addPolylineRegion

  • addPolylineRegion(points: Point2D[], temporary?: boolean): RegionStore
  • Parameters

    • points: Point2D[]
    • temporary: boolean = false

    Returns RegionStore

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

  • deleteRegion(region: RegionStore): void
  • Parameters

    • region: RegionStore

    Returns void

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

  • selectRegion(region: RegionStore): void
  • Parameters

    • region: RegionStore

    Returns void

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

  • setOpacity(opacity: RegionsOpacity): void
  • Parameters

    • opacity: RegionsOpacity

    Returns void

toggleMode

  • toggleMode(): void
  • Returns void

publicupdateCursorRegionPosition

  • updateCursorRegionPosition(pos: Point2D): void
  • Parameters

    • pos: Point2D

    Returns void