iipsrv 1.1
iipsrv is an advanced high-performance feature-rich image server for web-based streamed viewing and zooming of ultra high-resolution images
TPTImage.h
1// Tiled Pyramidal Tiff class interface
2
3/* IIPImage Tiled Pyramidal TIFF Class
4
5 Copyright (C) 2000-2017 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 _TPTIMAGE_H
24#define _TPTIMAGE_H
25
26
27#include "IIPImage.h"
28#include <tiff.h>
29#include <tiffio.h>
30
31
32
33
35class TPTImage : public IIPImage {
36
37 private:
38
40 TIFF *tiff;
41
43 tdata_t tile_buf;
44
45
46 public:
47
49 TPTImage():IIPImage(), tiff( NULL ), tile_buf( NULL ) {};
50
52
54 TPTImage( const std::string& path ): IIPImage( path ), tiff( NULL ), tile_buf( NULL ) {};
55
57
59 TPTImage( const TPTImage& image ): IIPImage( image ), tiff( NULL ),tile_buf( NULL ) {};
60
62
65 if( this != &image ){
66 closeImage();
68 tiff = image.tiff;
69 tile_buf = image.tile_buf;
70 }
71 return *this;
72 }
73
75
77 TPTImage( const IIPImage& image ): IIPImage( image ) {
78 tiff = NULL; tile_buf = NULL;
79 };
80
83
85 void openImage();
86
88
91 void loadImageInfo( int x, int y );
92
94 void closeImage();
95
97
103 RawTile getTile( int x, int y, unsigned int r, int l, unsigned int t );
104
105};
106
107
108#endif
Main class to handle the pyramidal image source.
Definition: IIPImage.h:62
IIPImage & operator=(IIPImage image)
Assignment operator.
Definition: IIPImage.h:375
Class to represent a single image tile.
Definition: RawTile.h:45
Image class for Tiled Pyramidal Images: Inherits from IIPImage. Uses libtiff.
Definition: TPTImage.h:35
TPTImage()
Constructor.
Definition: TPTImage.h:49
void loadImageInfo(int x, int y)
Overloaded function for loading TIFF image information.
TPTImage(const std::string &path)
Constructor.
Definition: TPTImage.h:54
void closeImage()
Overloaded function for closing a TIFF image.
TPTImage(const IIPImage &image)
Construct from an IIPImage object.
Definition: TPTImage.h:77
~TPTImage()
Destructor.
Definition: TPTImage.h:82
TPTImage & operator=(TPTImage image)
Assignment Operator.
Definition: TPTImage.h:64
RawTile getTile(int x, int y, unsigned int r, int l, unsigned int t)
Overloaded function for getting a particular tile.
void openImage()
Overloaded function for opening a TIFF image.
TPTImage(const TPTImage &image)
Copy Constructor.
Definition: TPTImage.h:59