MOONS Pipeline Reference Manual 0.13.1
moo_detlist.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_DETLIST_H
21#define MOO_DETLIST_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_det.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34/* detector structure */
35typedef struct
36{
37 moo_det **list;
38 cpl_size size;
39} moo_detlist;
40/*-----------------------------------------------------------------------------
41 Functions prototypes
42 -----------------------------------------------------------------------------*/
43moo_detlist *moo_detlist_new(void);
44moo_detlist *moo_detlist_create(cpl_frameset *frameset);
45cpl_size moo_detlist_get_size(const moo_detlist *self);
46
47cpl_error_code moo_detlist_set(moo_detlist *self, moo_det *det, cpl_size pos);
48
49cpl_error_code moo_detlist_push(moo_detlist *self, moo_det *det);
50
51moo_det *moo_detlist_unset(moo_detlist *self, cpl_size pos);
52void moo_detlist_empty(moo_detlist *self);
53void moo_detlist_delete(moo_detlist *self);
54moo_det *moo_detlist_get(moo_detlist *self, int i);
55
56cpl_error_code moo_detlist_load_single(const moo_detlist *self,
58 int num,
59 int level);
60cpl_error_code moo_detlist_free_single(const moo_detlist *self,
62 int num);
63
64hdrl_imagelist *
65moo_detlist_get_image(const moo_detlist *self, moo_detector_type type, int num);
66
67cpl_imagelist *moo_detlist_get_single_data(const moo_detlist *self,
69 int num);
70cpl_imagelist *moo_detlist_get_single_qual(const moo_detlist *self,
72 int num);
73
74#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
hdrl_imagelist * moo_detlist_get_image(const moo_detlist *self, moo_detector_type type, int num)
Get the all the images of the type part in the detlist.
Definition: moo_detlist.c:225
cpl_error_code moo_detlist_push(moo_detlist *self, moo_det *det)
Insert a DET a the end of moo_detlist.
Definition: moo_detlist.c:439
moo_detlist * moo_detlist_create(cpl_frameset *frameset)
Create a new moo_detlist from the given DET frameset.
Definition: moo_detlist.c:71
cpl_size moo_detlist_get_size(const moo_detlist *self)
Get the number of DET in the detlist.
Definition: moo_detlist.c:173
moo_det * moo_detlist_unset(moo_detlist *self, cpl_size pos)
Remove a DET from a DET list.
Definition: moo_detlist.c:465
moo_detlist * moo_detlist_new(void)
Create a new moo_detlist.
Definition: moo_detlist.c:56
void moo_detlist_empty(moo_detlist *self)
Empty an moo_detlist and deallocate all its DET.
Definition: moo_detlist.c:503
cpl_error_code moo_detlist_free_single(const moo_detlist *self, moo_detector_type type, int num)
Free the type part for all DET in the detlist.
Definition: moo_detlist.c:143
cpl_imagelist * moo_detlist_get_single_data(const moo_detlist *self, moo_detector_type type, int num)
Get the type data part for all DET in the detlist.
Definition: moo_detlist.c:279
cpl_imagelist * moo_detlist_get_single_qual(const moo_detlist *self, moo_detector_type type, int num)
Get the type QUAL part for all DET in the detlist.
Definition: moo_detlist.c:320
cpl_error_code moo_detlist_load_single(const moo_detlist *self, moo_detector_type type, int num, int level)
Load the type part for all DET in the detlist.
Definition: moo_detlist.c:107
void moo_detlist_delete(moo_detlist *self)
Free all memory used by a moo_detlist object including the DET.
Definition: moo_detlist.c:559
moo_det * moo_detlist_get(moo_detlist *self, int i)
Get the DET at the position i in the list.
Definition: moo_detlist.c:196
cpl_error_code moo_detlist_set(moo_detlist *self, moo_det *det, cpl_size pos)
Insert a DET into an moo_detlist.
Definition: moo_detlist.c:375