00001
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef _GAN_MASK1D_H
00030 #define _GAN_MASK1D_H
00031
00032 #include <gandalf/common/misc_defs.h>
00033
00034 #ifdef __cplusplus
00035 extern "C" {
00036 #endif
00037
00051 typedef enum
00052 {
00053 GAN_MASK1D_SYMMETRIC,
00054 GAN_MASK1D_ANTISYMMETRIC,
00055 GAN_MASK1D_GENERIC
00056 } Gan_Mask1DFormat;
00057
00061 typedef struct
00062 {
00064 Gan_Mask1DFormat format;
00065
00067 Gan_Type type;
00068
00070 unsigned int size;
00071
00073 unsigned int size_alloc;
00074
00076 union
00077 {
00078 float *f;
00079 double *d;
00080 int *i;
00081 unsigned short *us;
00082 unsigned char *uc;
00083
00084 } data;
00085
00087 Gan_Bool data_alloc;
00088
00090 Gan_Bool alloc;
00091 } Gan_Mask1D;
00092
00093
00094 Gan_Mask1D *gan_mask1D_form_gen ( Gan_Mask1D *mask,
00095 Gan_Mask1DFormat format, Gan_Type type,
00096 void *data, unsigned int size );
00097 Gan_Bool gan_mask1D_copy_q ( Gan_Mask1D *source, Gan_Mask1D *dest );
00098 Gan_Bool gan_mask1D_free ( Gan_Mask1D *mask );
00099
00100 Gan_Mask1D *gan_gauss_mask_new ( Gan_Type type, double sigma,
00101 unsigned mask_size, double scale,
00102 void *mask_data );
00103
00113 Gan_Mask1D *gan_mask1D_alloc ( Gan_Mask1DFormat format, Gan_Type type,
00114 unsigned int size );
00115
00125 Gan_Mask1D *gan_mask1D_alloc_data ( Gan_Mask1DFormat format, Gan_Type type,
00126 void *data, unsigned int size );
00127
00137 Gan_Mask1D *gan_mask1D_form ( Gan_Mask1D *mask,
00138 Gan_Mask1DFormat format, Gan_Type type,
00139 unsigned int size );
00140
00151 Gan_Mask1D *gan_mask1D_form_data ( Gan_Mask1D *mask,
00152 Gan_Mask1DFormat format, Gan_Type type,
00153 void *data, unsigned int size );
00154
00163 #ifdef __cplusplus
00164 }
00165 #endif
00166
00167 #endif