iipsrv  0.9.9
IIPImage Class Reference

Main class to handle the pyramidal image source. More...

#include <IIPImage.h>

Inheritance diagram for IIPImage:
KakaduImage TPTImage

List of all members.

Public Member Functions

 IIPImage ()
 Default Constructor.
 IIPImage (const std::string &)
 Constructer taking the image path as paramter.
 IIPImage (const IIPImage &)
 Copy Constructor taking reference to another IIPImage object.
virtual ~IIPImage ()
 Virtual Destructor.
void Initialise ()
 Test the image and initialise some parameters.
std::list< int > getVerticalViewsList ()
 Return a list of available vertical angles.
std::list< int > getHorizontalViewsList ()
 Return a list of horizontal angles.
const std::string & getImagePath ()
 Return the image path.
const std::string getFileName (int x, int y)
 Return the full file path for a particular horizontal and vertical angle.
const std::string & getImageType ()
 Get the image type.
void updateTimestamp (const std::string &)
 Get the image timestamp.
const std::string getTimestamp ()
 Get a HTTP RFC 1123 formatted timestamp.
bool set ()
 Check whether this object has been initialised.
void setFileSystemPrefix (const std::string &prefix)
 Set a file system prefix for added security.
void setFileNamePattern (const std::string &pattern)
 Set the file name pattern used in image sequences.
int getNumResolutions ()
 Return the number of available resolutions in the image.
unsigned int getNumBitsPerPixel ()
 Return the number of bits per pixel for this image.
unsigned int getNumChannels ()
 Return the number of channels for this image.
unsigned int getImageWidth (int n=0)
 Return the image width in pixels for a given resolution.
unsigned int getImageHeight (int n=0)
 Return the image height in pixels for a given resolution.
unsigned int getTileHeight ()
 Return the base tile height in pixels for a given resolution.
unsigned int getTileWidth ()
 Return the base tile width in pixels.
ColourSpaces getColourSpace ()
 Return the colour space for this image.
std::string getMetadata (const std::string &index)
 Return image metadata.
virtual void Load (const std::string &module)
 Load the appropriate codec module for this image type.
virtual const std::string getDescription ()
 Return codec description: Overloaded by child class.
virtual void openImage ()
 Open the image: Overloaded by child class.
virtual void loadImageInfo (int x, int y)
 Load information about the image eg. number of channels, tile size etc.
virtual void closeImage ()
 Close the image: Overloaded by child class.
virtual RawTile getTile (int h, int v, unsigned int r, int l, unsigned int t)
 Return an individual tile for a given angle and resolution.
virtual void getRegion (int ha, int va, unsigned int r, int layers, int x, int y, unsigned int w, unsigned int h, unsigned char *b)
 Return a region for a given angle and resolution.
const IIPImageoperator= (const IIPImage &)
 Assignment operator.

Public Attributes

std::string type
 Return the image type e.g. tif.
std::vector< unsigned int > image_widths
 The image pixel dimensions.
std::vector< unsigned int > image_heights
unsigned int tile_width
 The base tile pixel dimensions.
unsigned int tile_height
ColourSpaces colourspace
 The colour space of the image.
unsigned int numResolutions
 The number of available resolutions in this image.
unsigned int bpp
 The bits per pixel for this image.
unsigned int channels
 The number of channels for this image.
bool isSet
 Indicate whether we have opened and initialised some paramters for this image.
int currentX
 If we have an image sequence, the current X and Y position.
int currentY
std::map< const std::string,
std::string > 
metadata
 STL map to hold string metadata.
time_t timestamp
 Image modification timestamp.

Friends

int operator== (const IIPImage &, const IIPImage &)
 Comparison equality operator.
int operator!= (const IIPImage &, const IIPImage &)
 Comparison non-equality operator.

Detailed Description

Main class to handle the pyramidal image source.

Provides functions to open, get various information from an image source and get individual tiles. This class is the base class for specific image file formats, for example, Tiled Pyramidal TIFF images: TPTImage.h


Member Function Documentation

const std::string IIPImage::getFileName ( int  x,
int  y 
)

Return the full file path for a particular horizontal and vertical angle.

Parameters:
xhorizontal sequence angle
yvertical sequence angle
unsigned int IIPImage::getImageHeight ( int  n = 0)
inline

Return the image height in pixels for a given resolution.

Parameters:
nresolution number (0 is default and full size image)
unsigned int IIPImage::getImageWidth ( int  n = 0)
inline

Return the image width in pixels for a given resolution.

Parameters:
nresolution number (0 is default and full size image)

References image_widths.

std::string IIPImage::getMetadata ( const std::string &  index)
inline

Return image metadata.

Parameters:
indexmetadata field name

References metadata.

virtual void IIPImage::getRegion ( int  ha,
int  va,
unsigned int  r,
int  layers,
int  x,
int  y,
unsigned int  w,
unsigned int  h,
unsigned char *  b 
)
inlinevirtual

Return a region for a given angle and resolution.

Return a RawTile object: Overloaded by child class.

Parameters:
hahorizontal angle
vavertical angle
rresolution
layersnumber of layers to decode
xoffset in x direction
yoffset in y direction
wwidth of region
hheight of region
bimage buffer

Reimplemented in KakaduImage.

virtual RawTile IIPImage::getTile ( int  h,
int  v,
unsigned int  r,
int  l,
unsigned int  t 
)
inlinevirtual

Return an individual tile for a given angle and resolution.

Return a RawTile object: Overloaded by child class.

Parameters:
hhorizontal angle
vvertical angle
rresolution
lquality layers
ttile number

Reimplemented in KakaduImage, and TPTImage.

virtual void IIPImage::Load ( const std::string &  module)
inlinevirtual

Load the appropriate codec module for this image type.

Used only for dynamically loading codec modules. Overloaded by DSOImage class.

Parameters:
modulethe codec module path
virtual void IIPImage::loadImageInfo ( int  x,
int  y 
)
inlinevirtual

Load information about the image eg. number of channels, tile size etc.

Parameters:
xhorizontal sequence angle
yvertical sequence angle

Reimplemented in KakaduImage, and TPTImage.


The documentation for this class was generated from the following file: