Class: ImageRegion
May 7, 2024 · View on GitHub
@frameright/image-display-control-metadata-parser • Docs
@frameright/image-display-control-metadata-parser / ImageRegion
Class: ImageRegion
Contents
Properties
id
id:
string=''
Identifier for the region. Unique within the image.
Source
names
names:
string[] =[]
Names for the region, possibly in multiple languages.
Source
shape
shape:
string=''
Region shape, can be rectangle, circle or polygon.
Source
types?
optionaltypes:string[]
Region types, see https://cv.iptc.org/newscodes/imageregiontype/
Source
roles?
optionalroles:string[]
Region roles, see https://cv.iptc.org/newscodes/imageregionrole/
Source
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
imageWidth?
optionalimageWidth: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
imageHeight?
optionalimageHeight: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
x?
optionalx:number
Coordinates of a rectangle or circle region.
Source
y?
optionaly:number
Coordinates of a rectangle or circle region.
Source
width?
optionalwidth:number
Width of a rectangle region.
Source
height?
optionalheight:number
Height of a rectangle region.
Source
radius?
optionalradius:number
Radius of a circle region.
Source
vertices?
optionalvertices:Vertex[]
Vertices/corners of a polygon region.
Source
idcRegionDefinitionId?
optionalidcRegionDefinitionId:string
Identifier for the region definition.
Source
idcRegionDefinitionName?
optionalidcRegionDefinitionName:string
Name for the region definition.
Source
Methods
matches()
matches(
shapeFilter,roleFilter):boolean
Parameters
• shapeFilter: ShapeFilter
• roleFilter: RoleFilter
Returns
boolean
true if the region matches the given shape and role filters.