class Volume extendsVolume

Extends the base Biigle volume.

Traits

Constants

FILE_REGEX

Regular expression that matches the supported image file extensions.

This regex allows optional HTTP query parameters after the file names, too. Example "image.jpg?raw=1". This may be required for remote images with services like Dropbox.

MIN_DELPHI_IMAGES

Minimum number of manually annotated images required for Delphi laser point detection.

Properties

protectedarray $hidden The attributes hidden from the model's JSON form. from Volume
protectedarray $casts The attributes that should be casted to native types. from Volume
protectedarray $appends The accessors to append to the model's array form. from Volume

Methods

setJsonAttr(string$key,mixed$value,string$attrs ='attrs')

Set a dynamic JSON attribute.

mixed
getJsonAttr(string$key,mixed$default =null,string$attrs ='attrs')

Get a dynamic JSON attribute.

static array
parseImagesQueryString(string$string)

Parses a comma separated list of image filenames to an array.

from Volume
Builder
scopeAccessibleBy(Builder$query,User$user)

Scope a query to all volumes that are accessible by a user.

from Volume
BelongsTo
creator()

The user that created the volume.

from Volume
BelongsTo
mediaType()

The media type of this volume.

from Volume
void
setMediaType(MediaType$mediaType)

Sets the media type of this volume.

from Volume
void
setMediaTypeId(int$id)

Sets the media type of this volume to the media type with the given ID.

from Volume
HasMany
images()

The images belonging to this volume.

from Volume
HasMany
orderedImages()

The images belonging to this volume ordered by filename (ascending).

from Volume
Builder
users()

Return a query for all users associated to this volume through projects.

from Volume
BelongsToMany
projects()

The project(s), this volume belongs to.

from Volume
HasMany
annotationSessions()

The annotation sessions of this volume.

from Volume
HasOne
activeAnnotationSession()

The active annotation sessions of this volume (if any).

from Volume
getActiveAnnotationSession(User$user)

Returns the active annotation session of this volume for the given user.

from Volume
bool
hasConflictingAnnotationSession(AnnotationSession$session)

Check if the given annotation session is in conflict with existing ones.

from Volume
bool
isRemote()

Check if the images of this volume come from a remote URL.

from Volume
getThumbnailAttribute()

An image that can be used a unique thumbnail for this volume.

from Volume
string
getThumbnailUrlAttribute()

URL to the thumbnail image of this volume.

from Volume
Collection
getThumbnailsAttribute()

Several images that can be used for the preview thumbnail of a volume.

from Volume
array
getThumbnailsUrlAttribute()

URLs to the thumbnail images of this volume.

from Volume
flushThumbnailCache()

Flush the cache that stores the volume thumbnail.

from Volume
bool
hasGeoInfo()

Check if the volume has some images with GPS coordinates.

from Volume
flushGeoInfoCache()

Flush the cached information if this volume has images with GPS coordinates.

from Volume
setUrlAttribute(string$value)

Set the url attribute of this volume.

from Volume
setVideoLinkAttribute(string$value)

Set the video_link attribute of this volume.

from Volume
string
getVideoLinkAttribute()

Get the video_link attribute of this volume.

from Volume
setGisLinkAttribute(string$value)

Set the gis_link attribute of this volume.

from Volume
string
getGisLinkAttribute()

Get the gis_link attribute of this volume.

from Volume
setDoiAttribute(string$value)

Set the doi attribute of this volume.

from Volume
string
getDoiAttribute()

Get the doi attribute of this volume.

from Volume
bool
hasTiledImages()

Check if the there are tiled images in this volume.

from Volume
Filtered
filterInvalidLaserPoints($annotations)

Removes items from the annotations array if the laser point annotations are invalid.

static Volume
convert(Volume$volume)

Converts a regular Biigle volume to a Laserpoints volume.

readyForDelphiDetection(Label$label)

Determines if the images of this volume can be processed with Delphi.

bool
hasDetectedLaserpoints()

Determines whether there are images with automatically detected laser points in this volume.

Details

protected setJsonAttr(string$key,mixed$value,string$attrs ='attrs')

Set a dynamic JSON attribute.

Parameters

string $key Key of the attribute in the JSON.
mixed $value Value of the attribute in the JSON.
string $attrs Name of the JSON column of the model.

protectedmixed getJsonAttr(string$key,mixed$default =null,string$attrs ='attrs')

Get a dynamic JSON attribute.

Parameters

string $key Key of the attribute in the JSON.
mixed $default Default value.
string $attrs Name of the JSON column of the model.

Return Value

mixed

inVolumeat line64
staticarray parseImagesQueryString(string$string)

