00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_MASK2D_H
00030 #define _GAN_MASK2D_H
00031
00032 #include <gandalf/common/misc_defs.h>
00033 #include <gandalf/linalg.h>
00034 #include <gandalf/image.h>
00035
00036 #ifdef __cplusplus
00037 extern "C" {
00038 #endif
00039
00067 typedef enum
00068 {
00069 GAN_MASK2D_SYMMETRIC,
00070 GAN_MASK2D_ANTISYMMETRIC,
00071 GAN_MASK2D_GENERIC
00072 } Gan_Mask2DFormat;
00073
00077 typedef struct
00078 {
00080 Gan_Mask2DFormat format;
00081
00083 unsigned int rows;
00084
00086 unsigned int cols;
00087
00089 unsigned int size_alloc;
00090
00092 Gan_Matrix *data;
00093
00095 Gan_Bool data_alloc;
00096
00098 Gan_Bool alloc;
00099 } Gan_Mask2D;
00100
00101
00102
00114 Gan_Mask2D *gan_mask2D_form_gen ( Gan_Mask2D *mask,
00115 Gan_Mask2DFormat format,
00116 Gan_Matrix *data,
00117 unsigned int rows,
00118 unsigned int cols);
00119
00120
00129 Gan_Bool gan_mask2D_copy_q ( Gan_Mask2D *source, Gan_Mask2D *dest );
00130
00131
00139 Gan_Bool gan_mask2D_free ( Gan_Mask2D *mask );
00140
00148 Gan_Mask2D* gan_mask2D_gen_from_Gan_Image (Gan_Image *img);
00149
00159 Gan_Mask2D *gan_mask2D_alloc ( Gan_Mask2DFormat format,
00160 unsigned int rows,
00161 unsigned int cols);
00162
00172 Gan_Mask2D *gan_mask2D_alloc_data ( Gan_Mask2DFormat format,
00173 Gan_Matrix *data, unsigned int rows,
00174 unsigned int cols );
00175
00185 Gan_Mask2D *gan_mask2D_form ( Gan_Mask2D *mask,
00186 Gan_Mask2DFormat format,
00187 unsigned int rows,
00188 unsigned int cols);
00189
00200 Gan_Mask2D *gan_mask2D_form_data ( Gan_Mask2D *mask,
00201 Gan_Mask2DFormat format,
00202 Gan_Matrix *data, unsigned int rows,
00203 unsigned int cols);
00204
00213 #ifdef __cplusplus
00214 }
00215 #endif
00216
00217 #endif