Captured Field

Defined under the namespace Scandit.Datacapture.Label

LabelField
class LabelField

Added in version 6.5.0

name
get name(): string

Added in version 6.5.0

The field name. Unique within a label, for example barcode-a, or price. The names are defined when defining the label.

type
get type(): LabelFieldType

Added in version 6.5.0

Identifies the type of the captured field type. This either returns LabelFieldType.Barcode, or LabelFieldType.Text. Depending on the type, further information such as captured data is available through the following properties:

predictedLocation
get predictedLocation(): Quadrilateral

Added in version 6.5.0

The location of the captured field inside the image. These coordinates will need to be converted to view coordinates before they can be visualized. When the field’s state is LabelFieldState.Unknown, a quadrilateral with all points set to (0,0) is returned.

state
get state(): LabelFieldState

Added in version 6.5.0

The field state. For fields that have been captured LabelFieldState.Captured is returned. For fields whose location has been predicted, LabelFieldState.Predicted is returned. For fields whose location could not be predicted, LabelFieldState.Unknown is returned.

isRequired
get isRequired(): boolean

Added in version 6.5.0

Whether the captured field is required. This property is false for optional fields.

barcode
get barcode(): Barcode | null

Added in version 6.5.0

The barcode associated to this captured field. This property is null when the type is not equal to LabelFieldType.Barcode.

text
get text(): string | null

Added in version 6.5.0

The text associated to this captured field. This property is null when the type is not equal to LabelFieldType.Text.