FORS Pipeline Reference Manual  5.0.9
fors_pattern.h
1 /* $Id: fors_pattern.h,v 1.3 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.3 $
25  * $Name: not supported by cvs2svn $
26  */
27 
28 #ifndef FORS_PATTERN_H
29 #define FORS_PATTERN_H
30 
31 #include <fors_point.h>
32 
33 #include <stdbool.h>
34 
35 typedef struct _fors_pattern fors_pattern;
36 
37 #undef LIST_ELEM
38 #define LIST_ELEM fors_pattern
39 #include <list.h>
40 
41 fors_pattern *fors_pattern_new(const fors_point *ref,
42  const fors_point *p1,
43  const fors_point *p2,
44  double sigma);
45 
46 fors_pattern_list *
47 fors_pattern_new_from_points(struct fors_point_list *points,
48  double tolerance,
49  double sigma);
50 
51 void
52 fors_pattern_delete(fors_pattern **p);
53 
54 void fors_pattern_print(const fors_pattern *p);
55 
56 const fors_point *
57 fors_pattern_get_ref(const fors_pattern *p);
58 
59 double fors_pattern_get_scale(const fors_pattern *p,
60  const fors_pattern *q);
61 double fors_pattern_get_angle(const fors_pattern *p,
62  const fors_pattern *q);
63 
64 void fors_pattern_get_shift(const fors_pattern *p,
65  const fors_pattern *q,
66  double *shift_x,
67  double *shift_y);
68 
69 double fors_pattern_distsq(const fors_pattern *p,
70  const fors_pattern *q);
71 
72 double fors_pattern_dist_per_error(const fors_pattern *p,
73  const fors_pattern *q);
74 
75 void fors_pattern_error(const fors_pattern *p,
76  double *dr2,
77  double *dtheta);
78 
79 #endif