KakaduImage Class Reference

Image class for Kakadu JPEG2000 Images: Inherits from IIPImage. Uses the Kakadu library. More...

`#include <KakaduImage.h>`

Inheritance diagram for KakaduImage:

## Public Types

enum | KDU_READMODE { KDU_FAST , KDU_FUSSY , KDU_RESILIENT }
| Read-mode types. More...

## Public Member Functions

| KakaduImage ()
| Constructor.
| KakaduImage (const std::string &path)
| Constructor.
| KakaduImage (const KakaduImage &image)
| Copy Constructor.
| KakaduImage (const IIPImage &image)
| Constructor from IIPImage object.
KakaduImage & | operator= (KakaduImage image)
| Assignment Operator.
| ~KakaduImage ()
| 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 JPEG2000 image.
bool | regionDecoding ()
| Return whether this image type directly handles region decoding.
RawTile | getTile (int x, int y, unsigned int r, int l, unsigned int t)
| Overloaded function for getting a particular tile.
RawTile | getRegion (int ha, int va, unsigned int r, int l, int x, int y, unsigned int w, unsigned int h)
| Overloaded function for returning a region for a given angle and resolution.
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 ()
| 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 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.
IIPImage & | operator= (IIPImage image)
| Assignment operator.

## Public Attributes

KDU_READMODE | kdu_readmode
| Read-mode.
Public Attributes inherited from IIPImage
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.

## Additional Inherited Members

Protected Attributes inherited from IIPImage
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.

## Detailed Description

Image class for Kakadu JPEG2000 Images: Inherits from IIPImage. Uses the Kakadu library.

## Member Enumeration Documentation

## KDU_READMODE

enum KakaduImage::KDU_READMODE

Read-mode types.

Enumerator
KDU_FAST | Default fast mode.
KDU_FUSSY | Fussy mode.
KDU_RESILIENT | Reslient mode for damaged JP2 streams.

## Constructor & Destructor Documentation

## KakaduImage() [1/3]

KakaduImage::KakaduImage | ( | const std::string & | path | ) |

inline

Constructor.

Parameters

  path | image path

References IIPImage::IIPImage(), and IIPImage::tile_width.

## KakaduImage() [2/3]

KakaduImage::KakaduImage | ( | const KakaduImage & | image | ) |

inline

Copy Constructor.

Parameters

  image | Kakadu object

References IIPImage::IIPImage(), and KakaduImage().

## KakaduImage() [3/3]

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

inline

Constructor from IIPImage object.

Parameters

  image | IIPImage object

References IIPImage::IIPImage(), and IIPImage::tile_width.

## Member Function Documentation

## closeImage()

void KakaduImage::closeImage | ( |  | ) |

virtual

Overloaded function for closing a JPEG2000 image.

Reimplemented from IIPImage.

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

## getRegion()

RawTile KakaduImage::getRegion | ( | int | ha,
|  | int | va,
|  | unsigned int | r,
|  | int | l,
|  | int | x,
|  | int | y,
|  | unsigned int | w,
|  | unsigned int | h )

virtual

Overloaded function for returning 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
  l | number of quality layers to decode
  x | x coordinate
  y | y coordinate
  w | width of region
  h | height of region

Returns
  RawTile image

Reimplemented from IIPImage.

## getTile()

RawTile KakaduImage::getTile | ( | int | x,
|  | int | y,
|  | unsigned int | r,
|  | int | l,
|  | unsigned int | t )

virtual

Overloaded function for getting a particular tile.

Parameters

  x | horizontal sequence angle
  y | vertical sequence angle
  r | resolution
  l | number of quality layers to decode
  t | tile number

Reimplemented from IIPImage.

## loadImageInfo()

void KakaduImage::loadImageInfo | ( | int | x,
|  | int | y )

virtual

Overloaded function for loading TIFF image information.

Parameters

  x | horizontal sequence angle
  y | vertical sequence angle

Reimplemented from IIPImage.

## openImage()

void KakaduImage::openImage | ( |  | ) |

virtual

Overloaded function for opening a TIFF image.

Reimplemented from IIPImage.

## operator=()

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

inline

Assignment Operator.

Parameters

  image | object

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

## regionDecoding()

bool KakaduImage::regionDecoding | ( |  | ) |

inline virtual

Return whether this image type directly handles region decoding.

Reimplemented from IIPImage.

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

- KakaduImage.h