Canola  0.8.D001
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes
image_threshold Class Reference

#include <threshold.h>

Inheritance diagram for image_threshold:
image

List of all members.

Public Types

typedef boost::shared_ptr
< image_threshold
pointer

Public Member Functions

virtual ~image_threshold ()

Static Public Member Functions

static pointer create (const image::pointer &deeper, double level)

Protected Member Functions

const char * type_name (void) const
void get_pixel (int, int, icon_pixel &) const
void set_pixel (int, int, const icon_pixel &)
unsigned int get_width (void) const
unsigned int get_height (void) const
void save_to_file (const std::string &) const

Private Member Functions

 image_threshold (const image::pointer &deeper, double level)
 image_threshold ()
 image_threshold (const image_threshold &rhs)
image_thresholdoperator= (const image_threshold &rhs)

Private Attributes

image::pointer deeper
double level

Detailed Description

The image_threshold class is used to represent a filter that thresholds and image avainst a certain pixel value.

Definition at line 27 of file threshold.h.


Member Typedef Documentation

typedef boost::shared_ptr<image_threshold> image_threshold::pointer

The pointer type is to be sed to point at any image instance.

Reimplemented from image.

Definition at line 31 of file threshold.h.


Constructor & Destructor Documentation

The destructor.

Definition at line 21 of file threshold.cc.

image_threshold::image_threshold ( const image::pointer deeper,
double  level 
) [private]

The constructor. It is private on purpose, use the create class method instead.

Parameters:
deeperThe source of image data.
levelThe amount of intensity of interest

Definition at line 26 of file threshold.cc.

The default constructor. Do not use.

The copy constructor. Do not use.

Parameters:
rhsThe right hand side of the initialization.

Member Function Documentation

image_threshold::pointer image_threshold::create ( const image::pointer deeper,
double  level 
) [static]

The create class method is used to create new dynamically allocated instance of this class.

Parameters:
deeperThe source of image data.
levelThe amount of intensity of interest

Definition at line 37 of file threshold.cc.

unsigned image_threshold::get_height ( void  ) const [protected, virtual]

The get_height method may be used to obtain the height of the image, in pixels.

Implements image.

Definition at line 52 of file threshold.cc.

void image_threshold::get_pixel ( int  x,
int  y,
icon_pixel value 
) const [protected, virtual]

The get_pixel method may be used to obtain the value of the pixel at the given location.

Parameters:
xThe X cordinate of the pixel
yThe Y cordinate of the pixel
valueThe place where the pixel value is to be stored on return.

Implements image.

Definition at line 76 of file threshold.cc.

unsigned image_threshold::get_width ( void  ) const [protected, virtual]

The get_width method may be used to obtain the width of the image, in pixels.

Implements image.

Definition at line 44 of file threshold.cc.

image_threshold& image_threshold::operator= ( const image_threshold rhs) [private]

The assignment operator.

Parameters:
rhsThe right hand side of the assignment.
void image_threshold::save_to_file ( const std::string &  filename) const [protected, virtual]

The save_to_file method is used to store the image data into a file on disk.

Parameters:
filenameThe name of the file to be written.

Implements image.

Definition at line 60 of file threshold.cc.

void image_threshold::set_pixel ( int  x,
int  y,
const icon_pixel value 
) [protected, virtual]

The set_pixel method may be used to set the value of the pixel at the given location. Transparency is ignored, the pixel becomes exactly as given; if you want transparentcy taken into account, use overlay_pixel. The pen_clr tracks the given value.

Parameters:
xThe X coordinate of the pixel to be set
yThe Y coordinate of the pixel to be set
valueThe value of the pixel to be set.

Implements image.

Definition at line 89 of file threshold.cc.

const char * image_threshold::type_name ( void  ) const [protected, virtual]

The type_name method is used to obtain the name of the type of this image format.

Implements image.

Definition at line 68 of file threshold.cc.


Member Data Documentation

The deeper instance variable is used to remember the source of data to be filtered.

Definition at line 84 of file threshold.h.

double image_threshold::level [private]

The level instance variable is used to remember the amount of intensity of interest.

Definition at line 90 of file threshold.h.


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