Class: ZoomifyTileSource

OpenSeadragon.ZoomifyTileSource

A tilesource implementation for the zoomify format. A description of the format can be found here: https://ecommons.cornell.edu/bitstream/handle/1813/5410/Introducing_Zoomify_Image.pdf There are two ways of creating a zoomify tilesource for openseadragon 1) Supplying all necessary information in the tilesource object. A minimal example object for this method looks like this: { type: "zoomifytileservice", width: 1000, height: 1000, tilesUrl: "/test/data/zoomify/" } The tileSize is currently hardcoded to 256 (the usual Zoomify default). The tileUrl must the path to the image _directory_. 2) Loading image metadata from xml file: (CURRENTLY NOT SUPPORTED) When creating zoomify formatted images one "xml" like file with name ImageProperties.xml will be created as well. Here is an example of such a file: To use this xml file as metadata source you must supply the path to the ImageProperties.xml file and leave out all other parameters: As stated above, this method of loading a zoomify tilesource is currently not supported { type: "zoomifytileservice", tilesUrl: "/test/data/zoomify/ImageProperties.xml" }

Constructor

new ZoomifyTileSource(width, height, tileSize, tilesUrl)

Parameters:
Name Type Description
width Number the pixel width of the image.
height Number
tileSize Number
tilesUrl String
Source:

Extends

Members

aspectRatio :Number

Ratio of width to height
Type:
  • Number
Inherited From:
Source:

dimensions :OpenSeadragon.Point

Vector storing x and y dimensions ( width and height respectively ).
Type:
Inherited From:
Source:

maxLevel :Number

The maximum pyramid level this tile source supports or should attempt to load.
Type:
  • Number
Inherited From:
Source:

minLevel :Number

The minimum pyramid level this tile source supports or should attempt to load.
Type:
  • Number
Inherited From:
Source:

ready :Boolean

Type:
  • Boolean
Inherited From:
Source:

tileOverlap :Number

The overlap in pixels each tile shares with its adjacent neighbors.
Type:
  • Number
Inherited From:
Source:

Methods

addHandler(eventName, handler, userDataopt)

Add an event handler for a given event.
Parameters:
Name Type Attributes Default Description
eventName String Name of event to register.
handler OpenSeadragon.EventHandler Function to call when event is triggered.
userData Object <optional>
null Arbitrary object to be passed unchanged to the handler.
Inherited From:
Source:

addOnceHandler(eventName, handler, userDataopt, timesopt)

Add an event handler to be triggered only once (or a given number of times) for a given event.
Parameters:
Name Type Attributes Default Description
eventName String Name of event to register.
handler OpenSeadragon.EventHandler Function to call when event is triggered.
userData Object <optional>
null Arbitrary object to be passed unchanged to the handler.
times Number <optional>
1 The number of times to handle the event before removing it.
Inherited From:
Source:

configure(data, url) → {Object}

Parameters:
Name Type Description
data Object the raw configuration
url String the url the data was retreived from if any.
Overrides:
Source:
Returns:
options - A dictionary of keyword arguments sufficient to configure this tile sources constructor.
Type
Object

getClosestLevel() → {Number}

Inherited From:
Source:
Returns:
The highest level in this tile source that can be contained in a single tile.
Type
Number

getHandler(eventName)

Get a function which iterates the list of all handlers registered for a given event, calling the handler for each.
Parameters:
Name Type Description
eventName String Name of event to get handlers for.
Inherited From:
Source:

getImageInfo(url)

Responsible for retrieving, and caching the image metadata pertinent to this TileSources implementation.
Parameters:
Name Type Description
url String
Inherited From:
Source:
Throws:
Error

getLevelScale(level)

Parameters:
Name Type Description
level Number
Inherited From:
Source:

getNumTiles(level)

Parameters:
Name Type Description
level Number
Inherited From:
Source:

getPixelRatio(level)

Parameters:
Name Type Description
level Number
Inherited From:
Source:

getTileAjaxHeaders(level, x, y) → {Object}

Responsible for retrieving the headers which will be attached to the image request for the region specified by the given x, y, and level components. This option is only relevant if OpenSeadragon.Options.loadTilesWithAjax is set to true. The headers returned here will override headers specified at the Viewer or TiledImage level. Specifying a falsy value for a header will clear its existing value set at the Viewer or TiledImage level (if any).
Parameters:
Name Type Description
level Number
x Number
y Number
Inherited From:
Source:
Returns:
Type
Object

getTileAtPoint(level, point)

Parameters:
Name Type Description
level Number
point OpenSeadragon.Point
Inherited From:
Source:

getTileBounds(level, x, y)

Parameters:
Name Type Description
level Number
x Number
y Number
Inherited From:
Source:

getTileHeight(level)

Return the tileHeight for a given level. Subclasses should override this if tileHeight can be different at different levels such as in IIIFTileSource. Code should use this function rather than reading from ._tileHeight directly.
Parameters:
Name Type Description
level Number
Inherited From:
Source:

getTileUrl(level, x, y)

Parameters:
Name Type Description
level Number
x Number
y Number
Overrides:
Source:

getTileWidth(level)

Return the tileWidth for a given level. Subclasses should override this if tileWidth can be different at different levels such as in IIIFTileSource. Code should use this function rather than reading from ._tileWidth directly.
Parameters:
Name Type Description
level Number
Inherited From:
Source:

raiseEvent(eventName, eventArgs)

Trigger an event, optionally passing additional information.
Parameters:
Name Type Description
eventName String Name of event to register.
eventArgs Object Event-specific data.
Inherited From:
Source:

removeAllHandlers(eventName)

Remove all event handlers for a given event type. If no type is given all event handlers for every event type are removed.
Parameters:
Name Type Description
eventName String Name of event for which all handlers are to be removed.
Inherited From:
Source:

removeHandler(eventName, handler)

Remove a specific event handler for a given event.
Parameters:
Name Type Description
eventName String Name of event for which the handler is to be removed.
handler OpenSeadragon.EventHandler Function to be removed.
Inherited From:
Source:

supports(data, optional)

Determine if the data and/or url imply the image service is supported by this tile source.
Parameters:
Name Type Description
data Object | Array
optional String url
Overrides:
Source:

tileExists(level, x, y)

Parameters:
Name Type Description
level Number
x Number
y Number
Inherited From:
Source: