view

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: GPL-3.0, GPL-3.0-or-later Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Id    string
	Label string
}

type Annotations

type Annotations struct {
	BoundingBoxes []BoundingBox
}

type BoundingBox

type BoundingBox struct {
	Id     string
	Label  string
	Color  string
	Xc     float32
	Yc     float32
	Width  float32
	Height float32
}

type Image

type Image struct {
	Reader      io.Reader
	Id          string
	Collection  string
	MIMEType    string
	Annotations Annotations
}

func NewImage

func NewImage(id im.ImageId, reader io.Reader, collection string, mimetype string,
) Image

type ImageInfo

type ImageInfo struct {
	Id         string
	Collection string
	Specs      im.ImageSpecs
}

func NewImageInfo

func NewImageInfo(imageId im.ImageId, collection string, specs im.ImageSpecs) ImageInfo

type ImageLabel

type ImageLabel struct {
	Id    string
	Label string
}

type ScrollerButton

type ScrollerButton struct {
	IsActive   bool
	Text       string
	ImageId    string
	Collection string
}

type ScrollerButtons

type ScrollerButtons struct {
	Next ScrollerButton
	Prev ScrollerButton
}

type View

type View interface {
	SetScroller(ScrollerButtons)
	Error(error)
	AddBox(BoundingBox)
	AddLabel(ImageLabel)
	SetAvailableLabels([]string)
	SetAvailableImageLabels([]string)
	SetImageInfo(ImageInfo)
	SetImage(Image)
	SetAnnotations([]BoundingBox, []ImageLabel)
	UpdateBox(BoundingBox)
	UpdateLabel(Annotation)
	DeleteAnnotation(string)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL