iipsrv 1.2
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
TileManager.h
1// Tile Cache Manager Class
2
3/* IIP Image Server
4
5 Copyright (C) 2005-2023 Ruven Pillay.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
20*/
21
22
23#ifndef _TILEMANAGER_H
24#define _TILEMANAGER_H
25
26
27#include "RawTile.h"
28#include "IIPImage.h"
29#include "JPEGCompressor.h"
30#ifdef HAVE_PNG
31#include "PNGCompressor.h"
32#endif
33#ifdef HAVE_WEBP
34#include "WebPCompressor.h"
35#endif
36#include "Cache.h"
37#include "Timer.h"
38#include "Watermark.h"
39#include "Logger.h"
40
41
43
45
46
47 private:
48
49 Cache* tileCache;
50 Compressor* compressor;
51 IIPImage* image;
52 Watermark* watermark;
53 Logger* logfile;
54 int loglevel;
55 Timer compression_timer, tile_timer, insert_timer;
56
58
70 RawTile getNewTile( int resolution, int tile, int xangle, int yangle, int layers, CompressionType c );
71
72
73 public:
74
75
77
85 TileManager( Cache* tc, IIPImage* im, Watermark* w, Compressor* c, Logger* s, int l ){
86 tileCache = tc;
87 image = im;
88 watermark = w;
89 compressor = c;
90 logfile = s ;
91 loglevel = l;
92 };
93
94
95
97
109 RawTile getTile( int resolution, int tile, int xangle, int yangle, int layers, CompressionType c );
110
111
112
114
127 RawTile getRegion( unsigned int res, int xangle, int yangle, int layers, unsigned int x, unsigned int y, unsigned int w, unsigned int h );
128
129};
130
131
132#endif
Cache to store raw tile data.
Definition: Cache.h:90
Base class for IIP output images.
Definition: Compressor.h:32
Main class to handle the pyramidal image source.
Definition: IIPImage.h:76
Logger class - handles ofstreams and syslog.
Definition: Logger.h:79
Class to represent a single image tile.
Definition: RawTile.h:47
Class to manage access to the tile cache.
Definition: TileManager.h:44
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.
RawTile getTile(int resolution, int tile, int xangle, int yangle, int layers, CompressionType c)
Get a tile from the cache.
TileManager(Cache *tc, IIPImage *im, Watermark *w, Compressor *c, Logger *s, int l)
Constructor.
Definition: TileManager.h:85
Simple Timer class to allow us to time our responses.
Definition: Timer.h:40
Watermark class.
Definition: Watermark.h:41