IIPImage Class Reference

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

`#include <IIPImage.h>`

Inheritance diagram for IIPImage:

## Public Member Functions

| 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 ()
| 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.
ImageFormat | getImageFormat ()
| 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 ()
| 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.
unsigned 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.
float | getMinValue (int n=0)
| Return the minimum sample value for each channel.
float | getMaxValue (int n=0)
| Return the minimum sample value for each channel.
SampleType | getSampleType ()
| Return the sample format type.
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.
const std::string & | getMetadata (const std::string &index)
| Return image metadata.
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 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 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.
IIPImage & | operator= (IIPImage image)
| Assignment operator.

## Public Attributes

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 | 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.

## Protected Attributes

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.

## 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 such as Tiled Pyramidal TIFF images via TPTImage.h and JPEG2000 via Kakadu.h

## Constructor & Destructor Documentation

## IIPImage() [1/2]

IIPImage::IIPImage | ( | const std::string & | s | ) |

inline

Constructer taking the image path as parameter.

Parameters

  s | image path

References bpc, channels, colourspace, currentX, format, isSet, numResolutions, quality_layers, sampleType, tile_width, timestamp, and virtual_levels.

## IIPImage() [2/2]

IIPImage::IIPImage | ( | const IIPImage & | image | ) |

inline

Copy Constructor taking reference to another IIPImage object.

Parameters

  image | IIPImage object

References bpc, channels, colourspace, currentX, format, histogram, IIPImage(), image_widths, isSet, lut, metadata, min, numResolutions, quality_layers, sampleType, tile_width, timestamp, and virtual_levels.

## Member Function Documentation

## closeImage()

virtual void IIPImage::closeImage | ( |  | ) |

inline virtual

Close the image: Overloaded by child class.

Reimplemented in KakaduImage, OpenJPEGImage, and TPTImage.

## getFileName()

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

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

Parameters

  x | horizontal sequence angle
  y | vertical sequence angle

## getImageHeight()

unsigned int IIPImage::getImageHeight | ( | int | n = 0 | ) |

inline

Return the image height in pixels for a given resolution.

Parameters

  n | resolution number (0 is default and full size image)

## getImageWidth()

unsigned int IIPImage::getImageWidth | ( | int | n = 0 | ) |

inline

Return the image width in pixels for a given resolution.

Parameters

  n | resolution number (0 is default and full size image)

References image_widths.

## getMaxValue()

float IIPImage::getMaxValue | ( | int | n = 0 | ) |

inline

Return the minimum sample value for each channel.

Parameters

  n | channel index

## getMetadata()

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

inline

Return image metadata.

Parameters

  index | metadata field name

References metadata.

## getMinValue()

float IIPImage::getMinValue | ( | int | n = 0 | ) |

inline

Return the minimum sample value for each channel.

Parameters

  n | channel index

References min.

## getRegion()

virtual RawTile IIPImage::getRegion | ( | int | ha,
|  | int | va,
|  | unsigned int | r,
|  | int | layers,
|  | int | x,
|  | int | y,
|  | unsigned int | w,
|  | unsigned int | h )

inline virtual

Return a region for a given angle and resolution.

Return a RawTile object: Overloaded by child class.

Parameters

  ha | horizontal angle
  va | vertical angle
  r | resolution
  layers | number of layers to decode
  x | offset in x direction
  y | offset in y direction
  w | width of region
  h | height of region

Returns
  RawTile image

Reimplemented in KakaduImage, and OpenJPEGImage.

## getTile()

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

inline virtual

Return an individual tile for a given angle and resolution.

Return a RawTile object: Overloaded by child class.

Parameters

  h | horizontal angle
  v | vertical angle
  r | resolution
  l | quality layers
  t | tile number

Reimplemented in KakaduImage, OpenJPEGImage, and TPTImage.

## Load()

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

inline virtual

Load the appropriate codec module for this image type.

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

Parameters

  module | the codec module path

## loadImageInfo()

virtual void IIPImage::loadImageInfo | ( | int | x,
|  | int | y )

inline virtual

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

Parameters

  x | horizontal sequence angle
  y | vertical sequence angle

Reimplemented in KakaduImage, OpenJPEGImage, and TPTImage.

## openImage()

virtual void IIPImage::openImage | ( |  | ) |

inline virtual

Open the image: Overloaded by child class.

Reimplemented in KakaduImage, OpenJPEGImage, and TPTImage.

## operator=()

IIPImage & IIPImage::operator= | ( | IIPImage | image | ) |

inline

Assignment operator.

Parameters

  image | IIPImage object

References IIPImage(), and swap().

Referenced by KakaduImage::operator=(), and TPTImage::operator=().

## regionDecoding()

virtual bool IIPImage::regionDecoding | ( |  | ) |

inline virtual

Return whether this image type directly handles region decoding.

Reimplemented in KakaduImage, and OpenJPEGImage.

## swap()

void IIPImage::swap | ( | IIPImage & | a,
|  | IIPImage & | b )

Swap function.

Parameters

  a | Object to copy to
  b | Object to copy from

References IIPImage().

Referenced by operator=().

## updateTimestamp()

void IIPImage::updateTimestamp | ( | const std::string & | s | ) |

Get the image timestamp.

Parameters

  s | file path

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

- IIPImage.h