MOONS Pipeline Reference Manual 0.13.2
moo_rbnlist.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 rbnails.
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_RBNLIST_H
21#define MOO_RBNLIST_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_rbn.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34typedef struct
35{
36 moo_rbn **list;
37 cpl_size size;
38} moo_rbnlist;
39/*-----------------------------------------------------------------------------
40 Functions prototypes
41 -----------------------------------------------------------------------------*/
42moo_rbnlist *moo_rbnlist_new(void);
43moo_rbnlist *moo_rbnlist_create(const cpl_frameset *frameset);
44cpl_size moo_rbnlist_get_size(const moo_rbnlist *self);
45
46cpl_error_code moo_rbnlist_set(moo_rbnlist *self, moo_rbn *rbn, cpl_size pos);
47cpl_error_code moo_rbnlist_push(moo_rbnlist *self, moo_rbn *rbn);
48
49moo_rbn *moo_rbnlist_unset(moo_rbnlist *self, cpl_size pos);
50void moo_rbnlist_empty(moo_rbnlist *self);
51void moo_rbnlist_delete(moo_rbnlist *self);
52moo_rbn *moo_rbnlist_get(moo_rbnlist *self, int i);
53
54cpl_error_code moo_rbnlist_load_single(const moo_rbnlist *self,
56 int level);
57cpl_error_code
58moo_rbnlist_free_single(const moo_rbnlist *self, moo_detector_type type);
59
60hdrl_imagelist *
61moo_rbnlist_get_image(const moo_rbnlist *self, moo_detector_type type);
62
63cpl_imagelist *
64moo_rbnlist_get_single_data(const moo_rbnlist *self, moo_detector_type type);
65cpl_imagelist *
66moo_rbnlist_get_single_qual(const moo_rbnlist *self, moo_detector_type type);
67#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
cpl_error_code moo_rbnlist_free_single(const moo_rbnlist *self, moo_detector_type type)
Free the type part for all DET in the detlist.
Definition: moo_rbnlist.c:137
void moo_rbnlist_delete(moo_rbnlist *self)
Free all memory used by a moo_rbnlist object including the RBN.
Definition: moo_rbnlist.c:529
moo_rbnlist * moo_rbnlist_new(void)
Create a new moo_rbnlist.
Definition: moo_rbnlist.c:56
cpl_size moo_rbnlist_get_size(const moo_rbnlist *self)
Get the number of RBN in the rbnlist.
Definition: moo_rbnlist.c:163
void moo_rbnlist_empty(moo_rbnlist *self)
Empty an moo_rbnlist and deallocate all its RBN.
Definition: moo_rbnlist.c:473
cpl_error_code moo_rbnlist_load_single(const moo_rbnlist *self, moo_detector_type type, int level)
Load the type part for all RBN in the rbnlist.
Definition: moo_rbnlist.c:104
cpl_error_code moo_rbnlist_push(moo_rbnlist *self, moo_rbn *rbn)
Insert a RBN a the end of moo_rbnlist.
Definition: moo_rbnlist.c:409
moo_rbnlist * moo_rbnlist_create(const cpl_frameset *frameset)
Create a new moo_rbnlist from the given RBN frameset.
Definition: moo_rbnlist.c:71
cpl_imagelist * moo_rbnlist_get_single_data(const moo_rbnlist *self, moo_detector_type type)
Get the type data part for all RBN in the rbnlist.
Definition: moo_rbnlist.c:260
moo_rbn * moo_rbnlist_unset(moo_rbnlist *self, cpl_size pos)
Remove a RBN from a RBN list.
Definition: moo_rbnlist.c:435
hdrl_imagelist * moo_rbnlist_get_image(const moo_rbnlist *self, moo_detector_type type)
Get the all the images of the type part in the rbnlist.
Definition: moo_rbnlist.c:212
cpl_imagelist * moo_rbnlist_get_single_qual(const moo_rbnlist *self, moo_detector_type type)
Get the type QUAL part for all RBN in the rbnlist.
Definition: moo_rbnlist.c:294
cpl_error_code moo_rbnlist_set(moo_rbnlist *self, moo_rbn *rbn, cpl_size pos)
Insert a RBN into an moo_rbnlist.
Definition: moo_rbnlist.c:345
moo_rbn * moo_rbnlist_get(moo_rbnlist *self, int i)
Get the RBN at the position i in the list.
Definition: moo_rbnlist.c:186