MOONS Pipeline Reference Manual 0.13.1
moo_masklist.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_MASKLIST_H
21#define MOO_MASKLIST_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_mask.h"
31/*-----------------------------------------------------------------------------
32 Types
33 -----------------------------------------------------------------------------*/
34/* detector structure */
35typedef struct
36{
37 moo_mask **list;
38 cpl_size size;
39} moo_masklist;
40/*-----------------------------------------------------------------------------
41 Functions prototypes
42 -----------------------------------------------------------------------------*/
43moo_masklist *moo_masklist_new(void);
44moo_masklist *moo_masklist_create(int size);
45cpl_size moo_masklist_get_size(const moo_masklist *self);
46
47void moo_masklist_delete(moo_masklist *self);
48moo_mask *moo_masklist_get(moo_masklist *self, int i);
49cpl_mask *moo_masklist_get_mask(moo_masklist *self,
50 int i,
52 int num);
53#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
moo_mask * moo_masklist_get(moo_masklist *self, int i)
Get the MASK at the position i in the list.
Definition: moo_masklist.c:121
cpl_mask * moo_masklist_get_mask(moo_masklist *self, int i, moo_detector_type type, int num)
Get the CPL_MASK at the position i,type,num in the list.
Definition: moo_masklist.c:147
moo_masklist * moo_masklist_new(void)
Create a new moo_masklist
Definition: moo_masklist.c:56
cpl_size moo_masklist_get_size(const moo_masklist *self)
Get the number of MASK in the masklist.
Definition: moo_masklist.c:98
moo_masklist * moo_masklist_create(int size)
Create a new moo_masklist from the given MASK frameset.
Definition: moo_masklist.c:71
void moo_masklist_delete(moo_masklist *self)
Free all memory used by a moo_masklist object including the MASK.
Definition: moo_masklist.c:165