FORS Pipeline Reference Manual  4.12.5
fors_stack.h
1 /* $Id: fors_stack.h,v 1.7 2010-09-14 07:49:30 cizzo Exp $
2  *
3  * This file is part of the FORS Library
4  * Copyright (C) 2002-2010 European Southern Observatory
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 /*
22  * $Author: cizzo $
23  * $Date: 2010-09-14 07:49:30 $
24  * $Revision: 1.7 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef FORS_STACK_IMPL_H
29 #define FORS_STACK_IMPL_H
30 
31 #include <fors_image.h>
32 #include <cpl.h>
33 
34 CPL_BEGIN_DECLS
35 
36 typedef struct _stack_method
37 {
38  enum {AVERAGE, MEAN, WMEAN, MEDIAN, MINMAX, KSIGMA} method;
39  const char *method_name;
40  union {
41  struct {
42  int min_reject;
43  int max_reject;
44  } minmax;
45  struct {
46  double klow;
47  double khigh;
48  int kiter;
49  } ksigma;
50  } pars;
51 } stack_method;
52 
53 void
54 fors_stack_define_parameters(cpl_parameterlist *parameters,
55  const char *context, const char *default_method);
56 stack_method *
57 fors_stack_method_new(const cpl_parameterlist *parameters, const char *context);
58 
59 const char *fors_stack_method_get_string(const stack_method *sm);
60 
61 void
62 fors_stack_method_delete(stack_method **sm);
63 
64 fors_image *
65 fors_stack(fors_image_list *images, const stack_method *sm);
66 
67 fors_image *
68 fors_stack_const(const fors_image_list *images, const stack_method *sm);
69 
70 CPL_END_DECLS
71 
72 #endif
const char * fors_stack_method_get_string(const stack_method *sm)
Stack method as string.
Definition: fors_stack.c:288
void fors_stack_define_parameters(cpl_parameterlist *parameters, const char *context, const char *default_method)
Define recipe parameters.
Definition: fors_stack.c:55
void fors_stack_method_delete(stack_method **sm)
Destructor.
Definition: fors_stack.c:273
stack_method * fors_stack_method_new(const cpl_parameterlist *parameters, const char *context)
Get stack method from parameter list.
Definition: fors_stack.c:157
fors_image * fors_stack(fors_image_list *images, const stack_method *sm)
Same as fors_stack_const()
Definition: fors_stack.c:352
fors_image * fors_stack_const(const fors_image_list *images, const stack_method *sm)
Stack images.
Definition: fors_stack.c:306