girder_large_image.rest package

Submodules

girder_large_image.rest.large_image_resource module

class girder_large_image.rest.large_image_resource.LargeImageResource[source]

Bases: Resource

cacheClear(params)[source]
cacheInfo(params)[source]
countAssociatedImages(params)[source]
countHistograms(params)[source]
countThumbnails(params)[source]
createThumbnails(params)[source]
deleteAssociatedImages(params)[source]
deleteHistograms(params)[source]
deleteIncompleteTiles(params)[source]
deleteThumbnails(params)[source]
getPublicSettings(params)[source]
listSources(params)[source]
girder_large_image.rest.large_image_resource.createThumbnailsJob(job)[source]

Create thumbnails for all of the large image items.

The job object contains:

- spec: an array, each entry of which is the parameter dictionary
  for the model getThumbnail function.
- logInterval: the time in seconds between log messages.  This
  also controls the granularity of cancelling the job.
- concurrent: the number of threads to use.  0 for the number of
  cpus.
Parameters

job – the job object including kwargs.

girder_large_image.rest.large_image_resource.createThumbnailsJobLog(job, info, prefix='', status=None)[source]

Log information aboyt the create thumbnails job.

Parameters
  • job – the job object.

  • info – a dictionary with the number of thumbnails checked, created, and failed.

  • prefix – a string to place in front of the log message.

  • status – if not None, a new status for the job.

girder_large_image.rest.large_image_resource.createThumbnailsJobTask(item, spec)[source]

For an individual item, check or create all of the appropriate thumbnails.

Parameters
  • item – the image item.

  • spec – a list of thumbnail specifications.

Returns

a dictionary with the total status of the thumbnail job.

girder_large_image.rest.large_image_resource.cursorNextOrNone(cursor)[source]

Given a Mongo cursor, return the next value if there is one. If not, return None.

Parameters

cursor – a cursor to get a value from.

Returns

the next value or None.

girder_large_image.rest.tiles module

class girder_large_image.rest.tiles.TilesItemResource(apiRoot)[source]

Bases: Item

convertImage(item, params)[source]
createTiles(item, params)[source]
deleteTiles(item, params)[source]
getAssociatedImage(itemId, image, params)[source]
getAssociatedImageMetadata(item, image, params)[source]
getAssociatedImagesList(item, params)[source]
getBandInformation(item, params)[source]
getDZIInfo(item, params)[source]
getDZITile(item, level, xandy, params)[source]
getHistogram(item, params)[source]
getInternalMetadata(item, params)[source]
getTestTile(z, x, y, params)[source]
getTestTilesInfo(params)[source]
getTile(itemId, z, x, y, params)[source]
getTileWithFrame(itemId, frame, z, x, y, params)[source]
getTilesInfo(item, params)[source]
getTilesPixel(item, params)[source]
getTilesRegion(item, params)[source]
getTilesThumbnail(item, params)[source]
tileFrames(item, params)[source]
tileFramesQuadInfo(item, params)[source]

Module contents

girder_large_image.rest.addSystemEndpoints(apiRoot)[source]

This adds endpoints to routes that already exist in Girder.

Parameters

apiRoot – Girder api root class.

girder_large_image.rest.adjustConfigForUser(config, user)[source]

Given the current user, adjust the config so that only relevant and combined values are used. If the root of the config dictionary contains “access”: {“user”: <dict>, “admin”: <dict>}, the base values are updated based on the user’s access level. If the root of the config contains “group”: {<group-name>: <dict>, …}, the base values are updated for every group the user is a part of.

The order of update is groups in C-sort alphabetical order followed by access/user and then access/admin as they apply.

Parameters

config – a config dictionary.

girder_large_image.rest.getYAMLConfigFile(self, folder, name)[source]