TileManager.h
// Tile Cache Manager Class
/* IIP Image Server
Copyright (C) 2005-2013 Ruven Pillay.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _TILEMANAGER_H
#define _TILEMANAGER_H
#include "RawTile.h"
#include "IIPImage.h"
#include "JPEGCompressor.h"
#include "Cache.h"
#include "Timer.h"
#include "Watermark.h"
#include "Logger.h"
class TileManager{
private:
Cache* tileCache;
Compressor* jpeg;
IIPImage* image;
Watermark* watermark;
Logger* logfile;
int loglevel;
Timer compression_timer, tile_timer, insert_timer;
RawTile getNewTile( int resolution, int tile, int xangle, int yangle, int layers, CompressionType c );
void crop( RawTile* t );
public:
TileManager( Cache* tc, IIPImage* im, Watermark* w, Compressor* j, Logger* s, int l ){
tileCache = tc;
image = im;
watermark = w;
jpeg = j;
logfile = s ;
loglevel = l;
};
RawTile getTile( int resolution, int tile, int xangle, int yangle, int layers, CompressionType c );
RawTile getRegion( unsigned int res, int xangle, int yangle, int layers, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
};
#endif
Cache
Cache to store raw tile data.
Definition Cache.h:91
Compressor
Base class for IIP output images.
Definition Compressor.h:32
IIPImage
Main class to handle the pyramidal image source.
Definition IIPImage.h:62
Logger
Logger class - handles ofstreams and syslog.
Definition Logger.h:79
RawTile
Class to represent a single image tile.
Definition RawTile.h:45
TileManager::getRegion
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.
TileManager::getTile
RawTile getTile(int resolution, int tile, int xangle, int yangle, int layers, CompressionType c)
Get a tile from the cache.
TileManager::TileManager
TileManager(Cache *tc, IIPImage *im, Watermark *w, Compressor *j, Logger *s, int l)
Constructor.
Definition TileManager.h:85
Timer
Simple Timer class to allow us to time our responses.
Definition Timer.h:39
Watermark
Watermark class.
Definition Watermark.h:41