![]() |
iipsrv 1.3
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
|
Class to manage access to the tile cache. More...
#include <TileManager.h>
Public Member Functions | |
| TileManager (Cache *tc, IIPImage *im, Compressor *c, Logger *s, int l) | |
| Constructor. | |
| RawTile | getTile (int resolution, int tile, int xangle, int yangle, int layers, ImageEncoding c) |
| Get a tile from the cache. | |
| RawTile | getRegion (unsigned int res, int xangle, int yangle, int layers, unsigned int x, unsigned int y, unsigned int w, unsigned int h) |
| Generate a complete region. | |
Class to manage access to the tile cache.
|
inline |
Constructor.
| tc | pointer to tile cache object |
| im | pointer to IIPImage object |
| c | pointer to Compressor object |
| s | pointer to Logger object |
| l | logging level |
| RawTile TileManager::getRegion | ( | unsigned int | res, |
| int | xangle, | ||
| int | yangle, | ||
| int | layers, | ||
| unsigned int | x, | ||
| unsigned int | y, | ||
| unsigned int | w, | ||
| unsigned int | h | ||
| ) |
Generate a complete region.
Build up an arbitrary region by extracting tiles from the cache by using getTile function. Data returned as uncompressed raw data.
| res | resolution number |
| xangle | horizontal sequence number |
| yangle | vertical sequence number |
| layers | number of quality layers within image to decode |
| x | left offset with respect to full image |
| y | top offset with respect to full image |
| w | width of region requested |
| h | height of region requested |
References RawTile::allocate(), RawTile::bpc, RawTile::channels, RawTile::data, RawTile::dataLength, IIPImage::getNativeResolution(), IIPImage::getRegion(), getTile(), Timer::getTime(), RawTile::height, IIPImage::image_widths, IIPImage::regionDecoding(), RawTile::sampleType, Timer::start(), IIPImage::tile_widths, and RawTile::width.
Referenced by PFL::run(), and CVT::send().
| RawTile TileManager::getTile | ( | int | resolution, |
| int | tile, | ||
| int | xangle, | ||
| int | yangle, | ||
| int | layers, | ||
| ImageEncoding | c | ||
| ) |
Get a tile from the cache.
If the encoded tile already exists in the cache, use that, otherwise check for an uncompressed tile. If that does not exist either, extract a tile from the image.
| resolution | resolution number |
| tile | tile number |
| xangle | horizontal sequence number |
| yangle | vertical sequence number |
| layers | number of quality layers within image to decode |
| c | Compression |
References RawTile::bpc, RawTile::channels, Compressor::Compress(), RawTile::compressionType, RawTile::dataLength, IIPImage::getImagePath(), Cache::getMemorySize(), Cache::getNumElements(), Compressor::getQuality(), Cache::getTile(), Timer::getTime(), Cache::insert(), Timer::start(), IIPImage::timestamp, and RawTile::timestamp.
Referenced by getRegion(), SPECTRA::run(), CVT::send(), and JTL::send().