CR2RE Pipeline Reference Manual 1.6.8
hdrl_imagelist_io.h
1/* $Id: hdrl_imagelist_io.h,v 1.8 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.8 $
25 * $Name: not supported by cvs2svn $
26 */
27
28#ifndef HDRL_IMAGELIST_IO_H
29#define HDRL_IMAGELIST_IO_H
30
31/*-----------------------------------------------------------------------------
32 Includes
33 -----------------------------------------------------------------------------*/
34
35#include "hdrl_image.h"
36#include "hdrl_imagelist.h"
37#include "hdrl_iter.h"
38
39CPL_BEGIN_DECLS
40
41/*-----------------------------------------------------------------------------
42 Function prototypes
43 -----------------------------------------------------------------------------*/
44
45/* Imagelist constructors */
46hdrl_imagelist * hdrl_imagelist_new(void) CPL_ATTR_ALLOC;
47hdrl_imagelist * hdrl_imagelist_create(cpl_imagelist *,
48 cpl_imagelist *) CPL_ATTR_ALLOC;
49
50cpl_size hdrl_imagelist_get_size(const hdrl_imagelist *);
51cpl_size hdrl_imagelist_get_size_x(const hdrl_imagelist * himlist);
52cpl_size hdrl_imagelist_get_size_y(const hdrl_imagelist * himlist);
53hdrl_image * hdrl_imagelist_get(const hdrl_imagelist *, cpl_size);
54const hdrl_image * hdrl_imagelist_get_const(const hdrl_imagelist *, cpl_size);
55cpl_error_code hdrl_imagelist_set(hdrl_imagelist *, hdrl_image *, cpl_size);
56hdrl_image * hdrl_imagelist_unset(hdrl_imagelist *, cpl_size);
57
58/* Imagelist destructor */
59void hdrl_imagelist_delete(hdrl_imagelist *);
60void hdrl_imagelist_empty(hdrl_imagelist *);
61
62/* Others */
63hdrl_imagelist * hdrl_imagelist_duplicate(
64 const hdrl_imagelist *) CPL_ATTR_ALLOC;
65int hdrl_imagelist_is_consistent(const hdrl_imagelist *) ;
66
67cpl_error_code hdrl_imagelist_dump_structure(const hdrl_imagelist *, FILE *);
68cpl_error_code hdrl_imagelist_dump_window(const hdrl_imagelist *,
69 cpl_size, cpl_size, cpl_size, cpl_size, FILE *);
70
71
72/*-----------------------------------------------------------------------------
73 Experimental declarations - can be used, but no guarantees on api stability
74 -----------------------------------------------------------------------------*/
75#if defined HDRL_USE_EXPERIMENTAL || defined HDRL_USE_PRIVATE
76typedef struct {
77 cpl_size ly;
78 cpl_size uy;
79} hdrl_il_rowsliceiter_data;
80hdrl_il_rowsliceiter_data hdrl_imagelist_iter_row_slices_get_data(const hdrl_iter *);
81hdrl_iter * hdrl_imagelist_get_iter_row_slices(const hdrl_imagelist * hlist,
82 cpl_size nrows,
83 cpl_size overlap,
84 hdrl_iter_flags flags);
85#endif
86
87/*-----------------------------------------------------------------------------
88 Private declarations - must not be used outside of hdrl
89 -----------------------------------------------------------------------------*/
90#ifdef HDRL_USE_PRIVATE
91void hdrl_imagelist_unwrap(hdrl_imagelist * himlist);
92#endif
93
94CPL_END_DECLS
95
96#endif
hdrl_image * hdrl_imagelist_unset(hdrl_imagelist *, cpl_size)
Remove an image from an imagelist.
cpl_error_code hdrl_imagelist_set(hdrl_imagelist *, hdrl_image *, cpl_size)
Insert an image into an imagelist.
cpl_size hdrl_imagelist_get_size_y(const hdrl_imagelist *himlist)
Get number of rows of images in the imagelist.
hdrl_imagelist * hdrl_imagelist_create(cpl_imagelist *, cpl_imagelist *) CPL_ATTR_ALLOC
Create an hdrl_imagelist out of 2 cpl_imagelist.
void hdrl_imagelist_delete(hdrl_imagelist *)
Free all memory used by a hdrl_imagelist object including the images.
const hdrl_image * hdrl_imagelist_get_const(const hdrl_imagelist *, cpl_size)
Get an image from a list of images.
void hdrl_imagelist_empty(hdrl_imagelist *)
Empty an imagelist and deallocate all its images.
cpl_size hdrl_imagelist_get_size(const hdrl_imagelist *)
Get the number of images in the imagelist.
int hdrl_imagelist_is_consistent(const hdrl_imagelist *)
Determine if an imagelist contains images of equal size and type.
cpl_error_code hdrl_imagelist_dump_window(const hdrl_imagelist *, cpl_size, cpl_size, cpl_size, cpl_size, FILE *)
Dump pixel values of images in a imagelist.
CPL_BEGIN_DECLS hdrl_imagelist * hdrl_imagelist_new(void) CPL_ATTR_ALLOC
Create an empty imagelist.
hdrl_imagelist * hdrl_imagelist_duplicate(const hdrl_imagelist *) CPL_ATTR_ALLOC
Duplicate an image list.
cpl_size hdrl_imagelist_get_size_x(const hdrl_imagelist *himlist)
Get number of colums of images in the imagelist.
cpl_error_code hdrl_imagelist_dump_structure(const hdrl_imagelist *, FILE *)
Dump structural information of images in an imagelist.
hdrl_image * hdrl_imagelist_get(const hdrl_imagelist *, cpl_size)
Get an image from a list of images.