TPTImage.h
// Tiled Pyramidal Tiff class interface
/* IIPImage Tiled Pyramidal TIFF Class
Copyright (C) 2000-2017 Ruven Pillay.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _TPTIMAGE_H
#define _TPTIMAGE_H
#include "IIPImage.h"
#include <tiff.h>
#include <tiffio.h>
class TPTImage : public IIPImage {
private:
TIFF *tiff;
tdata_t tile_buf;
public:
TPTImage():IIPImage(), tiff( NULL ), tile_buf( NULL ) {};
TPTImage( const std::string& path ): IIPImage( path ), tiff( NULL ), tile_buf( NULL ) {};
TPTImage( const TPTImage& image ): IIPImage( image ), tiff( NULL ),tile_buf( NULL ) {};
TPTImage& operator = ( TPTImage image ) {
if( this != &image ){
closeImage();
IIPImage::operator=(image);
tiff = image.tiff;
tile_buf = image.tile_buf;
}
return *this;
}
TPTImage( const IIPImage& image ): IIPImage( image ) {
tiff = NULL; tile_buf = NULL;
};
~TPTImage() { closeImage(); };
void openImage();
void loadImageInfo( int x, int y );
void closeImage();
RawTile getTile( int x, int y, unsigned int r, int l, unsigned int t );
};
#endif
IIPImage::IIPImage
IIPImage()
Default Constructor.
Definition IIPImage.h:157
IIPImage::operator=
IIPImage & operator=(IIPImage image)
Assignment operator.
Definition IIPImage.h:375
RawTile
Class to represent a single image tile.
Definition RawTile.h:45
TPTImage::TPTImage
TPTImage()
Constructor.
Definition TPTImage.h:49
TPTImage::loadImageInfo
void loadImageInfo(int x, int y)
Overloaded function for loading TIFF image information.
TPTImage::TPTImage
TPTImage(const std::string &path)
Constructor.
Definition TPTImage.h:54
TPTImage::closeImage
void closeImage()
Overloaded function for closing a TIFF image.
TPTImage::TPTImage
TPTImage(const IIPImage &image)
Construct from an IIPImage object.
Definition TPTImage.h:77
TPTImage::~TPTImage
~TPTImage()
Destructor.
Definition TPTImage.h:82
TPTImage::operator=
TPTImage & operator=(TPTImage image)
Assignment Operator.
Definition TPTImage.h:64
TPTImage::getTile
RawTile getTile(int x, int y, unsigned int r, int l, unsigned int t)
Overloaded function for getting a particular tile.
TPTImage::openImage
void openImage()
Overloaded function for opening a TIFF image.
TPTImage::TPTImage
TPTImage(const TPTImage &image)
Copy Constructor.
Definition TPTImage.h:59