TileManager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _TILEMANAGER_H
00026 #define _TILEMANAGER_H
00027
00028
00029 #include <fstream>
00030
00031 #include "RawTile.h"
00032 #include "IIPImage.h"
00033 #include "JPEGCompressor.h"
00034 #include "Cache.h"
00035 #include "Timer.h"
00036 #include "Watermark.h"
00037
00038
00039
00041
00042 class TileManager{
00043
00044
00045 private:
00046
00047 Cache* tileCache;
00048 JPEGCompressor* jpeg;
00049 IIPImage* image;
00050 Watermark* watermark;
00051 std::ofstream* logfile;
00052 int loglevel;
00053 Timer compression_timer, tile_timer, insert_timer;
00054
00056
00068 RawTile getNewTile( int resolution, int tile, int xangle, int yangle, int layers, CompressionType c );
00069
00070
00072
00074 void crop( RawTile* t );
00075
00076
00077 public:
00078
00079
00081
00089 TileManager( Cache* tc, IIPImage* im, Watermark* w, JPEGCompressor* j, std::ofstream* s, int l ){
00090 tileCache = tc;
00091 image = im;
00092 watermark = w;
00093 jpeg = j;
00094 logfile = s ;
00095 loglevel = l;
00096 };
00097
00098
00099
00101
00113 RawTile getTile( int resolution, int tile, int xangle, int yangle, int layers, CompressionType c );
00114
00115
00116 };
00117
00118
00119 #endif