MOONS Pipeline Reference Manual 0.13.2
moo_region.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_REGION_H
21#define MOO_REGION_H
22
23
24/*-----------------------------------------------------------------------------
25 Includes
26 -----------------------------------------------------------------------------*/
27
28#include <cpl.h>
29#include <hdrl.h>
30#include "moo_detector.h"
31
32#define MOO_REGION_LAYOUT_LLX "LLX"
33#define MOO_REGION_LAYOUT_LLY "LLY"
34#define MOO_REGION_LAYOUT_URX "URX"
35#define MOO_REGION_LAYOUT_URY "URY"
36/*-----------------------------------------------------------------------------
37 Types
38 -----------------------------------------------------------------------------*/
39
40typedef struct
41{
42 int xb;
43 int yb;
44 int xu;
45 int yu;
46} moo_region;
47
48typedef struct
49{
50 moo_region **list;
51 int size;
52} moo_regionlist;
53
54/*-----------------------------------------------------------------------------
55 Functions prototypes
56 -----------------------------------------------------------------------------*/
57moo_region *moo_region_new(void);
58moo_region *moo_region_load(const char *value);
59void moo_region_delete(moo_region *self);
60void moo_region_dump(moo_region *self);
61
62moo_regionlist *moo_regionlist_new(int size);
63void moo_regionlist_delete(moo_regionlist *self);
64moo_regionlist *moo_regionlist_load(const char *value);
65moo_regionlist *moo_regionlist_load_layout(const cpl_frame *layout_frame,
67 int ntas);
68void moo_regionlist_dump(moo_regionlist *self);
69#endif
enum _moo_detector_type_ moo_detector_type
The type code type.
Definition: moo_detector.h:64
moo_regionlist * moo_regionlist_new(int size)
Create a new moo_region.
Definition: moo_region.c:143
void moo_regionlist_dump(moo_regionlist *self)
dump a moo_regionlist
Definition: moo_region.c:269
moo_regionlist * moo_regionlist_load_layout(const cpl_frame *layout_frame, moo_detector_type type, int ntas)
load a moo_regionlist
Definition: moo_region.c:225
void moo_region_dump(moo_region *self)
dump a moo_region
Definition: moo_region.c:122
moo_region * moo_region_load(const char *value)
load a moo_region
Definition: moo_region.c:97
void moo_region_delete(moo_region *self)
Delete a moo_region.
Definition: moo_region.c:77
moo_region * moo_region_new(void)
Create a new moo_region.
Definition: moo_region.c:59
moo_regionlist * moo_regionlist_load(const char *value)
load a moo_regionlist
Definition: moo_region.c:187
void moo_regionlist_delete(moo_regionlist *self)
Delete a moo_regionlist.
Definition: moo_region.c:164