CR2RE Pipeline Reference Manual 1.6.8
hdrl_flat.h
1/* $Id: hdrl_flat.h,v 1.7 2013-10-17 15:44:14 jtaylor Exp $
2 *
3 * This file is part of the HDRL
4 * Copyright (C) 2013 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: jtaylor $
23 * $Date: 2013-10-17 15:44:14 $
24 * $Revision: 1.7 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef HDRL_FLAT_H
29#define HDRL_FLAT_H
30
31/*-----------------------------------------------------------------------------
32 Includes
33 -----------------------------------------------------------------------------*/
34
35#include "hdrl_image.h"
36#include "hdrl_imagelist.h"
37#include <cpl.h>
38
39CPL_BEGIN_DECLS
40
41/*-----------------------------------------------------------------------------
42 Define
43 -----------------------------------------------------------------------------*/
44
45typedef enum {
46 HDRL_FLAT_FREQ_LOW,
47 HDRL_FLAT_FREQ_HIGH
48} hdrl_flat_method ;
49
50/*-----------------------------------------------------------------------------
51 Functions prototypes
52 -----------------------------------------------------------------------------*/
53
54/*----------------------------------------------------------------------------
55 FLAT Parameters
56 ----------------------------------------------------------------------------*/
57hdrl_parameter * hdrl_flat_parameter_create(cpl_size, cpl_size, hdrl_flat_method);
58cpl_boolean hdrl_flat_parameter_check(const hdrl_parameter *) ;
59
60/* Accessors */
61cpl_size hdrl_flat_parameter_get_filter_size_x(const hdrl_parameter *) ;
62cpl_size hdrl_flat_parameter_get_filter_size_y(const hdrl_parameter *) ;
63hdrl_flat_method hdrl_flat_parameter_get_method(const hdrl_parameter *) ;
64
65/* Parameter Lists */
66cpl_parameterlist * hdrl_flat_parameter_create_parlist(const char *,
67 const char *, const hdrl_parameter *) ;
68hdrl_parameter * hdrl_flat_parameter_parse_parlist(const cpl_parameterlist *,
69 const char *) ;
70
71/*----------------------------------------------------------------------------
72 FLAT Computation
73 ----------------------------------------------------------------------------*/
74
75cpl_error_code hdrl_flat_compute(
76 hdrl_imagelist * hdrl_data,
77 const cpl_mask * stat_mask,
78 const hdrl_parameter * collapse_params,
79 hdrl_parameter * flat_params,
80 hdrl_image ** master,
81 cpl_image ** contrib_map);
82
83/*-----------------------------------------------------------------------------
84 Private declarations - must not be used outside of hdrl
85 -----------------------------------------------------------------------------*/
86
87#ifdef HDRL_USE_PRIVATE
88
89#endif
90
91CPL_END_DECLS
92
93#endif
94
cpl_size hdrl_flat_parameter_get_filter_size_x(const hdrl_parameter *)
Access the filter_size_x in the FLAT parameter.
Definition: hdrl_flat.c:209
hdrl_parameter * hdrl_flat_parameter_create(cpl_size, cpl_size, hdrl_flat_method)
Creates FLAT Parameters object.
Definition: hdrl_flat.c:173
cpl_size hdrl_flat_parameter_get_filter_size_y(const hdrl_parameter *)
Access the filter_size_y in the FLAT parameter.
Definition: hdrl_flat.c:223
cpl_error_code hdrl_flat_compute(hdrl_imagelist *hdrl_data, const cpl_mask *stat_mask, const hdrl_parameter *collapse_params, hdrl_parameter *flat_params, hdrl_image **master, cpl_image **contrib_map)
compute high or low frequency master flat with median filtering
Definition: hdrl_flat.c:405
hdrl_flat_method hdrl_flat_parameter_get_method(const hdrl_parameter *)
Access the method in the FLAT parameter.
Definition: hdrl_flat.c:237
hdrl_parameter * hdrl_flat_parameter_parse_parlist(const cpl_parameterlist *, const char *)
Parse a parameterlist to create input parameters for the FLAT.
Definition: hdrl_flat.c:331
cpl_parameterlist * hdrl_flat_parameter_create_parlist(const char *, const char *, const hdrl_parameter *)
Create a parameter list for the FLAT computation.
Definition: hdrl_flat.c:258
cpl_boolean hdrl_flat_parameter_check(const hdrl_parameter *)
Check that the parameter is a FLAT parameter.
Definition: hdrl_flat.c:197