Main Page | Modules | Class List | File List | Class 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 enum
00062 {
00063    GAN_EDGE_BEHAVIOUR_CLIP,     
00064    GAN_EDGE_BEHAVIOUR_REPEAT,   
00065    GAN_EDGE_BEHAVIOUR_CIRCULAR, 
00066    GAN_EDGE_BEHAVIOUR_EXPAND    
00067 } Gan_EdgeBehaviour;
00068 
00072 typedef struct
00073 {
00075    Gan_Mask1DFormat format;
00076 
00078    Gan_Type type;
00079 
00081    unsigned int size;
00082 
00084    unsigned int size_alloc;
00085 
00087    union
00088    {
00089       float  *f;
00090       double *d;
00091       int    *i;
00092       unsigned short *us;
00093       unsigned char *uc;
00094 
00095    } data;
00096 
00098    Gan_Bool data_alloc;
00099 
00101    Gan_Bool alloc;
00102 } Gan_Mask1D;
00103 
00104 /* create new mask */
00105  Gan_Mask1D *gan_mask1D_form_gen ( Gan_Mask1D *mask,
00106                                   Gan_Mask1DFormat format, Gan_Type type,
00107                                   void *data, unsigned int size );
00108  Gan_Bool    gan_mask1D_copy_q ( Gan_Mask1D *source, Gan_Mask1D *dest );
00109  Gan_Bool    gan_mask1D_free ( Gan_Mask1D *mask );
00110 
00111  Gan_Mask1D *gan_gauss_mask_new ( Gan_Type type, double sigma,
00112                                  unsigned mask_size, double scale,
00113                                  void    *mask_data );
00114 
00124  Gan_Mask1D *gan_mask1D_alloc ( Gan_Mask1DFormat format, Gan_Type type,
00125                                unsigned int size );
00126 
00136  Gan_Mask1D *gan_mask1D_alloc_data ( Gan_Mask1DFormat format, Gan_Type type,
00137                                     void *data, unsigned int size );
00138 
00148  Gan_Mask1D *gan_mask1D_form ( Gan_Mask1D *mask,
00149                               Gan_Mask1DFormat format, Gan_Type type,
00150                               unsigned int size );
00151 
00162  Gan_Mask1D *gan_mask1D_form_data ( Gan_Mask1D *mask,
00163                                    Gan_Mask1DFormat format, Gan_Type type,
00164                                    void *data, unsigned int size );
00165 
00174 #ifdef __cplusplus
00175 }
00176 #endif
00177 
00178 #endif /* #ifndef _GAN_MASK1D_H */

Generated on Fri Mar 17 12:44:47 2006 by  doxygen 1.3.9.1