CR2RE Pipeline Reference Manual 1.6.2
irplib_hist.h
1/* $Id: irplib_hist.h,v 1.3 2007-09-07 14:23:50 lbilbao Exp $
2 *
3 * This file is part of the irplib package
4 * Copyright (C) 2002, 2003 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 02111-1307 USA
19 */
20
21/*
22 * $Author: lbilbao $
23 * $Date: 2007-09-07 14:23:50 $
24 * $Revision: 1.3 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef IRPLIB_HIST_H
29#define IRPLIB_HIST_H
30
31#include <cpl.h>
32
33typedef struct _irplib_hist_ irplib_hist;
34
35/* Creation/Destruction functions */
36
37irplib_hist *
38irplib_hist_new(void);
39
40void
41irplib_hist_delete(irplib_hist *);
42
43/* Initialisation function */
44
45cpl_error_code
46irplib_hist_init(irplib_hist *,
47 unsigned long ,
48 double ,
49 double );
50
51/* Accessor functions */
52
53unsigned long
54irplib_hist_get_value(const irplib_hist *,
55 const unsigned long);
56
57unsigned long
58irplib_hist_get_nbins(const irplib_hist *);
59
60double
61irplib_hist_get_bin_size(const irplib_hist *);
62
63double
64irplib_hist_get_range(const irplib_hist *);
65
66double
67irplib_hist_get_start(const irplib_hist *);
68
69/* Histogram computing function */
70
71cpl_error_code
72irplib_hist_fill(irplib_hist *,
73 const cpl_image *);
74
75/* Statistics functions */
76
77unsigned long
78irplib_hist_get_max(const irplib_hist *,
79 unsigned long *);
80
81/* Casting function */
82
83cpl_table *
84irplib_hist_cast_table(const irplib_hist *);
85
86/* Functions for operations on histograms */
87
88cpl_error_code
89irplib_hist_collapse(irplib_hist *,
90 unsigned long);
91
92#endif /* IRPLIB_HIST_H */
93