Parses a comma separated list of image filenames to an array.

Parameters

string $string

Return Value

array

inVolumeat line77
Builder scopeAccessibleBy(Builder$query,User$user)

Scope a query to all volumes that are accessible by a user.

Parameters

Builder $query
User $user

Return Value

Builder

inVolumeat line97
BelongsTo creator()

The user that created the volume.

Return Value

BelongsTo

inVolumeat line107
BelongsTo mediaType()

The media type of this volume.

Return Value

BelongsTo

inVolumeat line118
void setMediaType(MediaType$mediaType)

Sets the media type of this volume.

Parameters

MediaType $mediaType

Return Value

void

inVolumeat line129
void setMediaTypeId(int$id)

Sets the media type of this volume to the media type with the given ID.

Parameters

int $id media type ID

Return Value

void

inVolumeat line143
HasMany images()

The images belonging to this volume.

Return Value

HasMany

inVolumeat line153
HasMany orderedImages()

The images belonging to this volume ordered by filename (ascending).

Return Value

HasMany

inVolumeat line163
Builder users()

Return a query for all users associated to this volume through projects.

Return Value

Builder

inVolumeat line182
BelongsToMany projects()

The project(s), this volume belongs to.

Return Value

BelongsToMany

inVolumeat line192
HasMany annotationSessions()

The annotation sessions of this volume.

Return Value

HasMany

inVolumeat line202
HasOne activeAnnotationSession()

The active annotation sessions of this volume (if any).

Return Value

HasOne

inVolumeat line222
AnnotationSession getActiveAnnotationSession(User$user)

Returns the active annotation session of this volume for the given user.

An annotation session may be active for a volume but it is only also active for a user, if the user belongs to the set of restricted users of the annotation session.

Parameters

User $user

Return Value

AnnotationSession

inVolumeat line242
bool hasConflictingAnnotationSession(AnnotationSession$session)

Check if the given annotation session is in conflict with existing ones.

A conflict exists if the active time period of two sessions overlaps.

Parameters

AnnotationSession $session The annotation session to check

Return Value

bool

inVolumeat line271
bool isRemote()

Check if the images of this volume come from a remote URL.

Return Value

bool

inVolumeat line281
Image getThumbnailAttribute()

An image that can be used a unique thumbnail for this volume.

Return Value

Image

inVolumeat line293
string getThumbnailUrlAttribute()

URL to the thumbnail image of this volume.

Return Value

string

inVolumeat line303
Collection getThumbnailsAttribute()

Several images that can be used for the preview thumbnail of a volume.

Return Value

Collection

inVolumeat line327
array getThumbnailsUrlAttribute()

URLs to the thumbnail images of this volume.

Return Value

array

inVolumeat line337
flushThumbnailCache()

Flush the cache that stores the volume thumbnail.

inVolumeat line347
bool hasGeoInfo()

Check if the volume has some images with GPS coordinates.

Return Value

bool

inVolumeat line357
flushGeoInfoCache()

Flush the cached information if this volume has images with GPS coordinates.

inVolumeat line370
setUrlAttribute(string$value)

Set the url attribute of this volume.

Parameters

string $value

inVolumeat line380
setVideoLinkAttribute(string$value)

Set the video_link attribute of this volume.

Parameters

string $value

inVolumeat line390
string getVideoLinkAttribute()

Get the video_link attribute of this volume.

Return Value

string

inVolumeat line400
setGisLinkAttribute(string$value)

Set the gis_link attribute of this volume.

Parameters

string $value

inVolumeat line410
string getGisLinkAttribute()

Get the gis_link attribute of this volume.

Return Value

string

inVolumeat line420
setDoiAttribute(string$value)

Set the doi attribute of this volume.

Parameters

string $value

inVolumeat line434
string getDoiAttribute()

Get the doi attribute of this volume.

Return Value

string

inVolumeat line444
bool hasTiledImages()

Check if the there are tiled images in this volume.

Return Value

bool

Filtered filterInvalidLaserPoints($annotations)

Removes items from the annotations array if the laser point annotations are invalid.

Parameters

$annotations

Return Value

Filtered points array

at line34
staticVolume convert(Volume$volume)

Converts a regular Biigle volume to a Laserpoints volume.

Parameters

Volume $volume Regular Biigle volume instance

Return Value

Volume

at line50
readyForDelphiDetection(Label$label)

Determines if the images of this volume can be processed with Delphi.

Parameters

Label $label The laser point label.

Exceptions

Exception If the images of this volume can't be processed with Delphi

at line91
bool hasDetectedLaserpoints()

Determines whether there are images with automatically detected laser points in this volume.

Return Value

bool