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
TPTImage.h
1// Tiled Pyramidal Tiff class interface
2
3/* IIPImage Tiled Pyramidal TIFF Class
4
5 Copyright (C) 2000-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 _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 std::vector<uint32_t> subifds;
44
46 tdir_t subifd_ifd;
47
49 void loadSubIFDs();
50
52 void loadStackInfo();
53
54
55 public:
56
58 TPTImage():IIPImage(), tiff( NULL ) {};
59
61
63 TPTImage( const std::string& path ): IIPImage(path), tiff(NULL), subifd_ifd(0) {};
64
66
68 TPTImage( const TPTImage& image ): IIPImage(image), tiff(NULL), subifd_ifd(0) {};
69
71
74 if( this != &image ){
75 closeImage();
77 tiff = image.tiff;
78 }
79 return *this;
80 }
81
83
85 TPTImage( const IIPImage& image ): IIPImage(image), tiff(NULL), subifd_ifd(0) {};
86
89
91 static void setupLogging();
92
94 void openImage();
95
97
100 void loadImageInfo( int x, int y );
101
104
106
112 RawTile getTile( int x, int y, unsigned int r, int l, unsigned int t );
113
114};
115
116
117#endif
Main class to handle the pyramidal image source.
Definition: IIPImage.h:76
IIPImage & operator=(IIPImage image)
Assignment operator.
Definition: IIPImage.h:457
Class to represent a single image tile.
Definition: RawTile.h:47
Image class for Tiled Pyramidal Images: Inherits from IIPImage. Uses libtiff.
Definition: TPTImage.h:35
TPTImage()
Constructor.
Definition: TPTImage.h:58
void loadImageInfo(int x, int y)
Overloaded function for loading TIFF image information.
TPTImage(const std::string &path)
Constructor.
Definition: TPTImage.h:63
void closeImage()
Overloaded function for closing a TIFF image.
TPTImage(const IIPImage &image)
Construct from an IIPImage object.
Definition: TPTImage.h:85
~TPTImage()
Destructor.
Definition: TPTImage.h:88
TPTImage & operator=(TPTImage image)
Assignment Operator.
Definition: TPTImage.h:73
RawTile getTile(int x, int y, unsigned int r, int l, unsigned int t)
Overloaded function for getting a particular tile.
static void setupLogging()
Overloaded static function for seting up logging for codec library.
void openImage()
Overloaded function for opening a TIFF image.
TPTImage(const TPTImage &image)
Copy Constructor.
Definition: TPTImage.h:68