PMA.UI Documentation by Pathomation

Components

PMA.UI. Components

Source:
PMA.UI.Components contains UI and utility components that interact with a viewport and PMA.core

Classes

AIImageAnalysisResults
Annotations
Context
Forms
Gallery
ImageUpload
MetadataSearch
MetadataTree
SlideLoader
SyncView
Tree

Namespaces

Events

Members

(static, constant) ApiMethods :string

Source:
Properties:
Name Type Description
Authenticate string
GetFiles string
GetDirectories string
GetImageInfo string
GetImagesInfo string
DeAuthenticate string
GetForms string
GetFormDefinitions string
GetFormSubmissions string
GetForm string
SaveFormDefinition string
DeleteFormDefinition string
SaveFormData string
GetFormData string
GetAnnotations string
AddAnnotation string
UpdateAnnotation string
DeleteAnnotation string
GetVersionInfo string
QueryFilename string
SaveAnnotations string
DistinctValues string
Metadata string
GetEvents string
RunScripts string
CreateDirectory string
DeleteDirectory string
RenameDirectory string
DeleteSlide string
Upload string
PMA.core API methods
Type:
  • string

(static, constant) GalleryRenderOptions :string

Source:
Properties:
Name Type Description
All string Render both thumbnail and barcode
Thumbnail string Render thumbnail only
Barcode string Render barcode only
Available components to render
Type:
  • string

(static, constant) GetSlidesScope :string

Source:
Properties:
Name Type Description
Normal string
OneLevel string
Recursive string
PMA.core scopes for the GetSlides API method
Type:
  • string

Methods

(static) getBarcodeUrl(serverUrl, sessionId, pathOrUid, rotationopt)

Source:
Returns a URL that points to the barcode of a slide image. This method doesn't guarantee that a barcode image actually exists.
Parameters:
Name Type Attributes Default Description
serverUrl string The PMA.core server URL
sessionId string The session id acquired by authenticating to the server
pathOrUid string The path or UID of the slide
rotation Number <optional>
0 The initial rotation for this associated image

(static) getSnapshotUrl(serverUrl, sessionId, pathOrUid, snapshotParameters, thumbWidth, thumbHeight, formatopt, drawScaleBaropt, filenameopt, downloadopt)

Source:
Returns a URL that points to the snapshot of a slide image
Parameters:
Name Type Attributes Default Description
serverUrl string
sessionId string
pathOrUid string
snapshotParameters PMA.UI.Components~snapshotParameters The parameters required for the snapshot
thumbWidth Number The final snapshot width (this may be smaller due to aspect ratio)
thumbHeight Number The final snapshot height (this may be smaller due to aspect ratio)
format string <optional>
jpg The snapshot image format
drawScaleBar boolean <optional>
false Whether or not to draw a scalebar
filename string <optional>
"snapshot" The filename of the image
download boolean <optional>
True to prompt the user to save the snapshot instead of viewing it within the browser

(static) getThumbnailUrl(serverUrl, sessionId, pathOrUid, orientationopt, widthopt, heightopt)

Source:
Returns a URL that points to the thumbnail of a slide image
Parameters:
Name Type Attributes Default Description
serverUrl string The PMA.core server URL
sessionId string The session id acquired by authenticating to the server
pathOrUid string The path or UID of the slide
orientation Number <optional>
0 The desired rotation of the thumbnail in degrees
width Number <optional>
0 The desired width of the thumbnail in pixels
height Number <optional>
0 The desired height of the thumbnail in pixels

Type Definitions

AjaxCallback(request)

Source:
Ajax response callback. "this" will be the same with the one passed to PMA.UI.View.ajax
Parameters:
Name Type Description
request XMLHttpRequest The object that was used to perform the ajax request

AjaxDataEncodeCallback(data) → {string}

Source:
A function that will stringify the data.
Parameters:
Name Type Description
data Object The payload
Returns:
Type
string

AjaxRequestOptions

Source:
Properties:
Name Type Description
contentType string The request content type
dataEncodeCallback AjaxDataEncodeCallback A function that will appropriately stringify the data. If null, the data will be formified.
An object expected for drag and drop features
Type:
  • Object

DragDropMimeType

Source:
The mime type used for drag n drop data transfer
Type:
  • string

dragDropObject

Source:
Properties:
Name Type Description
serverUrl string The serverUrl
path string The path to a slide or directory
isFolder boolean Whether this is a path or a directory
An object expected for drag and drop features
Type:
  • Object

snapshotParameters

Source:
Properties:
Name Type Attributes Default Description
x number The x coordinate of the top left point
y number The y coordinate of the top left point
width number The width of the viewport
height number The height of the viewport
rotation number The rotation of the viewport (in degrees)
flipHorizontally boolean Wheter the snapshot is flipped horizontally
flipVertically boolean Wheter the snapshot is flipped vertically
channels Array <optional>
The selected channels
channelClipping string <optional>
A pair of values [0..100] to clip and scale pixel values for each active channel (comma separated)
channelColor string <optional>
Color in css format for each active channel (comma separated)
gamma string <optional>
A value of tha gamma correction factor for each active channel (comma separated)
layer number <optional>
0 The selected layer
timeframe number <optional>
0 The selected timeframe
scale number <optional>
null A factor to scale the image by. Default is the current viewport scale
postGamma number <optional>
null A value of the gamma correction factor
brightness number <optional>
null A value of the brightness
contrast number <optional>
null A value of the contrast
dpi number <optional>
null Dots per inch to set to the image
snapshot parameters
Type:
  • Object