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

| ImageImportInfo [Image Import/Export Facilities] |

Argument object for the function importImage(). More...

`#include <vigra/imageinfo.hxx>`

List of all members.

## Public Types

typedef ArrayVector< unsigned char > | ICCProfile

## Public Member Functions

const char * | getFileType () const
const ICCProfile & | getICCProfile () const
const char * | getPixelType () const
Diff2D | getPosition () const
float | getXResolution () const
float | getYResolution () const
int | height () const
| ImageImportInfo (const char *)
bool | isByte () const
bool | isColor () const
bool | isGrayscale () const
int | numBands () const
int | numExtraBands () const
PixelType | pixelType () const
MultiArrayShape< 2 >::type | shape () const
Size2D | size () const
int | width () 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:

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

## Member Typedef Documentation

typedef ArrayVector<unsigned char> ICCProfile

ICC profiles (handled as raw data so far). see getICCProfile()/setICCProfile()

## 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 | ( |  | ) | const

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 ICCProfile& getICCProfile | ( |  | ) | const

Returns a reference to the ICC profile.

Note: The reference will become invalid when the ImageImportInfo object has been destroyed.

const char* getPixelType | ( |  | ) | const

Query the pixel type of the image.

Possible values are:

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

Diff2D getPosition | ( |  | ) | const

Returns the layer offset of the current image, if there is one

float getXResolution | ( |  | ) | const

Returns the image resolution in horizontal direction

float getYResolution | ( |  | ) | const

Returns the image resolution in vertical direction

int height | ( |  | ) | const

Get height of the image.

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

bool isByte | ( |  | ) | const

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

bool isColor | ( |  | ) | const

Returns true if the image is colored (RGB).

Examples:
  boundarytensor.cxx.

bool isGrayscale | ( |  | ) | const

Returns true if the image is gray scale.

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

int numBands | ( |  | ) | const

Get the total number of bands in the image.

int numExtraBands | ( |  | ) | const

Get the number of extra (non color) bands in the image. Usually these are the alpha channels.

PixelType pixelType | ( |  | ) | const

Query the pixel type of the image.

Same as getPixelType(), but the result is returned as a ImageImportInfo::PixelType enum. This is useful to implement a switch() on the pixel type.

Possible values are:

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

MultiArrayShape<2>::type shape | ( |  | ) | const

Get size of the image in a form compatible to MultiArray.

Size2D size | ( |  | ) | const

Get size of the image.

int width | ( |  | ) | const

Get width of the image.

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

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

- vigra/imageinfo.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.7.1 (3 Dec 2010)