Table of Contents

Image Endpoints

The following endpoints are available in PMA.core to view Whole Slide Images and their associated labels, thumbnails and macro images. The following list contains the endpoint URL, a brief description and the available parameters for each one.

Tile

/tile Renders a square tile of a slide

Parameter Description
sessionIDThe session id to authenticate with
pathOrUidThe path or unique identifier of the image to render or a valid collection config JSON
timeframeThe index of the time frame to render
layerThe index of the layer to render
channelsComma separated channel indexes to render
channelClippingMin and max limits to clip and scale pixel values. Two values required per channel
channelColorComma separated hex AARRGGBB color per fluorescent channel
gammaGamma values for each channel. One value required per channel
xThe x index of the tile
yThe y index of the tile
zThe z index of the tile
cacheOptional parameter that tells the renderer whether or not to use the cache to fetch the tile
formatOptional resulting image format. Valid values are JPG, JPEG, PNG, TIFF and DICOM
qualityOptional quality parameter used only for the jpeg format
postGammaOptional gamma value to apply as post processing
brightnessOptional brightness value to apply as post processing
contrastOptional contrast value to apply as post processing

Returns A file stream that contains the rendered region

Example /tile?sessionId=sessionId&pathOrUid=path&timeframe=0&layer=0&channels=0&channelClipping=0,0&gamma=1&x=0&y=0&z=0

Region

/region Renders a region of a slide

Parameter Description
sessionIDThe session ID to authenticate with
pathOrUidThe path or unique identifier of the image to render
timeframeThe index of the time frame to render
layerThe index of the layer to render
channelsComma separated channel indexes to render
xThe x coordinate of the image to render
yThe y coordinate of the image to render
widthThe width of the region to render
heightThe height of the region to render
scaleThe factor to scale the rendered region by
channelClippingMin and max limits to clip and scale pixel values. Two values required per channel.
channelColorComma separated hex AARRGGBB color per fluorescent channel
gammaGamma values for each channel. One value required per channel
drawScaleBarOptional Draw an accurate scale bar
downloadInsteadOfDisplayOptional Whether or not to download the image or display it in the browser
drawFilenameOptional 0 do not draw, 1 draw filename on top, 2 draw on bottom
formatOptional parameter representing the resulting image format. JPG, JPEG, PNG, TIFF and DICOM
qualityOptional quality parameter used only for the jpeg format
annotationsLayerTypeOptional A comma separated list of extra annotations layer to render
rotationOptional Rotation angle in degrees
flipHorizontalOptional Whether to flip region horizontally
flipVerticalOptional Whether to flip the region vertically
dpiOptional dpi to resolution for the exported image
postGammaOptional gamma value to apply as post processing
brightnessOptional brightness value to apply as post processing
contrastOptional contrast value to apply as post processing

Returns A file stream that contains the rendered region

Example /region?sessionId=sessionId&pathOrUid=path&timeframe=0&layer=0&channels=0&channelClipping=0,0&channelColor=ffffffff&gamma=1&x=0&y=0&width=1000&height=1000&scale=0.1

In the example request above, the system will render a 1000×1000 pixel portion of the full resolution image and scale it to 100×100 pixels before it returns it to the client.

Thumbnail

/thumbnail Renders the associated thumbnail of slide

Parameter Description
sessionIDThe session ID to authenticate with
pathOrUidThe path or unique identifier of the image to render
orientationOptional The orientation of the thumbnail (0 = auto; 1 = vertical; 2 = horizontal)
wOptional Expected output width of the thumbnail
hOptional Expected output height of the thumbnail

Returns An image

Example /thumbnail?sessionId=sessionId&pathOrUid=path

Macro

/macro Renders the associated macro of a slide

Parameter Description
sessionIDThe session ID to authenticate with
pathOrUidThe path or unique identifier of the image to render
orientationOptional The orientation of the macro (0 = auto; 1 = vertical; 2 = horizontal)
wOptional Expected output width of the macro
hOptional Expected output height of the macro

Returns An image

Example /macro?sessionId=sessionId&pathOrUid=path

Barcode

/barcode Renders the associated barcode of a slide

Parameter Description
sessionIDThe session ID to authenticate with
pathOrUidThe path or unique identifier of the image to render
orientationOptional The orientation of the barcode (0 = auto; 1 = vertical; 2 = horizontal)
wOptional Expected output width of the barcode
hOptional Expected output height of the barcode

Returns An image

Example /barcode?sessionId=sessionId&pathOrUid=path