Volume
class Volume extends Volume
Extends the base Biigle volume.
Traits
Constants
IMAGE_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. |
VIDEO_FILE_REGEX |
Regular expression that matches the supported video file extensions. This regex allows optional HTTP query parameters after the file names, too. Example "video.mp4?raw=1". This may be required for remote files with services like Dropbox. |
MIN_DELPHI_IMAGES |
Minimum number of manually annotated images required for Delphi laser point
detection. |
Properties
$hidden | The attributes hidden from the model's JSON form. |
from Volume | |
protected array | $casts | The attributes that should be casted to native types. |
from Volume |
Methods
Set a dynamic JSON attribute.
Get a dynamic JSON attribute.
Parses a comma separated list of filenames to an array.
Scope a query to all volumes that are accessible by a user.
The images belonging to this volume ordered by filename (ascending).
Return a query for all users associated to this volume through projects.
The active annotation sessions of this volume (if any).
Returns the active annotation session of this volume for the given user.
Check if the given annotation session is in conflict with existing ones.
An image that can be used as unique thumbnail for this volume.
Several images or videos that can be used for the preview thumbnail of a volume.
Flush the cached information if this volume has images with GPS coordinates.
Set the creating_async attribute of this volume.
Check if an iFDO metadata file is available for this volume.
Removes items from the annotations array if the laser point annotations are invalid.
Determines if the images of this volume can be processed with Delphi.
Determines whether there are images with automatically detected laser points in this volume.
Details
in
HasJsonAttributes at line 16
protected
setJsonAttr(string $key, mixed $value, string $attrs = 'attrs')
Set a dynamic JSON attribute.
in
HasJsonAttributes at line 38
protected mixed
getJsonAttr(string $key, mixed $default = null, string $attrs = 'attrs')
Get a dynamic JSON attribute.
in
Volume at line 72
static array
parseFilesQueryString(string $string)
Parses a comma separated list of filenames to an array.
in
Volume at line 86
Builder
scopeAccessibleBy(Builder $query, User $user)
Scope a query to all volumes that are accessible by a user.
in
Volume at line 106
BelongsTo
creator()
The user that created the volume.
in
Volume at line 116
BelongsTo
mediaType()
The media type of this volume.
in
Volume at line 126
HasMany
images()
The images belonging to this volume.
in
Volume at line 136
HasMany
videos()
The videos belonging to this volume.
in
Volume at line 146
HasMany
files()
The images or videos belonging to this volume.
in
Volume at line 161
HasMany
orderedImages()
deprecated
deprecated
The images belonging to this volume ordered by filename (ascending).
in
Volume at line 171
HasMany
orderedFiles()
The images belonging to this volume ordered by filename (ascending).
in
Volume at line 181
Builder
users()
Return a query for all users associated to this volume through projects.
in
Volume at line 200
BelongsToMany
projects()
The project(s), this volume belongs to.
in
Volume at line 210
HasMany
annotationSessions()
The annotation sessions of this volume.
in
Volume at line 220
HasOne
activeAnnotationSession()
The active annotation sessions of this volume (if any).
in
Volume at line 240
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.
in
Volume at line 260
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.
in
Volume at line 289
bool
isRemote()
Check if the images of this volume come from a remote URL.
in
Volume at line 299
Image
getThumbnailAttribute()
An image that can be used as unique thumbnail for this volume.
in
Volume at line 311
string
getThumbnailUrlAttribute()
URL to the thumbnail image of this volume.
in
Volume at line 321
Collection
getThumbnailsAttribute()
Several images or videos that can be used for the preview thumbnail of a volume.
in
Volume at line 345
array
getThumbnailsUrlAttribute()
URLs to the thumbnail images of this volume.
in
Volume at line 355
flushThumbnailCache()
Flush the cache that stores the volume thumbnail.
in
Volume at line 365
bool
hasGeoInfo()
Check if the volume has some images with GPS coordinates.
in
Volume at line 375
flushGeoInfoCache()
Flush the cached information if this volume has images with GPS coordinates.
in
Volume at line 388
setUrlAttribute(string $value)
Set the url attribute of this volume.
in
Volume at line 403
setCreatingAsyncAttribute(string $value)
Set the creating_async attribute of this volume.
in
Volume at line 415
string
getCreatingAsyncAttribute()
Get the creating_async attribute of this volume.
in
Volume at line 425
bool
hasTiledImages()
Check if the there are tiled images in this volume.
in
Volume at line 438
bool
isImageVolume()
Specifies whether the volume is an image volume.
in
Volume at line 448
bool
isVideoVolume()
Specifies whether the volume is a video volume.
in
Volume at line 459
saveIfdo(UploadedFile $file)
Save an iFDO metadata file and link it with this volume.
in
Volume at line 472
bool
hasIfdo(bool $ignoreErrors = false)
Check if an iFDO metadata file is available for this volume.
in
Volume at line 490
deleteIfdo()
Delete the iFDO metadata file linked with this volume.
in
Volume at line 501
Response
downloadIfdo()
Download the iFDO that is attached to this volume.
in
Volume at line 517
array
getIfdo()
Get the content of the iFDO file associated with this volume.
in
Volume at line 529
protected string
getIfdoFilename()
Get the filename of the volume iFDO in storage.
in
Volume at line 539
protected string
getThumbnailsCacheKey()
Get the cache key for volume thumbnails.
in
Volume at line 549
protected string
getGeoInfoCacheKey()
Get the cache key for volume geo info.
in
Volume at line 559
protected string
getIfdoCacheKey()
Get the cache key for volume iFDO info.
in
FiltersInvalidLaserPoints at line 16
Filtered
filterInvalidLaserPoints(Collection $annotations)
Removes items from the annotations array if the laser point annotations are invalid.
at line 34
static Volume
convert(Volume $volume)
Converts a regular Biigle volume to a Laserpoints volume.
at line 50
readyForDelphiDetection(Label $label)
Determines if the images of this volume can be processed with Delphi.
at line 91
bool
hasDetectedLaserpoints()
Determines whether there are images with automatically detected laser points in this volume.