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 Class Reference

Image class for Tiled Pyramidal Images: Inherits from IIPImage. Uses libtiff. More...

#include <TPTImage.h>

Inheritance diagram for TPTImage:
IIPImage

Public Member Functions

 TPTImage ()
 Constructor.
 
 TPTImage (const std::string &path)
 Constructor.
 
 TPTImage (const TPTImage &image)
 Copy Constructor.
 
TPTImageoperator= (TPTImage image)
 Assignment Operator.
 
 TPTImage (const IIPImage &image)
 Construct from an IIPImage object.
 
 ~TPTImage ()
 Destructor.
 
void openImage ()
 Overloaded function for opening a TIFF image.
 
void loadImageInfo (int x, int y)
 Overloaded function for loading TIFF image information.
 
void closeImage ()
 Overloaded function for closing a TIFF image.
 
RawTile getTile (int x, int y, unsigned int r, int l, unsigned int t)
 Overloaded function for getting a particular tile.
 
- Public Member Functions inherited from IIPImage
 IIPImage ()
 Default Constructor.
 
 IIPImage (const std::string &s)
 Constructer taking the image path as parameter.
 
 IIPImage (const IIPImage &image)
 Copy Constructor taking reference to another IIPImage object.
 
virtual ~IIPImage ()
 Virtual Destructor.
 
void Initialise ()
 Test the image and initialise some parameters.
 
void swap (IIPImage &a, IIPImage &b)
 Swap function.
 
std::list< int > getVerticalViewsList () const
 Return a list of available vertical angles.
 
std::list< int > getHorizontalViewsList () const
 Return a list of horizontal angles.
 
const std::string & getImagePath () const
 Return the image path.
 
const std::string getFileName (int x, int y)
 Return the full file path for a particular horizontal and vertical angle.
 
ImageFormat getImageFormat () const
 Get the image format.
 
void updateTimestamp (const std::string &s)
 Get the image timestamp.
 
const std::string getTimestamp ()
 Get a HTTP RFC 1123 formatted timestamp.
 
bool set () const
 Check whether this object has been initialised.
 
void setFileSystemPrefix (const std::string &prefix)
 Set a file system prefix for added security.
 
void setFileSystemSuffix (const std::string &s)
 Set a file system suffix.
 
void setFileNamePattern (const std::string &pattern)
 Set the file name pattern used in image sequences.
 
unsigned int getNumResolutions () const
 Return the number of available resolutions in the image.
 
int getNativeResolution (const int res) const
 Return index of the resolution within the image file.
 
unsigned int getNumBitsPerPixel () const
 Return the number of bits per pixel for this image.
 
unsigned int getNumChannels () const
 Return the number of channels for this image.
 
float getMinValue (int n=0) const
 Return the minimum sample value for each channel.
 
float getMaxValue (int n=0) const
 Return the minimum sample value for each channel.
 
SampleType getSampleType () const
 Return the sample format type.
 
unsigned int getImageWidth (int n=0) const
 Return the image width in pixels for a given resolution.
 
unsigned int getImageHeight (int n=0) const
 Return the image height in pixels for a given resolution.
 
unsigned int getTileWidth (int n=-1) const
 Return the tile width in pixels for a given resolution.
 
unsigned int getTileHeight (int n=-1) const
 Return the tile height in pixels for a given resolution.
 
ColourSpaces getColourSpace () const
 Return the colour space for this image.
 
bool isStack () const
 Return whether image is a single-file image stack.
 
std::list< StackgetStack () const
 Load stack info.
 
const std::string & getMetadata (const std::string &index)
 Return image metadata.
 
float getHorizontalDPI () const
 Return physical resolution (DPI) in pixels/meter horizontally.
 
float getVerticalDPI () const
 Return physical resolution (DPI) in pixels/meter vertically.
 
virtual bool regionDecoding ()
 Return whether this image type directly handles region decoding.
 
virtual void Load (const std::string &module)
 Load the appropriate codec module for this image type.
 
virtual std::string getDescription () const
 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 RawTile getRegion (int ha, int va, unsigned int r, int layers, int x, int y, unsigned int w, unsigned int h)
 Return a region for a given angle and resolution.
 
