#include <ImageRGB.h>
Inheritance diagram for ImageRGB::

Public Types | |
| enum | FieldSelector { RED, GREEN, BLUE } |
| Field selectors for field based methods. More... | |
Public Methods | |
| ImageRGB (unsigned int width, unsigned int height) | |
| Create an image with the given dimensions. More... | |
| ImageRGB (char *, FileFormat) | |
| Create an image from a graphics file. More... | |
| ImageRGB (ImageRGB &) | |
| Copy Constructor. More... | |
| ImageRGB (ImageRGB &, unsigned int min_x, unsigned int min_y, unsigned int max_x, unsigned int max_y) | |
| Create an image from a portion of another image. More... | |
| ~ImageRGB () | |
| Destructor for ImageRGB class. More... | |
| void | set_pixel (unsigned int x, unsigned int y, PixelRGB p) |
| set the value of a pixel specified by (x,y). More... | |
| void | set_rgb (unsigned int x, unsigned int y, int red, int green, int blue) |
| Set the red, green and blue values of a pixel specified by (x,y). More... | |
| void | set_field (unsigned int x, unsigned int y, FieldSelector, int value) |
| Set the selected fields value of a pixel specified by (x,y). More... | |
| void | get_pixel (unsigned int x, unsigned int y, PixelRGB &p) |
| Return the red, green and blue values of the pixel specified by (x,y) in p. More... | |
| int | get_field (unsigned int x, unsigned int y, FieldSelector) |
| Return the selected fields value of a pixel specified by (x,y). More... | |
| ImageRGB& | clear (int=0) |
| Set to value (clear) all of the pixels in the image. More... | |
| ImageRGB& | clear (PixelRGB &) |
| Set all of the pixels in the image to the specified value. More... | |
| ImageRGB& | clear_field (FieldSelector, int=0) |
| Set to value (clear) all values in the selected field. More... | |
| ImageRGB& | copy (ImageRGB &img) |
| Copy data from from img. More... | |
| ImageRGB& | copy (ImageRGB &img, unsigned int min_x, unsigned int min_y, unsigned int max_x, unsigned int max_y, unsigned int start_x, unsigned int start_y) |
| Copy block of data from img. More... | |
| bool | save (char *, FileFormat) |
| Save in graphics file format. More... | |
| ImageRGB& | operator= (ImageRGB &img) |
| Overload equals (=) operator for two images. | |
| bool | draw_line (int x_start, int y_start, int x_end, int y_end, PixelRGB pix) |
| Method draws a straight line from point (x_start,y_start) to (x_end,y_end) of colour described by PixelRGB pix. More... | |
| bool | draw_filled_circle (unsigned int centre_x, unsigned int centre_y, unsigned int radius, PixelRGB pix) |
| Method draws a filled circle with centre at point (centre_x,centre_y) of radius radius and colour described by PixelRGB pix. More... | |
| bool | enhance_contrast () |
| Enhances contrast in image by stretching RGB to full range using a linear multiplier. | |
| void | normalise_colourspace (int scale_factor) |
| Normalises the colourspace by dividing all RGB values by R+G+B and multiplying by scale_factor. | |
| void | quick_grey_and_scale_down (unsigned int scale_fact, ImageGrey &img) |
| Combined integer scale down (sub-sampling) and greyscale conversion. | |
| void | histogram_segment (Histogram &hist, float threshold, ImageRGB &result) |
| Produces a binary image based on the image and the colour histogram 'hist'. More... | |
| void | histogram_segment (Histogram &hist, float threshold, bool *result) |
| Produces a binary image based on the image and the colour histogram 'hist'. More... | |
Public Attributes | |
| PixelRGB* | data |
| RGB image data. | |
The image is stored as an array of ints, each pixel spanning three ints (one for each of its red, green and blue values).
Definition at line 30 of file ImageRGB.h.
|
|
Field selectors for field based methods.
Definition at line 40 of file ImageRGB.h. |
|
|
Create an image with the given dimensions. Sets the parameters Width and Height to the inputs width and height.
Definition at line 62 of file ImageRGB.cpp. |
|
|
Create an image from a graphics file. Sets the parameters Width and Height to the inputs width and height.
Definition at line 78 of file ImageRGB.cpp. |
|
|
Copy Constructor.
Definition at line 31 of file ImageRGB.cpp. |
|
|
Create an image from a portion of another image.
Definition at line 44 of file ImageRGB.cpp. |
|
|
Destructor for ImageRGB class. Frees memory allocated to array: Definition at line 167 of file ImageRGB.cpp. |
|
|
Set all of the pixels in the image to the specified value.
Definition at line 285 of file ImageRGB.cpp. |
|
|
Set to value (clear) all of the pixels in the image.
Definition at line 269 of file ImageRGB.cpp. Referenced by Image::clear_rgb().
|
|
|
Set to value (clear) all values in the selected field.
Definition at line 305 of file ImageRGB.cpp. |
|
|
Copy block of data from img. Throws an exception if img is of incorrect size.
Definition at line 344 of file ImageRGB.cpp. |
|
|
Copy data from from img. Throws an exception if images are of different size.
Definition at line 322 of file ImageRGB.cpp. Referenced by ImageRGB(), Image::copy(), operator=(), and Image::operator=().
|
|
|
Method draws a filled circle with centre at point (centre_x,centre_y) of radius radius and colour described by PixelRGB pix. The method returns false if any point is outside the image. Reimplemented in Image. Definition at line 278 of file Image-draw.cpp. Referenced by Image::draw_filled_circle().
|
|
|
Method draws a straight line from point (x_start,y_start) to (x_end,y_end) of colour described by PixelRGB pix. The method returns false if either point is outside the image. Reimplemented in Image. Definition at line 127 of file Image-draw.cpp. Referenced by Image::draw_line().
|
|
|
Return the selected fields value of a pixel specified by (x,y).
Definition at line 254 of file ImageRGB.cpp. |
|
|
Return the red, green and blue values of the pixel specified by (x,y) in p.
Definition at line 236 of file ImageRGB.cpp. Referenced by Image::get_rgb().
|
|
|
Produces a binary image based on the image and the colour histogram 'hist'. If the probability of a given colour in the histogram is greater than a threshold the corresponding pixel in 'result' is set true, otherwise the pixel is set false. Definition at line 566 of file ImageRGB.cpp. |
|
|
Produces a binary image based on the image and the colour histogram 'hist'. If the probability of a given colour in the histogram is greater than a threshold the corresponding pixel in 'result' is set true (255,255,255), otherwise the pixel is set false (0,0,0). Definition at line 541 of file ImageRGB.cpp. |
|
|
Save in graphics file format.
Definition at line 410 of file ImageRGB.cpp. |
|
|
Set the selected fields value of a pixel specified by (x,y). Throws an exception if coordinates are not valid.
Definition at line 216 of file ImageRGB.cpp. |
|
|
set the value of a pixel specified by (x,y).
Definition at line 176 of file ImageRGB.cpp. Referenced by Image::set_rgb().
|
|
|
Set the red, green and blue values of a pixel specified by (x,y). Throws an exception if coordinates are not valid.
Definition at line 192 of file ImageRGB.cpp. |
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001