abstract class PrepareAnnotationsJob extends Job

Traits

SerializesModels
Queueable
Dispatchable

Properties

protected bool $selectTrainingProposals

Set newly converted training proposals as selected.

Methods

Builder
getExistingAnnotationsQuery(int $volumeId, array $restrictLabels = [])

Get the query for the annotations to convert.

__construct(MaiaJob $job)

Create a new instance

Builder
getAnnotationsQuery()

Get the query for the annotations to convert.

bool
hasAnnotations()

Determine if there are any annotations to convert.

convertAnnotations()

Convert all matching annotations to training proposals.

convertAnnotationChunk(Collection $chunk)

Convert a chunk of annotations to training proposals.

string
convertAnnotationPointsToCircle(ImageAnnotation $annotation)

Convert the points of an annotation to the points of a circle.

array
convertPolygonToCirlce(array $points)

Determine the points of a circle from the points of a polygon.

Details

protected Builder getExistingAnnotationsQuery(int $volumeId, array $restrictLabels = [])

Get the query for the annotations to convert.

Parameters

int $volumeId
array $restrictLabels

Return Value

Builder

at line 38
__construct(MaiaJob $job)

Create a new instance

Parameters

MaiaJob $job

at line 48
abstract protected Builder getAnnotationsQuery()

Get the query for the annotations to convert.

Return Value

Builder

at line 55
protected bool hasAnnotations()

Determine if there are any annotations to convert.

Return Value

bool

at line 63
protected convertAnnotations()

Convert all matching annotations to training proposals.

at line 82
convertAnnotationChunk(Collection $chunk)

Convert a chunk of annotations to training proposals.

Must be public to be used as callable.

Parameters

Collection $chunk

at line 107
protected string convertAnnotationPointsToCircle(ImageAnnotation $annotation)

Convert the points of an annotation to the points of a circle.

Parameters

ImageAnnotation $annotation

Return Value

string

JSON encoded points array.

at line 128
protected array convertPolygonToCirlce(array $points)

Determine the points of a circle from the points of a polygon.

Parameters

array $points

Return Value

array