[ VIGRA Homepage | Class Index | Function Index | File Index | Main Page ]

| ImageImportInfo Class Reference |
--- | --- | ---

Argument object for the function importImage(). See importImage() for a usage example. This object must be used to read an image from disk and enquire about its properties. More...

`#include "vigra/imageinfo.hxx"`

## Public Methods

| ImageImportInfo (const char *)
const char * | getFileType () const
int | width () const
int | height () const
int | numBands () const
Size2D | size () const
bool | isGrayscale () const
bool | isColor () const
const char * | getPixelType () const
PixelType | pixelType () const
| deprecated: use getPixelType()
bool | isByte () const
float | getXResolution () const
float | getYResolution () const

## Detailed Description

Argument object for the function importImage(). See importImage() for a usage example. This object must be used to read an image from disk and enquire about its properties.

#include "vigra/imageinfo.hxx"
Namespace: vigra

Examples:

  convert.cxx, edge.cxx, invert.cxx, invert_explicitly.cxx, profile.cxx, pyramid.cxx, resize.cxx, smooth.cxx, subimage.cxx, and watershed.cxx.

## Constructor & Destructor Documentation

ImageImportInfo | ( | const char * |  | ) |

Construct ImageImportInfo object.

The image with the given filename is read into memory. The file type will be determined by the first few bytes of the file (magic number). Recognized file types:

"BMP"
  Microsoft Windows bitmap image file.
"JPEG"
  Joint Photographic Experts Group JFIF format (only available if libjpeg is installed).
"GIF"
  CompuServe graphics interchange format; 8-bit color.
"PNG"
  Portable Network Graphics (only available if libpng is installed).
"PBM"
  Portable bitmap format (black and white).
"PGM"
  Portable graymap format (gray scale).
"PNM"
  Portable anymap.
"PPM"
  Portable pixmap format (color).
"SUN"
  SUN Rasterfile.
"TIFF"
  Tagged Image File Format. (only available if libtiff is installed.)
"VIFF"
  Khoros Visualization image file.

## Member Function Documentation

const char* getFileType | ( |  | ) |

Get the file type of the image associated with this info object.

See ImageImportInfo::ImageImportInfo for a list of the available file types.

Examples:
  invert.cxx.

const char* getPixelType | ( |  | ) |

Query the pixel type of the image.

Possible values are:

"UINT8"
  8-bit unsigned integer (unsigned char)
"INT16"
  16-bit signed integer (short)
"INT32"
  32-bit signed integer (long)
"FLOAT"
  32-bit floating point (float)
"DOUBLE"
  64-bit floating point (double)

float getXResolution | ( |  | ) |

| Returns the image resolution in horizontal direction

float getYResolution | ( |  | ) |

| Returns the image resolution in vertical direction

int height | ( |  | ) |

Get height of the image.

Examples:
  convert.cxx, edge.cxx, invert.cxx, invert_explicitly.cxx, profile.cxx, pyramid.cxx, resize.cxx, smooth.cxx, subimage.cxx, and watershed.cxx.

bool isByte | ( |  | ) |

| Returns true if the image has 1 byte per pixel (gray) or 3 bytes per pixel (RGB).

bool isColor | ( |  | ) |

| Returns true if the image is colored (RGB).

bool isGrayscale | ( |  | ) |

Returns true if the image is gray scale.

Examples:
  convert.cxx, edge.cxx, invert.cxx, invert_explicitly.cxx, profile.cxx, pyramid.cxx, resize.cxx, smooth.cxx, subimage.cxx, and watershed.cxx.

int numBands | ( |  | ) |

| Get the number bands in the image.

Size2D size | ( |  | ) |

| Get size of the image.

int width | ( |  | ) |

Get width of the image.

Examples:
  convert.cxx, edge.cxx, invert.cxx, invert_explicitly.cxx, profile.cxx, pyramid.cxx, resize.cxx, smooth.cxx, subimage.cxx, and watershed.cxx.

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

- vigra/imageinfo.hxx

© Ullrich Köthe (koethe@informatik.uni-hamburg.de) Cognitive Systems Group, University of Hamburg, Germany | html generated using doxygen and Python VIGRA 1.4.0 (21 Dec 2005)