girder_large_image.rest package

Submodules

girder_large_image.rest.item_meta module

class girder_large_image.rest.item_meta.InternalMetadataItemResource(apiRoot)[source]

Bases: Item

deleteMetadataKey(item, key, params)[source]
getMetadataKey(item, key, params)[source]
updateMetadataKey(item, key, params)[source]

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]
configFormat(config)[source]
configReplace(config, restart)[source]
configValidate(config)[source]
countAssociatedImages(params)[source]
countHistograms(params)[source]
countThumbnails(params)[source]
createLargeImages(folder, createJobs, localJobs, recurse, cancelJobs, redoExisting)[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]
girder_large_image.rest.large_image_resource.createThumbnailsJobLog(job, info, prefix='', status=None)[source]

Log information about 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.createThumbnailsJobThread(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.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

addTilesThumbnails(item, key, mimeType, thumbnail=False, data=None)[source]
convertImage(item, params)[source]
createTiles(item, params)[source]
deleteTiles(item, params)[source]
deleteTilesThumbnails(item, keep, key=None, thumbnail=True)[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]
listTilesThumbnails(item)[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.getYAMLConfigFile(self, folder, name)[source]
girder_large_image.rest.putYAMLConfigFile(self, folder, name, config, user_context)[source]