IIPImageoperator= (IIPImage image)
 Assignment operator.
 

Static Public Member Functions

static void setupLogging ()
 Overloaded static function for seting up logging for codec library.
 
- Static Public Member Functions inherited from IIPImage
static void setupLogging ()
 Setup logging for codec library errors and warnings.
 

Additional Inherited Members

- Public Attributes inherited from IIPImage
std::vector< unsigned int > image_widths
 The image pixel dimensions.
 
std::vector< unsigned int > image_heights
 
std::vector< unsigned int > tile_widths
 The tile dimensions for each resolution.
 
std::vector< unsigned int > tile_heights
 
ColourSpaces colourspace
 The colour space of the image.
 
float dpi_x
 Native physical resolution in both X and Y.
 
float dpi_y
 
int dpi_units
 Units for native physical resolution.
 
unsigned int numResolutions
 The number of available resolutions in this image.
 
unsigned int bpc
 The bits per channel for this image.
 
unsigned int channels
 The number of channels for this image.
 
SampleType sampleType
 The sample format type (fixed or floating point)
 
std::vector< float > min
 The min and max sample value for each channel.
 
std::vector< float > max
 
unsigned int quality_layers
 Quality layers.
 
bool isSet
 Indicate whether we have opened and initialised some parameters for this image.
 
int currentX
 If we have an image sequence, the current X and Y position.
 
int currentY
 
std::vector< unsigned int > histogram
 Image histogram.
 
std::map< const std::string, std::string > metadata
 STL map to hold string metadata.
 
time_t timestamp
 Image modification timestamp.
 
- Static Public Attributes inherited from IIPImage
static bool logging
 Our logging stream - declared statically.
 
- Protected Attributes inherited from IIPImage
std::list< int > horizontalAnglesList
 The list of available horizontal angles (for image sequences)
 
std::list< int > verticalAnglesList
 The list of available vertical angles (for image sequences)
 
std::vector< int > lut
 LUT.
 
unsigned int virtual_levels
 Number of resolution levels that don't physically exist in file.
 
ImageFormat format
 Return the image format e.g. tif.
 
PyramidType pyramid
 Define how pyramid is structured.
 
std::list< Stackstack
 Whether we have an image stack consisting of multiple images within a single file.
 
std::vector< uint32_t > resolution_ids
 

Detailed Description

Image class for Tiled Pyramidal Images: Inherits from IIPImage. Uses libtiff.

Constructor & Destructor Documentation

◆ TPTImage() [1/3]

TPTImage::TPTImage ( const std::string &  path)
inline

Constructor.

Parameters
pathimage path

◆ TPTImage() [2/3]

TPTImage::TPTImage ( const TPTImage image)
inline

Copy Constructor.

Parameters
imageIIPImage object

◆ TPTImage() [3/3]

TPTImage::TPTImage ( const IIPImage image)
inline

Construct from an IIPImage object.

Parameters
imageIIPImage object

Member Function Documentation

◆ closeImage()

void TPTImage::closeImage ( )
virtual

Overloaded function for closing a TIFF image.

Reimplemented from IIPImage.

Referenced by operator=(), and ~TPTImage().

◆ getTile()

RawTile TPTImage::getTile ( int  x,
int  y,
unsigned int  r,
int  l,
unsigned int  t 
)
virtual

Overloaded function for getting a particular tile.

Parameters
xhorizontal sequence angle
yvertical sequence angle
rresolution
lquality layers
ttile number

Reimplemented from IIPImage.

◆ loadImageInfo()

void TPTImage::loadImageInfo ( int  x,
int  y 
)
virtual

Overloaded function for loading TIFF image information.

Parameters
xhorizontal sequence angle
yvertical sequence angle

Reimplemented from IIPImage.

◆ openImage()

void TPTImage::openImage ( )
virtual

Overloaded function for opening a TIFF image.

Reimplemented from IIPImage.

◆ operator=()

TPTImage & TPTImage::operator= ( TPTImage  image)
inline

Assignment Operator.

Parameters
imageTPTImage object

References closeImage(), and IIPImage::operator=().


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