00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_IMAGE_GL_UINT16_H
00030 #define _GAN_IMAGE_GL_UINT16_H
00031
00032 #include <gandalf/common/misc_defs.h>
00033
00034
00035
00036 #define GAN_PIXEL gan_uint16
00037 #define GAN_PIXEL_FORMAT grey-level
00038 #define GAN_PIXEL_TYPE 16-bit unsigned integer
00039
00040 #define GAN_IMAGE_FORM_GEN gan_image_form_gen_gl_ui16
00041 #define GAN_IMAGE_SET_GEN gan_image_set_gen_gl_ui16
00042 #define GAN_IMAGE_ALLOC gan_image_alloc_gl_ui16
00043 #define GAN_IMAGE_ALLOC_DATA gan_image_alloc_data_gl_ui16
00044 #define GAN_IMAGE_FORM gan_image_form_gl_ui16
00045 #define GAN_IMAGE_FORM_DATA gan_image_form_data_gl_ui16
00046 #define GAN_IMAGE_SET gan_image_set_gl_ui16
00047 #define GAN_IMAGE_SET_PIX gan_image_set_pix_gl_ui16
00048 #define GAN_IMAGE_GET_PIX gan_image_get_pix_gl_ui16
00049 #define GAN_IMAGE_GET_PIXPTR gan_image_get_pixptr_gl_ui16
00050 #define GAN_IMAGE_GET_PIXARR gan_image_get_pixarr_gl_ui16
00051 #define GAN_IMAGE_FILL_CONST gan_image_fill_const_gl_ui16
00052 #define GAN_IMAGE_GET_ACTIVE_SUBWINDOW gan_image_get_active_subwindow_gl_ui16
00053 #define GAN_IMAGE_MASK_WINDOW gan_image_mask_window_gl_ui16
00054 #define GAN_IMAGE_CLEAR_WINDOW gan_image_clear_window_gl_ui16
00055
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090 #include <stdlib.h>
00091 #include <gandalf/common/misc_defs.h>
00092 #include <gandalf/image/image_defs.h>
00093
00099 #ifdef __cplusplus
00100 extern "C" {
00101 #endif
00102
00103
00104
00112 struct Gan_Image *gan_image_set_gen_gl_ui16 ( Gan_Image *img,
00113 unsigned long height,
00114 unsigned long width,
00115 unsigned long stride,
00116 Gan_Bool alloc_pix_data );
00128 struct Gan_Image *gan_image_form_gen_gl_ui16 (
00129 Gan_Image *img,
00130 unsigned long height,
00131 unsigned long width,
00132 unsigned long stride,
00133 Gan_Bool alloc_pix_data,
00134 gan_uint16 *pix_data, size_t pix_data_size,
00135 gan_uint16 **row_data, size_t row_data_size );
00136
00155 Gan_Bool gan_image_get_active_subwindow_gl_ui16 ( const Gan_Image *image,
00156 Gan_ImageWindow *subwin );
00160 #ifndef NDEBUG
00161
00172 gan_uint16 *gan_image_get_pixptr_gl_ui16 ( const Gan_Image *img,
00173 unsigned row, unsigned col );
00174
00181 gan_uint16 **gan_image_get_pixarr_gl_ui16 ( const Gan_Image *img );
00182
00186 #endif
00187
00197 Gan_Bool gan_image_mask_window_gl_ui16 ( Gan_Image *pImage,
00198 unsigned r0, unsigned c0,
00199 unsigned height, unsigned width );
00200
00205 Gan_Bool gan_image_clear_window_gl_ui16 ( Gan_Image *pImage,
00206 unsigned r0, unsigned c0,
00207 unsigned height, unsigned width );
00212 #if defined(GAN_IMAGE_GET_MINIMUM_PIXEL) && !defined(GAN_BITMAP)
00213
00217 Gan_Bool GAN_IMAGE_GET_MINIMUM_PIXEL ( const Gan_Image *pImage,
00218 const Gan_Image *pMask,
00219 gan_uint16 *minval );
00220 Gan_Bool GAN_IMAGE_GET_MAXIMUM_PIXEL ( const Gan_Image *pImage,
00221 const Gan_Image *pMask,
00222 gan_uint16 *maxval );
00226 #endif
00227
00228 #ifdef __cplusplus
00229 }
00230 #endif
00231
00232
00233
00248 Gan_Image *gan_image_alloc_gl_ui16 ( unsigned long height, unsigned long width );
00249
00260 Gan_Image *gan_image_form_gl_ui16 ( Gan_Image *img,
00261 unsigned long height,
00262 unsigned long width );
00263
00280 Gan_Image *gan_image_alloc_data_gl_ui16 ( unsigned long height,
00281 unsigned long width,
00282 unsigned long stride,
00283 gan_uint16 *pix_data, size_t pix_data_size,
00284 gan_uint16 **row_data, size_t row_data_size );
00285
00303 Gan_Image *gan_image_form_data_gl_ui16 ( Gan_Image *img,
00304 unsigned long height,
00305 unsigned long width,
00306 unsigned long stride,
00307 gan_uint16 *pix_data, size_t pix_data_size,
00308 gan_uint16 **row_data, size_t row_data_size );
00309
00329 Gan_Image *gan_image_set_gl_ui16 ( Gan_Image *img,
00330 unsigned long height, unsigned long width );
00331
00348 Gan_Bool gan_image_set_pix_gl_ui16 ( Gan_Image *img,
00349 unsigned row, unsigned col, 16-bit unsigned pix );
00350
00357 gan_uint16 gan_image_get_pix_gl_ui16 ( const Gan_Image *img,
00358 unsigned row, unsigned col );
00359
00375 Gan_Bool gan_image_fill_const_gl_ui16 ( Gan_Image *img, 16-bit unsigned pix );
00376
00382 #undef GAN_PIXEL
00383 #undef GAN_PIXEL_FORMAT
00384 #undef GAN_PIXEL_TYPE
00385 #undef GAN_IMTYPE
00386 #undef GAN_IMAGE_FORM_GEN
00387 #undef GAN_IMAGE_SET_GEN
00388 #undef GAN_IMAGE_ALLOC
00389 #undef GAN_IMAGE_ALLOC_DATA
00390 #undef GAN_IMAGE_FORM
00391 #undef GAN_IMAGE_FORM_DATA
00392 #undef GAN_IMAGE_SET
00393 #undef GAN_IMAGE_SET_PIX
00394 #undef GAN_IMAGE_GET_PIX
00395 #undef GAN_IMAGE_GET_PIXPTR
00396 #undef GAN_IMAGE_GET_PIXARR
00397 #undef GAN_IMAGE_FILL_CONST
00398 #undef GAN_IMAGE_GET_ACTIVE_SUBWINDOW
00399 #undef GAN_IMAGE_MASK_WINDOW
00400 #undef GAN_IMAGE_CLEAR_WINDOW
00401 #undef GAN_IMAGE_GET_MINIMUM_PIXEL
00402 #undef GAN_IMAGE_GET_MAXIMUM_PIXEL
00403 #undef GAN_IMAGE_PIXEL_MIN_VAL
00404 #undef GAN_IMAGE_PIXEL_MAX_VAL
00405 #undef GAN_IMAGE_PIXEL_ZERO_VAL
00406 #undef GAN_BITMAP
00407
00414 #endif