Class: ImageRegion

May 7, 2024 · View on GitHub

@frameright/image-display-control-metadata-parserDocs


@frameright/image-display-control-metadata-parser / ImageRegion

Class: ImageRegion

Contents

Properties

id

id: string = ''

Identifier for the region. Unique within the image.

Source

ImageRegion.ts:43


names

names: string[] = []

Names for the region, possibly in multiple languages.

Source

ImageRegion.ts:48


shape

shape: string = ''

Region shape, can be rectangle, circle or polygon.

Source

ImageRegion.ts:53


types?

optional types: string[]

Region types, see https://cv.iptc.org/newscodes/imageregiontype/

Source

ImageRegion.ts:58


roles?

optional roles: string[]

Region roles, see https://cv.iptc.org/newscodes/imageregionrole/

Source

ImageRegion.ts:63


unit

unit: string = ''

Unit used for x, y, width, height, radius and vertices. Can be relative or pixel, see https://iptc.org/std/photometadata/specification/IPTC-PhotoMetadata#boundary-measuring-unit

Source

ImageRegion.ts:70


imageWidth?

optional imageWidth: number

Original/full image width. Reference width to be used as a base for x, width, radius and vertices/x when unit is pixel. See https://docs.frameright.io/web-component/attribute-ref

Source

ImageRegion.ts:77


imageHeight?

optional imageHeight: number

Original/full image width. Reference width to be used as a base for y, height and vertices/y when unit is pixel. See https://docs.frameright.io/web-component/attribute-ref

Source

ImageRegion.ts:84


x?

optional x: number

Coordinates of a rectangle or circle region.

Source

ImageRegion.ts:89


y?

optional y: number

Coordinates of a rectangle or circle region.

Source

ImageRegion.ts:94


width?

optional width: number

Width of a rectangle region.

Source

ImageRegion.ts:99


height?

optional height: number

Height of a rectangle region.

Source

ImageRegion.ts:104


radius?

optional radius: number

Radius of a circle region.

Source

ImageRegion.ts:109


vertices?

optional vertices: Vertex[]

Vertices/corners of a polygon region.

Source

ImageRegion.ts:114


idcRegionDefinitionId?

optional idcRegionDefinitionId: string

Identifier for the region definition.

Source

ImageRegion.ts:119


idcRegionDefinitionName?

optional idcRegionDefinitionName: string

Name for the region definition.

Source

ImageRegion.ts:124

Methods

matches()

matches(shapeFilter, roleFilter): boolean

Parameters

shapeFilter: ShapeFilter

roleFilter: RoleFilter

Returns

boolean

true if the region matches the given shape and role filters.

Source

ImageRegion.ts:33