00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_RGB_UINT_H
00030 #define _GAN_IMAGE_RGB_UINT_H
00031
00032 #define GAN_PIXEL struct Gan_RGBPixel_ui
00033 #define GAN_PIXEL_FORMAT RGB colour
00034 #define GAN_PIXEL_TYPE unsigned int
00035 #define GAN_IMTYPE ui
00036 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_rgb_ui
00037 #define GAN_IMAGE_SET_GEN gan_image_set_gen_rgb_ui
00038 #define GAN_IMAGE_ALLOC gan_image_alloc_rgb_ui
00039 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_rgb_ui
00040 #define GAN_IMAGE_FORM gan_image_form_rgb_ui
00041 #define GAN_IMAGE_FORM_DATA gan_image_form_data_rgb_ui
00042 #define GAN_IMAGE_SET gan_image_set_rgb_ui
00043 #define GAN_IMAGE_SET_PIX gan_image_set_pix_rgb_ui
00044 #define GAN_IMAGE_GET_PIX gan_image_get_pix_rgb_ui
00045 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_rgb_ui
00046 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_rgb_ui
00047 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_rgb_ui
00048 #define GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_rgb_ui
00049 #define GAN_IMAGE_MASK_WINDOW gan_image_mask_window_rgb_ui
00050 #define GAN_IMAGE_CLEAR_WINDOW gan_image_clear_window_rgb_ui
00051 #define GAN_IMAGE_GET_MINIMUM_PIXEL gan_image_get_minimum_pixel_rgb_ui
00052 #define GAN_IMAGE_GET_MAXIMUM_PIXEL gan_image_get_maximum_pixel_rgb_ui
00053
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082 #include <stdlib.h>
00083 #include <gandalf/common/misc_defs.h>
00084 #include <gandalf/image/image_defs.h>
00085
00091 #ifdef __cplusplus
00092 extern "C" {
00093 #endif
00094
00095
00104 struct Gan_Image *gan_image_set_gen_rgb_ui ( Gan_Image *img,
00105 unsigned long height,
00106 unsigned long width,
00107 unsigned long stride,
00108 Gan_Bool alloc_pix_data );
00109
00122 struct Gan_Image *gan_image_form_gen_rgb_ui ( Gan_Image *img,
00123 unsigned long height,
00124 unsigned long width,
00125 unsigned long stride,
00126 Gan_Bool alloc_pix_data,
00127 struct Gan_RGBPixel_ui *pix_data,
00128 size_t pix_data_size,
00129 struct Gan_RGBPixel_ui **row_data,
00130 size_t row_data_size );
00131
00150 Gan_Bool gan_image_get_active_subwindow_rgb_ui ( const Gan_Image *image,
00151 Gan_ImageWindow *subwin );
00156 #ifndef NDEBUG
00157
00168 struct Gan_RGBPixel_ui *gan_image_get_pixptr_rgb_ui ( const Gan_Image *img,
00169 unsigned row, unsigned col );
00170
00177 struct Gan_RGBPixel_ui **gan_image_get_pixarr_rgb_ui ( const Gan_Image *img );
00178
00182 #endif
00183
00193 Gan_Bool gan_image_mask_window_rgb_ui ( Gan_Image *pImage,
00194 unsigned r0, unsigned c0,
00195 unsigned height, unsigned width );
00196
00201 Gan_Bool gan_image_clear_window_rgb_ui ( Gan_Image *pImage,
00202 unsigned r0, unsigned c0,
00203 unsigned height, unsigned width );
00208 #if defined(GAN_IMAGE_GET_MINIMUM_PIXEL)
00209
00213 Gan_Bool gan_image_get_minimum_pixel_rgb_ui ( const Gan_Image *pImage,
00214 const Gan_Image *pMask,
00215 unsigned int *minval );
00216 Gan_Bool gan_image_get_maximum_pixel_rgb_ui ( const Gan_Image *pImage,
00217 const Gan_Image *pMask,
00218 unsigned int *maxval );
00222 #endif
00223
00224
00225
00226
00242 Gan_Image *gan_image_alloc_rgb_ui ( unsigned long height, unsigned long width );
00243
00256 Gan_Image *gan_image_form_rgb_ui ( Gan_Image *img,
00257 unsigned long height, unsigned long width );
00258
00275 Gan_Image *gan_image_alloc_data_rgb_ui ( unsigned long height,
00276 unsigned long width,
00277 unsigned long stride,
00278 struct Gan_RGBPixel_ui *pix_data, size_t pix_data_size,
00279 struct Gan_RGBPixel_ui **row_data, size_t row_data_size );
00280
00298 Gan_Image *gan_image_form_data_rgb_ui ( Gan_Image *img,
00299 unsigned long height,
00300 unsigned long width,
00301 unsigned long stride,
00302 struct Gan_RGBPixel_ui *pix_data, size_t pix_data_size,
00303 struct Gan_RGBPixel_ui **row_data, size_t row_data_size );
00304
00324 Gan_Image *gan_image_set_rgb_ui ( Gan_Image *img,
00325 unsigned long height, unsigned long width );
00326
00343 Gan_Bool gan_image_set_pix_rgb_ui ( Gan_Image *img, unsigned row, unsigned col,
00344 struct Gan_RGBPixel_ui *pix );
00345
00352 struct Gan_RGBPixel_ui gan_image_get_pix_rgb_ui ( const Gan_Image *img, unsigned row, unsigned col );
00353
00370 Gan_Bool gan_image_fill_const_rgb_ui ( Gan_Image *img, struct Gan_RGBPixel_ui *pix );
00371
00377 #ifdef __cplusplus
00378 }
00379 #endif
00380
00381 #undef GAN_PIXEL
00382 #undef GAN_PIXEL_FORMAT
00383 #undef GAN_PIXEL_TYPE
00384 #undef GAN_IMTYPE
00385 #undef GAN_IMAGE_FORM_GEN
00386 #undef GAN_IMAGE_SET_GEN
00387 #undef GAN_IMAGE_ALLOC
00388 #undef GAN_IMAGE_ALLOC_DATA
00389 #undef GAN_IMAGE_FORM
00390 #undef GAN_IMAGE_FORM_DATA
00391 #undef GAN_IMAGE_SET
00392 #undef GAN_IMAGE_SET_PIX
00393 #undef GAN_IMAGE_GET_PIX
00394 #undef GAN_IMAGE_GET_PIXPTR
00395 #undef GAN_IMAGE_GET_PIXARR
00396 #undef GAN_IMAGE_FILL_CONST
00397 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00398 #undef GAN_IMAGE_MASK_WINDOW
00399 #undef GAN_IMAGE_CLEAR_WINDOW
00400 #undef GAN_IMAGE_GET_MINIMUM_PIXEL
00401 #undef GAN_IMAGE_GET_MAXIMUM_PIXEL
00402 #undef GAN_IMAGE_PIXEL_MIN_VAL
00403 #undef GAN_IMAGE_PIXEL_MAX_VAL
00404 #undef GAN_IMAGE_PIXEL_ZERO_VAL
00405
00411 #endif