CR2RE Pipeline Reference Manual 1.7.0
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 *irplib_hist_new(void);
38
39void irplib_hist_delete(irplib_hist *);
40
41/* Initialisation function */
42
43cpl_error_code irplib_hist_init(irplib_hist *, unsigned long, double, double);
44
45/* Accessor functions */
46
47unsigned long irplib_hist_get_value(const irplib_hist *, const unsigned long);
48
49unsigned long irplib_hist_get_nbins(const irplib_hist *);
50
51double irplib_hist_get_bin_size(const irplib_hist *);
52
53double irplib_hist_get_range(const irplib_hist *);
54
55double irplib_hist_get_start(const irplib_hist *);
56
57/* Histogram computing function */
58
59cpl_error_code irplib_hist_fill(irplib_hist *, const cpl_image *);
60
61/* Statistics functions */
62
63unsigned long irplib_hist_get_max(const irplib_hist *, unsigned long *);
64
65/* Casting function */
66
67cpl_table *irplib_hist_cast_table(const irplib_hist *);
68
69/* Functions for operations on histograms */
70
71cpl_error_code irplib_hist_collapse(irplib_hist *, unsigned long);
72
73#endif /* IRPLIB_HIST_H */