[Wavelet-commit] Wavelet/WImage ColorImage.hh, 1.6, 1.7 Image.hh, 1.17, 1.18
Status: Beta
Brought to you by:
herbert
From: Herbert M. D. <he...@us...> - 2007-08-24 15:24:33
|
Update of /cvsroot/wavelet/Wavelet/WImage In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv10904/WImage Modified Files: ColorImage.hh Image.hh Log Message: New Image::fill() and ColorImage::fill() operations, extensions to the ImageResizer class, the actual resizing after cropping can now be skipped. Index: Image.hh =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/Image.hh,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Image.hh 10 Aug 2007 17:55:45 -0000 1.17 --- Image.hh 24 Aug 2007 15:24:28 -0000 1.18 *************** *** 381,384 **** --- 381,394 ---- void synsteps (int steps) { m_ssteps = steps; } + /** Fills an image (or regions of it) with a given value + * @param val the new value for the selected positions + * @param fromY the first point's row + * @param fromX the first point's col + * @param toY the second point's row (-1 if lower image border) + * @param toX the second point's col (-1 if right image border) + */ + void fill (coeff value, int fromY = 0, int fromX = 0, + int toY = -1, int toX = -1); + /** Returns the maximum value in a region. Signs will be considered. * @param fromY the first point's row Index: ColorImage.hh =================================================================== RCS file: /cvsroot/wavelet/Wavelet/WImage/ColorImage.hh,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** ColorImage.hh 7 Aug 2007 17:01:00 -0000 1.6 --- ColorImage.hh 24 Aug 2007 15:24:28 -0000 1.7 *************** *** 42,45 **** --- 42,57 ---- Image **images = NULL, bool isReference = false, bool isMine = false); + /** Constructor. Creates an image of a given size. + * @param rows + * the number of image rows to create + * @param cols + * the number of image cols to create + * @param colors + * the number of colors + * @param cmodel + * the color model + */ + ColorImage (int rows, int cols, int colors = 3, clrmodel cmodel = cm_rgb); + /** Destructor. Frees allocated objects. */ virtual ~ColorImage (void); *************** *** 165,168 **** --- 177,200 ---- * the cols to shift */ virtual void shift (int yoffs, int xoffs); + /** Fills an image (or regions of it) with a given value + * @param values an array of this->colors() entries containing the the new + * values one per channel for the selected positions (coeff values) + * @param fromY the first point's row + * @param fromX the first point's col + * @param toY the second point's row (-1 if lower image border) + * @param toX the second point's col (-1 if right image border) + */ + void fill (coeff *values, int fromY = 0, int fromX = 0, + int toY = -1, int toX = -1); + /** Fills an image (or regions of it) with a given value + * @param values an array of this->colors() entries containing the the new + * values one per channel for the selected positions (int values) + * @param fromY the first point's row + * @param fromX the first point's col + * @param toY the second point's row (-1 if lower image border) + * @param toX the second point's col (-1 if right image border) + */ + void fill (int *values, int fromY = 0, int fromX = 0, + int toY = -1, int toX = -1); /** Produce a scaled version of the image which just fits into |