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

GrayImage Class Reference

#include <image.h>

List of all members.

Public Methods

 GrayImage ()
 GrayImage (unsigned int height, unsigned int width)
 GrayImage (string FileName)
 GrayImage (Magick::Image &magick_image)
void fromMagickImage (Magick::Image &magick_image)
 GrayImage (const GrayImage &other)
 ~GrayImage ()
GrayImage & operator= (GrayImage &rhs)
unsigned char & elementAt (unsigned int x, unsigned int y)
GtkWidget * toGTK ()
GdkPixbuf * toGDK ()
void readFile (string FileName)
void resize (int width, int height)
void cropCopy (const unsigned int x, const unsigned int y, GrayImage &to)
GrayImage * cropCopy (const unsigned int x, const unsigned int y, const unsigned int width, const unsigned int height)
GrayImage * copy ()
void sample (GrayImage &to)
void equalize ()
unsigned int getHeight (void)
unsigned int getWidth (void)
unsigned char * getData (void)

Protected Attributes

unsigned int height
unsigned int width
unsigned char * data
bool is_set

Friends

class ColorImage


Detailed Description

a simple 8-bit image that only stores grayscale values


Constructor & Destructor Documentation

GrayImage::GrayImage  
 

GrayImage::GrayImage unsigned int    height,
unsigned int    width
 

construct an empty image

Parameters:
height  image height
length  image length
Exceptions:
filter_exception 

GrayImage::GrayImage string    FileName
 

read in an image from a file

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

GrayImage::GrayImage Magick::Image &    magick_image
 

initilise based off of a Magick++ Image

Parameters:
magick_image  the image to start with
Exceptions:
filter_exception 

GrayImage::GrayImage const GrayImage &    other
 

copy constructor

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

GrayImage::~GrayImage  
 

delete the iamge data


Member Function Documentation

GrayImage * GrayImage::copy  
 

make an exact duplicate of this image

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

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

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
width  width of the crop
height  the height of the croped image
Exceptions:
filter_exception 

void GrayImage::cropCopy const unsigned int    x,
const unsigned int    y,
GrayImage &    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 

unsigned char & GrayImage::elementAt unsigned int    x,
unsigned int    y
 

gives access to 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 GrayImage::equalize  
 

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

Parameters:
image  image to be equalised
Exceptions:
filter_exception 

void GrayImage::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 

unsigned char * GrayImage::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 GrayImage::getHeight void   
 

get the hight

Returns:
the height of the image
Exceptions:
filter_exception 

unsigned int GrayImage::getWidth void   
 

get the width

Returns:
the width of the image
Exceptions:
filter_exception 

GrayImage & GrayImage::operator= GrayImage &    rhs
 

copy the other image into this one

Parameters:
rhs  the image on the rhs of the = sign
Exceptions:
filter_exception 

void GrayImage::readFile string    FileName
 

read an image in from a file

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

void GrayImage::resize int    width,
int    height
 

resize the image, deletes previously saved data

Parameters:
width, the  new width of the image
height  the new height of the image
Exceptions:
filter_exception 

void GrayImage::sample GrayImage &    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 * GrayImage::toGDK  
 

GtkWidget * GrayImage::toGTK  
 

convert to a GtkWidget image

Returns:
the GtkImage widget of the image
Exceptions:
filter_exception 


Friends And Related Function Documentation

friend class ColorImage [friend]
 


Member Data Documentation

unsigned char* GrayImage::data [protected]
 

the acctual data of the image

unsigned int GrayImage::height [protected]
 

the height of the image

bool GrayImage::is_set [protected]
 

is the data acctualy valid

unsigned int GrayImage::width [protected]
 

the 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