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

details ImageImportInfo Class Reference VIGRA

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 Types

typedef ArrayVector< unsigned
char > 
ICCProfile

Public Methods

VIGRA_EXPORT ImageImportInfo (const char *)
VIGRA_EXPORT const char * getFileType () const
VIGRA_EXPORT int width () const
VIGRA_EXPORT int height () const
VIGRA_EXPORT int numBands () const
VIGRA_EXPORT int numExtraBands () const
VIGRA_EXPORT Size2D size () const
VIGRA_EXPORT bool isGrayscale () const
VIGRA_EXPORT bool isColor () const
VIGRA_EXPORT const char * getPixelType () const
VIGRA_EXPORT PixelType pixelType () const
 deprecated: use getPixelType()

VIGRA_EXPORT bool isByte () const
VIGRA_EXPORT Diff2D getPosition () const
VIGRA_EXPORT float getXResolution () const
VIGRA_EXPORT float getYResolution () const
VIGRA_EXPORT const ICCProfilegetICCProfile () 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.


Member Typedef Documentation


typedef ArrayVector<unsigned char> ICCProfile

 

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


Constructor & Destructor Documentation


VIGRA_EXPORT 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


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


VIGRA_EXPORT const ICCProfile& getICCProfile  

 

Returns a reference to the ICC profile.

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


VIGRA_EXPORT 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)
"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)


VIGRA_EXPORT Diff2D getPosition  

 

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


VIGRA_EXPORT float getXResolution  

 

Returns the image resolution in horizontal direction


VIGRA_EXPORT float getYResolution  

 

Returns the image resolution in vertical direction


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


VIGRA_EXPORT bool isByte  

 

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


VIGRA_EXPORT bool isColor  

 

Returns true if the image is colored (RGB).


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


VIGRA_EXPORT int numBands  

 

Get the total number of bands in the image.


VIGRA_EXPORT int numExtraBands  

 

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


VIGRA_EXPORT Size2D size  

 

Get size of the image.


VIGRA_EXPORT 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:

© Ullrich Köthe (koethe@informatik.uni-hamburg.de)
Cognitive Systems Group, University of Hamburg, Germany

html generated using doxygen and Python
VIGRA 1.5.0 (7 Dec 2006)