annotator

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: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotator

type Annotator struct {
	// contains filtered or unexported fields
}

func NewAnnotator

func NewAnnotator(scroller scr.Interface, imageMetaReader imread.Interface,
	boxAdder addbox.Interface, boxUpdater updbox.Interface, annotationDeleter del.Interface,
	labelFetcher fetchlbl.Interface, labelUpdater updlbl.Interface, imageLabelAdder addlbl.Interface,
	presenter p.Presenter) *Annotator

func (*Annotator) AddBox

func (a *Annotator) AddBox(ctx context.Context, r addbox.Request, view v.View)

func (*Annotator) AddLabel

func (a *Annotator) AddLabel(ctx context.Context, r addlbl.Request, view v.View)

func (*Annotator) DeleteAnnotation

func (a *Annotator) DeleteAnnotation(ctx context.Context, r del.Request, view v.View)

func (*Annotator) Init

func (a *Annotator) Init(ctx context.Context, imageId string, collection string, view v.View)

func (*Annotator) UpdateBox

func (a *Annotator) UpdateBox(ctx context.Context, r updbox.Request, view v.View)

func (*Annotator) UpdateLabel

func (a *Annotator) UpdateLabel(ctx context.Context, r updlbl.Request, view v.View)

type FakeAnnotationDeleter

type FakeAnnotationDeleter struct {
	Returns del.Response
}

func (*FakeAnnotationDeleter) Execute

type FakeBoxAdder

type FakeBoxAdder struct {
	Returns an.BoundingBox
}

func (*FakeBoxAdder) Execute

type FakeBoxUpdater

type FakeBoxUpdater struct {
	Returns *updbox.Response
}

func (*FakeBoxUpdater) Execute

type FakeImageReader

type FakeImageReader struct {
	Return *im.Image
}

func (*FakeImageReader) Execute

func (b *FakeImageReader) Execute(r imread.Request, o imread.OutputPort)

type FakeLabelAdder

type FakeLabelAdder struct {
	Returns addlbl.Response
}

func (*FakeLabelAdder) Execute

type FakeLabelFetcher

type FakeLabelFetcher struct{}

func (*FakeLabelFetcher) Execute

func (f *FakeLabelFetcher) Execute(ctx context.Context, o fetchlbl.OutputPort)

type FakeLabelUpdater

type FakeLabelUpdater struct {
}

func (*FakeLabelUpdater) Execute

type FakeScroller

type FakeScroller struct {
	Err       error
	ErrOnInit bool
	IsInit    bool
}

func (*FakeScroller) Init

func (s *FakeScroller) Init(imageId string, opts ...scr.Option) (*scr.ScrollerState, error)

type FakeView

type FakeView struct {
	GotScrollerButtons       *v.ScrollerButtons
	GotErr                   error
	AddedBox                 *v.BoundingBox
	AddedImageLabel          *v.ImageLabel
	GotImage                 *v.Image
	GotImageInfo             *v.ImageInfo
	GotAvailableRegionLabels *[]string
	GotAvailableImageLabels  *[]string
	GotAnnotationIds         *[]string
	RemovedAnnotationId      *string
	UpdatedBoxId             *string
	UpdatedAnnotation        *v.Annotation
}

func (*FakeView) AddBox

func (s *FakeView) AddBox(box v.BoundingBox)

func (*FakeView) AddLabel

func (s *FakeView) AddLabel(l v.ImageLabel)

func (*FakeView) DeleteAnnotation

func (s *FakeView) DeleteAnnotation(id string)

func (*FakeView) Error

func (s *FakeView) Error(error)

func (*FakeView) SetAnnotations

func (s *FakeView) SetAnnotations(boxes []v.BoundingBox, labels []v.ImageLabel)

func (*FakeView) SetAvailableImageLabels

func (s *FakeView) SetAvailableImageLabels(l []string)

func (*FakeView) SetAvailableLabels

func (s *FakeView) SetAvailableLabels(l []string)

func (*FakeView) SetImage

func (s *FakeView) SetImage(i v.Image)

func (*FakeView) SetImageInfo

func (s *FakeView) SetImageInfo(i v.ImageInfo)

func (*FakeView) SetScroller

func (s *FakeView) SetScroller(buttons v.ScrollerButtons)

func (*FakeView) UpdateBox

func (s *FakeView) UpdateBox(b v.BoundingBox)

func (*FakeView) UpdateLabel

func (s *FakeView) UpdateLabel(a v.Annotation)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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