Image Class Reference

Image objects are used to represent spatial data, for example a remote sensing data set. More...

#include <Image.h>

Inherits Data.

Inheritance diagram for Image:

Inheritance graph
[legend]
Collaboration diagram for Image:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Image (const char *name, int width, int height, NameList *classNames, NameList *dimNames)
 Creates an empty Image object, based on the passed meta-data.
 Image (const char *name, istream &is, int width, int height, NameList *classNames, NameList *dimNames, bool readDoubles=false)
 Creates an Image object, and fills it from the passed file stream, which refers to a binary data set.
int getWidth ()
 Accessor method.
int getHeight ()
 Accessor method.
void split (bool vert, int strips, string &baseFname)
 Splits the image into numStrips strips.
void flip ()
 Flips an image data set about its diagonal.
void show (string d1Str, string d2Str, string d3Str, ofstream &ofs)
 Simple image viewer for portable pixel map (.ppm) format.

Detailed Description

Image objects are used to represent spatial data, for example a remote sensing data set.

They associate a width and height with a Data object, and offer methods for:


Constructor & Destructor Documentation

Image::Image const char *  name,
int  width,
int  height,
NameList classNames,
NameList dimNames
[inline]
 

Creates an empty Image object, based on the passed meta-data.

The data can be filled in later using Data::loadFromStreamAscii(), Data::loadFromStreamBinary(), or Data::setData().

Parameters:
name The name by which to refer to the Image in logged messages.
width The X dimension of the Image in pixels.
height The Y dimension of the Image in pixels.
classNames NameList describing the label names for this data set.
dimNames The NameList that describes the data set's features.

Image::Image const char *  name,
istream &  is,
int  width,
int  height,
NameList classNames,
NameList dimNames,
bool  readDoubles = false
[inline]
 

Creates an Image object, and fills it from the passed file stream, which refers to a binary data set.

The data are assumed to be labeled, with the data labels following the data matrix in a second array.

Parameters:
name The name by which to refer to the Image in logged messages.
is The input stream that refers to the data file.
width The X dimension of the Image in pixels.
height The Y dimension of the Image in pixels.
classNames NameList describing the label names for this data set.
dimNames The NameList that describes the data set's features.
readDoubles If true, data are double-precision, otherwise false.


Member Function Documentation

void Image::flip  ) 
 

Flips an image data set about its diagonal.

int Image::getHeight  )  [inline]
 

Accessor method.

Returns:
The height of the Image in pixels

int Image::getWidth  )  [inline]
 

Accessor method.

Returns:
The width of the Image in pixels

void Image::show string  d1Str,
string  d2Str,
string  d3Str,
ofstream &  ofs
 

Simple image viewer for portable pixel map (.ppm) format.

Just specify the data bands to use for the R/G/B values.

Parameters:
d1Str Name of feature to represent Red.
d2Str Name of feature to represent Green.
d3Str Name of feature to represent Blue.
ofs Output file stream to send image data to.

void Image::split bool  vert,
int  numStrips,
string &  baseFname
 

Splits the image into numStrips strips.

The strips are then saved to numStrips files, each of the form 'baseFnamei.txt', with i varying from 0 to numStrips-1.

Parameters:
vert If true, the strips are vertical, otherwise horizontal.
numStrips How many pieces to divide the image into.
baseFname The base part of the file name to which to save the strip data.


The documentation for this class was generated from the following files:
Generated on Tue Dec 13 11:00:27 2005 for Classer by  doxygen 1.4.3