class ProcessImageManualJob extends Job implements ShouldQueue

Traits

Batchable
InteractsWithQueue
SerializesModels
Queueable
Dispatchable

Properties

$tries
int $imageId

ID of the image to process.

int $volumeId

ID of the volume of the image. Required to release the lock if the image was deleted.

Methods

void
__construct(Image $image, Label $label, float $distance, bool $batch = false)

Create a new job instance.

void
handle()

Execute the job.

void
failed(Throwable|null $exception)

Handle a job failure.

void
detect(Image $image)

Perform the laser point detection.

array
getLaserpoints(Image $image)

Collects the laser point annotations of the given image.

void
releaseLock()

Release the lock of a single image detection. The lock of a volume detection is released by the batch.

Details

at line 55
void __construct(Image $image, Label $label, float $distance, bool $batch = false)

Create a new job instance.

Parameters

Image $image

The image to process. Must have the id and volume_id attributes.

Label $label

The laser point label.

float $distance

Distance between laser points im cm to use for computation.

bool $batch

Whether the job is part of a volume detection. Otherwise it releases the image lock when it's finished.

Return Value

void

at line 71
void handle()

Execute the job.

Return Value

void

at line 90
void failed(Throwable|null $exception)

Handle a job failure.

Parameters

Throwable|null $exception

Return Value

void

at line 102
protected void detect(Image $image)

Perform the laser point detection.

Parameters

Image $image

Return Value

void

at line 132
protected array getLaserpoints(Image $image)

Collects the laser point annotations of the given image.

Parameters

Image $image

Return Value

array

Array of annotation coordinates as [x, y] pairs

at line 152
protected void releaseLock()

Release the lock of a single image detection. The lock of a volume detection is released by the batch.

Return Value

void