Main Page   Modules   Compound List   File List   Compound Members   File Members  

mask1D.h

Go to the documentation of this file.
00001 
00014 /* This library is free software; you can redistribute it and/or
00015    modify it under the terms of the GNU Lesser General Public
00016    License as published by the Free Software Foundation; either
00017    version 2.1 of the License, or (at your option) any later version.
00018 
00019    This library is distributed in the hope that it will be useful,
00020    but WITHOUT ANY WARRANTY; without even the implied warranty of
00021    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00022    Lesser General Public License for more details.
00023 
00024    You should have received a copy of the GNU Lesser General Public
00025    License along with this library; if not, write to the Free Software
00026    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
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 /* create new mask */
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 /* #ifndef _GAN_MASK1D_H */

Generated on Mon Oct 13 16:14:33 2003 by doxygen1.3-rc1