MOONS Pipeline Reference Manual 0.13.2
moo_extlist.h
1/*
2 * This file is part of the MOONS Pipeline
3 * Copyright (C) 2002-2016 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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20#ifndef MOO_EXTLIST_H
21#define MOO_EXTLIST_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_ext.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34/* detector structure */
35typedef struct
36{
37 moo_ext **list;
38 cpl_size size;
39} moo_extlist;
40/*-----------------------------------------------------------------------------
41 Functions prototypes
42 -----------------------------------------------------------------------------*/
43moo_extlist *moo_extlist_new(void);
44moo_extlist *moo_extlist_create(cpl_frameset *frameset);
45cpl_size moo_extlist_get_size(const moo_extlist *self);
46
47cpl_error_code moo_extlist_set(moo_extlist *self, moo_ext *ext, cpl_size pos);
48
49cpl_error_code moo_extlist_push(moo_extlist *self, moo_ext *ext);
50
51moo_ext *moo_extlist_unset(moo_extlist *self, cpl_size pos);
52void moo_extlist_empty(moo_extlist *self);
53void moo_extlist_delete(moo_extlist *self);
54moo_ext *moo_extlist_get(moo_extlist *self, int i);
55moo_ext *moo_extlist_sum(moo_extlist *self, const char *filename);
56
57cpl_error_code moo_extlist_load_single(const moo_extlist *self,
59 int num,
60 int level);
61cpl_error_code moo_extlist_free_single(const moo_extlist *self,
63 int num);
64
65hdrl_imagelist *
66moo_extlist_get_image(const moo_extlist *self, moo_detector_type type, int num);
67
68cpl_imagelist *moo_extlist_get_single_data(const moo_extlist *self,
70 int num);
71cpl_imagelist *moo_extlist_get_single_qual(const moo_extlist *self,
73 int num);
74#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
moo_ext * moo_extlist_get(moo_extlist *self, int i)
Get the DET at the position i in the list.
Definition: moo_extlist.c:197
cpl_imagelist * moo_extlist_get_single_data(const moo_extlist *self, moo_detector_type type, int num)
Get the type data part for all DET in the extlist.
Definition: moo_extlist.c:280
cpl_error_code moo_extlist_push(moo_extlist *self, moo_ext *ext)
Insert a DET a the end of moo_extlist.
Definition: moo_extlist.c:440
cpl_error_code moo_extlist_set(moo_extlist *self, moo_ext *ext, cpl_size pos)
Insert a DET into an moo_extlist.
Definition: moo_extlist.c:376
moo_ext * moo_extlist_unset(moo_extlist *self, cpl_size pos)
Remove a DET from a DET list.
Definition: moo_extlist.c:467
void moo_extlist_empty(moo_extlist *self)
Empty an moo_extlist and deallocate all its DET.
Definition: moo_extlist.c:505
moo_ext * moo_extlist_sum(moo_extlist *self, const char *filename)
Sum EXT element from the list and save result in filename.
Definition: moo_extlist.c:581
cpl_error_code moo_extlist_free_single(const moo_extlist *self, moo_detector_type type, int num)
Free the type part for all DET in the extlist.
Definition: moo_extlist.c:144
cpl_imagelist * moo_extlist_get_single_qual(const moo_extlist *self, moo_detector_type type, int num)
Get the type QUAL part for all DET in the extlist.
Definition: moo_extlist.c:321
void moo_extlist_delete(moo_extlist *self)
Free all memory used by a moo_extlist object including the DET.
Definition: moo_extlist.c:561
hdrl_imagelist * moo_extlist_get_image(const moo_extlist *self, moo_detector_type type, int num)
Get the all the images of the type part in the extlist.
Definition: moo_extlist.c:226
moo_extlist * moo_extlist_create(cpl_frameset *frameset)
Create a new moo_extlist from the given DET frameset.
Definition: moo_extlist.c:72
cpl_size moo_extlist_get_size(const moo_extlist *self)
Get the number of DET in the extlist.
Definition: moo_extlist.c:174
cpl_error_code moo_extlist_load_single(const moo_extlist *self, moo_detector_type type, int num, int level)
Load the type part for all DET in the extlist.
Definition: moo_extlist.c:108
moo_extlist * moo_extlist_new(void)
Create a new moo_extlist.
Definition: moo_extlist.c:57