00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00056 #ifndef __LIBGPIV_VALIDPAR_H__
00057 #define __LIBGPIV_VALIDPAR_H__
00058
00059
00060 #define GPIV_VALIDPAR_KEY "VALID"
00061 #define GPIV_VALIDPAR_MAX__NEIGHBORS 9
00068 enum ResiduType {
00069 GPIV_VALID_RESIDUTYPE__SNR,
00070 GPIV_VALID_RESIDUTYPE__MEDIAN,
00071 GPIV_VALID_RESIDUTYPE__NORMMEDIAN
00077 };
00078
00079
00080
00084 enum SubstitutionType {
00085 GPIV_VALID_SUBSTYPE__NONE,
00086 GPIV_VALID_SUBSTYPE__L_MEAN,
00087 GPIV_VALID_SUBSTYPE__MEDIAN,
00088 GPIV_VALID_SUBSTYPE__COR_PEAK
00089 };
00090
00091
00092
00093 typedef struct __GpivValidPar GpivValidPar;
00094
00101 struct __GpivValidPar {
00102 gfloat data_yield;
00105 gfloat residu_max;
00106 guint neighbors;
00107 enum ResiduType residu_type;
00108 enum SubstitutionType subst_type;
00109 gint histo_type;
00111 gboolean data_yield__set;
00112 gboolean residu_max__set;
00113 gboolean neighbors__set;
00114 gboolean residu_type__set;
00115 gboolean subst_type__set;
00116 gboolean histo_type__set;
00117 };
00118
00119
00128 void
00129 gpiv_valid_parameters_set (GpivValidPar *valid_par,
00130 const gboolean flag
00131 );
00132
00133
00134
00142 void
00143 gpiv_valid_default_parameters (GpivValidPar *valid_par_default,
00144 const gboolean force
00145 );
00146
00147
00148
00157 GpivValidPar *
00158 gpiv_valid_get_parameters_from_resources(const gchar *localrc,
00159 const gboolean verbose
00160 );
00161
00162
00163
00173 void
00174 gpiv_valid_read_parameters (FILE *fp_par,
00175 GpivValidPar *valid_par,
00176 const gboolean print_par
00177 );
00178
00179
00180
00191 gchar *
00192 gpiv_valid_check_parameters_read (GpivValidPar *valid_par,
00193 const GpivValidPar *valid_par_default
00194 );
00195
00196
00197
00198
00199
00207 gchar *
00208 gpiv_valid_testonly_parameters (const GpivValidPar *valid_par
00209 );
00210
00211
00220 gchar *
00221 gpiv_valid_testadjust_parameters (GpivValidPar *valid_par
00222 );
00223
00224
00233 void
00234 gpiv_valid_print_parameters (FILE *fp,
00235 const GpivValidPar *valid_par
00236 );
00237
00238
00245 GpivValidPar *
00246 gpiv_valid_cp_parameters (const GpivValidPar *valid_par
00247 );
00248
00249
00258 void
00259 gpiv_valid_dupl_parameters (const GpivValidPar *valid_par_src,
00260 GpivValidPar *valid_par_dest
00261 );
00262
00263
00270 GpivValidPar *
00271 gpiv_valid_fread_hdf5_parameters (const gchar *fname
00272 );
00273
00274
00275
00283 gchar *
00284 gpiv_valid_fwrite_hdf5_parameters (const gchar *fname,
00285 const GpivValidPar *valid_par
00286 );
00287
00288
00289 #endif
00290