1
/* @(#)wimclo.c 19.1 (ES0-DMD) 02/25/03 14:00:02 */
2
/*===========================================================================
3
Copyright (C) 1995 European Southern Observatory (ESO)
5
This program is free software; you can redistribute it and/or
6
modify it under the terms of the GNU General Public License as
7
published by the Free Software Foundation; either version 2 of
8
the License, or (at your option) any later version.
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.
15
You should have received a copy of the GNU General Public
16
License along with this program; if not, write to the Free
17
Software Foundation, Inc., 675 Massachusetss Ave, Cambridge,
20
Corresponding concerning ESO-MIDAS should be addressed as follows:
21
Internet e-mail: midas@eso.org
22
Postal address: European Southern Observatory
23
Data Management Division
24
Karl-Schwarzschild-Strasse 2
25
D 85748 Garching bei Muenchen
27
===========================================================================*/
29
/* @(#)wimclo.c 1.3 (ESO-IPG) 7/4/94 10:27:17 */
30
/*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31
.COPYRIGHT (c) 1994 European Southern Observatory
34
.AUTHOR K. Banse IPG-ESO Garching
35
.KEYWORDS Image Display, memory board
36
.PURPOSE do the final things to cleanly save all information
37
about an image loaded via LOADWN(-100,...) before
38
.ALGORITHM copy the stuff done in WIMGA
40
call as WIMCLO_C( dsplay, chan, vis, frame, start, step, cuts )
44
int chan memory channel no.
45
int vis visibility (1/0)
46
char *frame name of loaded image
47
double *start world coord start(x,y) of frame
48
double *step world coord step(x,y) of frame
49
float *cuts contains low cut, high cut, min and max
53
#include <midas_def.h> Prototypes for MIDAS interfaces
54
#include <idinumd.h> Global variables for DISPLAY interfaces
56
.VERSIONS 1.00 940325 F2C, taken from LOADWN.FOR RvH
57
------------------------------------------------------------*/
59
* Define _POSIX_SOURCE to indicate
60
* that this is a POSIX program
62
#define _POSIX_SOURCE 1
65
* definition of the used functions in this module
67
#include <midas_def.h>
70
* define some macros and constants
76
* here starts the code of the function
78
void WIMCLO_C( dsplay, chan, vis, frame, start, step, cuts )
80
int dsplay, chan, vis;
86
if ( chan != QOVCH ) (void) Cdazvis( dsplay, chan, 1, vis );
89
* copy "frame" into global variable "dzmemc"
91
(void) strcpy( dzmemc, frame );
94
* buffer DZMEMR = xsta,ysta,xend,yend,locut,hicut,min,max -> keyword IDIMEMR
96
dzmemr[0] = (float) (start[0] + (SFPX - 1) * step[0]);
97
dzmemr[1] = (float) (start[1] + (SFPY - 1) * step[1]);
103
dzmemr[2] = dzmemr[0] + (float) (nn - 1) * step[0];
109
dzmemr[3] = dzmemr[1] + (float) (nn-1) * step[1];
111
for (nn=0; nn<4; nn++) dzmemr[nn+4] = *cuts++;
116
* now also display everything in the Image Display
117
* if either we loaded into currently displayed channel or split_screen mode
119
(void) Cdazvis( dsplay, chan, 2, 1 );