Canola
0.8.D001
|
#include <threshold.h>
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_threshold & | operator= (const image_threshold &rhs) |
Private Attributes | |
image::pointer | deeper |
double | level |
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.
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.
image_threshold::~image_threshold | ( | ) | [virtual] |
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.
deeper | The source of image data. |
level | The amount of intensity of interest |
Definition at line 26 of file threshold.cc.
image_threshold::image_threshold | ( | ) | [private] |
The default constructor. Do not use.
image_threshold::image_threshold | ( | const image_threshold & | rhs | ) | [private] |
The copy constructor. Do not use.
rhs | The right hand side of the initialization. |
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.
deeper | The source of image data. |
level | The 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.
x | The X cordinate of the pixel |
y | The Y cordinate of the pixel |
value | The 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.
rhs | The 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.
filename | The 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.
x | The X coordinate of the pixel to be set |
y | The Y coordinate of the pixel to be set |
value | The 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.
image::pointer image_threshold::deeper [private] |
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.