iipsrv 0.9.9

TPTImage.h

00001 // Tiled Pyramidal Tiff class interface
00002 
00003 /*  IIP Tiled Pyramidal TIFF Class
00004 
00005     Copyright (C) 2000-2006 Ruven Pillay.
00006 
00007     This program is free software; you can redistribute it and/or modify
00008     it under the terms of the GNU General Public License as published by
00009     the Free Software Foundation; either version 2 of the License, or
00010     (at your option) any later version.
00011 
00012     This program is distributed in the hope that it will be useful,
00013     but WITHOUT ANY WARRANTY; without even the implied warranty of
00014     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015     GNU General Public License for more details.
00016 
00017     You should have received a copy of the GNU General Public License
00018     along with this program; if not, write to the Free Software
00019     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00020 */
00021 
00022 
00023 #ifndef _TPTIMAGE_H
00024 #define _TPTIMAGE_H
00025 
00026 
00027 #include "IIPImage.h"
00028 #include <tiff.h>
00029 #include <tiffio.h>
00030 
00031 
00033 
00034 
00035 class TPTImage : public IIPImage {
00036 
00037  private:
00038 
00040   TIFF *tiff;
00041 
00043 
00049   tdata_t tile_buf;
00050 
00051 
00052  public:
00053 
00055   TPTImage():IIPImage() { 
00056     tiff = NULL; tile_buf = NULL; 
00057     tile_width = 0; tile_height = 0;
00058     numResolutions = 0;
00059   };
00060 
00062 
00064   TPTImage( const std::string& path ): IIPImage( path ) { 
00065     tiff = NULL; tile_buf = NULL; 
00066     tile_width = 0; tile_height = 0;
00067     numResolutions = 0;
00068   };
00069 
00071 
00073   TPTImage( const IIPImage& image ): IIPImage( image ) {
00074     tiff = NULL; tile_buf = NULL; 
00075     tile_width = 0; tile_height = 0;
00076     numResolutions = 0;
00077   };
00078 
00080   ~TPTImage() { closeImage(); };
00081 
00083   void openImage() throw (std::string);
00084 
00086 
00089   void loadImageInfo( int x, int y ) throw (std::string);
00090 
00092   void closeImage();
00093 
00095 
00101     RawTile getTile( int x, int y, unsigned int r, int l, unsigned int t ) throw (std::string);
00102 
00103 
00104 };
00105 
00106 
00107 
00108 #endif