Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ColorImage Class Reference

#include <image.h>

List of all members.

Public Methods

 ColorImage ()
 ColorImage (unsigned int height, unsigned int width)
 ColorImage (string FileName)
 ColorImage (Magick::Image &magick_image)
void fromMagickImage (Magick::Image &magick_image)
 ColorImage (const ColorImage &other)
 ~ColorImage ()
void readFile (string FileName)
GtkWidget * toGTK ()
GdkPixbuf * toGDK ()
GrayImagetoGrayImage ()
void cropCopy (const unsigned int x, const unsigned int y, ColorImage &to)
ColorImage * cropCopy (const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height)
ColorImage * copy ()
void sample (ColorImage &to)
void equalize ()
COLORelementAt (unsigned int x, unsigned int y)
void dot (unsigned int x, unsigned int y, unsigned char red, unsigned char green, unsigned char blue)
void box (unsigned int x, unsigned int y, unsigned int width, unsigned int height, unsigned char red, unsigned char green, unsigned char blue)
unsigned int getHeight (void)
unsigned int getWidth (void)
COLORgetData (void)

Protected Attributes

int height
int width
COLORdata
bool is_set

Friends

class GrayImage


Detailed Description

a simple 8 bit color image this was written because imageMagick is just too slow for what we are trying to do


Constructor & Destructor Documentation

ColorImage::ColorImage  
 

defualt constructor

ColorImage::ColorImage unsigned int    height,
unsigned int    width
 

construct an empty image

Parameters:
height  image height
length  image length
Exceptions:
filter_exception 

ColorImage::ColorImage string    FileName
 

read in an image from a file

Parameters:
FileName  the name of the fiel to open
Exceptions:
filter_exception 

ColorImage::ColorImage Magick::Image &    magick_image
 

initilise based off of a Magick++ Image

Parameters:
magick_image  the image to start with
Exceptions:
filter_exception 

ColorImage::ColorImage const ColorImage &    other
 

copy constructor

Parameters:
other  an image that you wish to make a copy of
Exceptions:
filter_exception 

ColorImage::~ColorImage  
 

delete the image data


Member Function Documentation

void ColorImage::box unsigned int    x,
unsigned int    y,
unsigned int    width,
unsigned int    height,
unsigned char    red,
unsigned char    green,
unsigned char    blue
 

draw a box

Parameters:
x  the x coord of the upper left hand corner of the box
y  the y coord of the upper left hand corner of the box
width  the width fo the box
height  the height of the box
red  the color of the box
green  the color of the box
blue  the color of the box
Exceptions:
filter_exception 

ColorImage * ColorImage::copy  
 

make an exact duplicate of this image

Returns:
a pointer to an exact copy of this image
Exceptions:
filter_exception 

ColorImage * ColorImage::cropCopy const unsigned int    x,
const unsigned int    y,
const unsigned int    width,
const unsigned int    height
 

make a copy of a sub window the the image

Parameters:
x  the x coord of the upper left hand corner of the subimage
y  the y coord of the upper left hand corner of the subimage
widht  the width of the subimage
height  the height of the subimage
Returns:
a pointer to a ColorImage containing the pixles contained in the subimage
Exceptions:
filter_exception 

void ColorImage::cropCopy const unsigned int    x,
const unsigned int    y,
ColorImage &    to
 

make a copy of this placing it into 'to' croping it to a box starting at x,y with the specified width and height of to

Parameters:
x  the x coord
y  the y coord
to  image to be copied to
Exceptions:
filter_exception 

void ColorImage::dot unsigned int    x,
unsigned int    y,
unsigned char    red,
unsigned char    green,
unsigned char    blue
 

draw a dot

Parameters:
x  the x coord of the dot
y  the y coord of the dot
red  the color of the dot
green  the color of the dot
blue  the color of the dot
Exceptions:
filter_exception 

COLOR & ColorImage::elementAt unsigned int    x,
unsigned int    y
 

used to access a single pixle in the image

Parameters:
x  the x coord of the pixle
y  the y coord of the pixle
Exceptions:
filter_exception 

void ColorImage::equalize  
 

preform histogram qualization
This is based off of ImageMagick`s histogram equalization code

Parameters:
image  image to be equalised
Exceptions:
filter_exception 

void ColorImage::fromMagickImage Magick::Image &    magick_image
 

convert an imageMagick image to an IMAGE as quickly as possible

Parameters:
magick_image  the image to be converted
Exceptions:
filter_exception 

COLOR * ColorImage::getData void   
 

get a pointer to the acctual image data
WARNING: this should only be used by people who really know what they are doing, or by py people who will not modify it

Returns:
the height of the image
Exceptions:
filter_exception 

unsigned int ColorImage::getHeight void   
 

get the hight

Returns:
the height of the image
Exceptions:
filter_exception 

unsigned int ColorImage::getWidth void   
 

get the width

Returns:
the width of the image
Exceptions:
filter_exception 

void ColorImage::readFile string    FileName
 

read an image in from a file

Parameters:
FileName  the name of the file to read
Exceptions:
filter_exception 

void ColorImage::sample ColorImage &    to
 

make a copy from to to resizing it to the width and height of to

Parameters:
to  image to be copied to
Exceptions:
filter_exception 

GdkPixbuf * ColorImage::toGDK  
 

GrayImage * ColorImage::toGrayImage  
 

convert an image to a GrayScale

Returns:
a copy of the original image as a GrayImage
Exceptions:
filter_exception 

GtkWidget * ColorImage::toGTK  
 

convert to a GtkWidget image

Returns:
the GtkImage widget of the image
Exceptions:
filter_exception 


Friends And Related Function Documentation

friend class GrayImage [friend]
 


Member Data Documentation

COLOR* ColorImage::data [protected]
 

acctual image data

int ColorImage::height [protected]
 

height of the image

bool ColorImage::is_set [protected]
 

is the data acctualy valid

int ColorImage::width [protected]
 

width of the image


The documentation for this class was generated from the following files:
Generated on Wed Apr 23 10:42:35 2003 for BioFilter by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002