CR2RE Pipeline Reference Manual 1.6.10
hdrl_overscan.h
1/*
2 * This file is part of the HDRL
3 * Copyright (C) 2012,2013 European Southern Observatory
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 */
19
20#ifndef HDRL_OVERSCAN_H
21#define HDRL_OVERSCAN_H
22
23/*-----------------------------------------------------------------------------
24 Include
25 -----------------------------------------------------------------------------*/
26
27#include "hdrl_utils.h"
28#include "hdrl_image.h"
29
30#include <cpl.h>
31
32CPL_BEGIN_DECLS
33
34/*-----------------------------------------------------------------------------
35 Define
36 -----------------------------------------------------------------------------*/
37
38#define HDRL_OVERSCAN_FULL_BOX -1
39typedef struct _hdrl_overscan_compute_result_ hdrl_overscan_compute_result;
40typedef struct _hdrl_overscan_correct_result_ hdrl_overscan_correct_result;
41
42/*-----------------------------------------------------------------------------
43 Functions prototypes
44 -----------------------------------------------------------------------------*/
45
46/*----------------------------------------------------------------------------
47 Overscan Computation Parameters
48 ----------------------------------------------------------------------------*/
49hdrl_parameter * hdrl_overscan_parameter_create(hdrl_direction, double, int,
50 hdrl_parameter *, hdrl_parameter *) ;
51cpl_error_code hdrl_overscan_parameter_verify(const hdrl_parameter *,
52 cpl_size, cpl_size) ;
53cpl_boolean hdrl_overscan_parameter_check(const hdrl_parameter *) ;
54
55/* Accessors */
57 const hdrl_parameter *) ;
58double hdrl_overscan_parameter_get_ccd_ron(const hdrl_parameter *) ;
59int hdrl_overscan_parameter_get_box_hsize(const hdrl_parameter *) ;
60hdrl_parameter * hdrl_overscan_parameter_get_collapse(const hdrl_parameter *) ;
61hdrl_parameter * hdrl_overscan_parameter_get_rect_region(const hdrl_parameter*);
62
63/* Parameter Lists */
64cpl_parameterlist * hdrl_overscan_parameter_create_parlist(const char *,
65 const char *, const char *, int, double, hdrl_parameter *,
66 const char *, hdrl_parameter *, hdrl_parameter *, hdrl_parameter *) ;
68 const cpl_parameterlist *, const char *) ;
69
70/*----------------------------------------------------------------------------
71 Overscan Computation
72 ----------------------------------------------------------------------------*/
73hdrl_overscan_compute_result * hdrl_overscan_compute(
74 const cpl_image * source,
75 const hdrl_parameter * params) ;
76
77/*----------------------------------------------------------------------------
78 Overscan Computation Result
79 ----------------------------------------------------------------------------*/
81 const hdrl_overscan_compute_result *);
83 hdrl_overscan_compute_result *);
84
86 const hdrl_overscan_compute_result *);
88 hdrl_overscan_compute_result *);
89
91 const hdrl_overscan_compute_result *);
93 hdrl_overscan_compute_result *);
94
96 const hdrl_overscan_compute_result *);
98 hdrl_overscan_compute_result *);
99
101 const hdrl_overscan_compute_result *);
103 hdrl_overscan_compute_result *);
104
106 const hdrl_overscan_compute_result *);
108 hdrl_overscan_compute_result *);
109
111 const hdrl_overscan_compute_result *);
113 hdrl_overscan_compute_result *);
114
116 const hdrl_overscan_compute_result *);
118 hdrl_overscan_compute_result *);
119
120void hdrl_overscan_compute_result_delete(hdrl_overscan_compute_result *);
121
122/*----------------------------------------------------------------------------
123 Overscan Correction
124 ----------------------------------------------------------------------------*/
125hdrl_overscan_correct_result * hdrl_overscan_correct(
126 const hdrl_image * source,
127 const hdrl_parameter * region,
128 const hdrl_overscan_compute_result * os_computation) ;
129
130/*----------------------------------------------------------------------------
131 Overscan Correction Result
132 ----------------------------------------------------------------------------*/
134 const hdrl_overscan_correct_result *);
136 hdrl_overscan_correct_result *);
137
139 const hdrl_overscan_correct_result *);
141 hdrl_overscan_correct_result *);
142void hdrl_overscan_correct_result_delete(hdrl_overscan_correct_result *);
143
144CPL_END_DECLS
145
146#endif
void hdrl_overscan_compute_result_delete(hdrl_overscan_compute_result *)
Deletes the Overscan Computation Result Structure.
cpl_image * hdrl_overscan_correct_result_get_badmask(const hdrl_overscan_correct_result *)
Access the bad pixels mask in the Overscan Correction result object.
cpl_image * hdrl_overscan_compute_result_unset_red_chi2(hdrl_overscan_compute_result *)
Unset the reduced CHI2 in the Overscan Computation result object.
cpl_image * hdrl_overscan_correct_result_unset_badmask(hdrl_overscan_correct_result *)
Unset the bad pixels mask in the Overscan Correction result object.
cpl_image * hdrl_overscan_compute_result_get_minmax_reject_high(const hdrl_overscan_compute_result *)
Access the high threshold in the Overscan Computation result object.
cpl_boolean hdrl_overscan_parameter_check(const hdrl_parameter *)
Check that the parameter is an Overscan parameter.
hdrl_image * hdrl_overscan_correct_result_unset_corrected(hdrl_overscan_correct_result *)
Unset the corrected image in the Overscan Correction result object.
cpl_image * hdrl_overscan_compute_result_get_red_chi2(const hdrl_overscan_compute_result *)
Access the reduced CHI2 in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_get_sigclip_reject_low(const hdrl_overscan_compute_result *)
Access the low threshold in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_get_chi2(const hdrl_overscan_compute_result *)
Access the CHI2 in the Overscan Computation result object.
hdrl_overscan_compute_result * hdrl_overscan_compute(const cpl_image *source, const hdrl_parameter *params)
Overscan correction computation.
cpl_image * hdrl_overscan_compute_result_unset_chi2(hdrl_overscan_compute_result *)
Unset the CHI2 in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_unset_minmax_reject_high(hdrl_overscan_compute_result *)
Unset the high threshold in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_unset_contribution(hdrl_overscan_compute_result *)
Unset the contribution in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_get_minmax_reject_low(const hdrl_overscan_compute_result *)
Access the low threshold in the Overscan Computation result object.
hdrl_image * hdrl_overscan_compute_result_unset_correction(hdrl_overscan_compute_result *)
Unset the correction in the Overscan Computation result object.
hdrl_image * hdrl_overscan_correct_result_get_corrected(const hdrl_overscan_correct_result *)
Access the corrected image in the Overscan Correction result object.
hdrl_parameter * hdrl_overscan_parameter_get_rect_region(const hdrl_parameter *)
Access the Overscan Region parameters in the Overscan Parameter.
hdrl_parameter * hdrl_overscan_parameter_get_collapse(const hdrl_parameter *)
Access the collapse method parameters in the Overscan Parameter.
hdrl_parameter * hdrl_overscan_parameter_create(hdrl_direction, double, int, hdrl_parameter *, hdrl_parameter *)
Creates Overscan Parameters object.
hdrl_image * hdrl_overscan_compute_result_get_correction(const hdrl_overscan_compute_result *)
Access the correction in the Overscan Computation result object.
double hdrl_overscan_parameter_get_ccd_ron(const hdrl_parameter *)
Access the CCD read out noise in the Overscan Parameter.
hdrl_direction hdrl_overscan_parameter_get_correction_direction(const hdrl_parameter *)
Access the Correction Direction in the Overscan Parameter.
hdrl_overscan_correct_result * hdrl_overscan_correct(const hdrl_image *source, const hdrl_parameter *region, const hdrl_overscan_compute_result *os_computation)
Overscan correction.
hdrl_parameter * hdrl_overscan_parameter_parse_parlist(const cpl_parameterlist *, const char *)
Parse parameterlist to create input parameters for the Overscan method.
cpl_image * hdrl_overscan_compute_result_get_contribution(const hdrl_overscan_compute_result *)
Access the contribution in the Overscan Computation result object.
int hdrl_overscan_parameter_get_box_hsize(const hdrl_parameter *)
Access the Box Half Size in the Overscan Parameter.
cpl_image * hdrl_overscan_compute_result_unset_minmax_reject_low(hdrl_overscan_compute_result *)
Unset the low threshold in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_get_sigclip_reject_high(const hdrl_overscan_compute_result *)
Access the high threshold in the Overscan Computation result object.
void hdrl_overscan_correct_result_delete(hdrl_overscan_correct_result *)
Delete the Overscan Correction Result Structure.
cpl_image * hdrl_overscan_compute_result_unset_sigclip_reject_low(hdrl_overscan_compute_result *)
Unset the low threshold in the Overscan Computation result object.
cpl_image * hdrl_overscan_compute_result_unset_sigclip_reject_high(hdrl_overscan_compute_result *)
Unset the high threshold in the Overscan Computation result object.
cpl_parameterlist * hdrl_overscan_parameter_create_parlist(const char *, const char *, const char *, int, double, hdrl_parameter *, const char *, hdrl_parameter *, hdrl_parameter *, hdrl_parameter *)
Create parameter list for the Overscan computation.
cpl_error_code hdrl_overscan_parameter_verify(const hdrl_parameter *, cpl_size, cpl_size)
Verify basic correctness of the Overscan parameters.