DAS  3.1.6 - 18/09/2017
Dildef.h
Go to the documentation of this file.
1 #define M_PI 3.14159265358979323846
2 
3 #define DEG_RAD(x) (((x) * M_PI) / 180.0)
4 #define RAD_DEG(x) (((x) * 180.0) / M_PI)
5 
6 // MGUI definitions for editing inputs
7 #define DOUBLE (ALPHA|DIGIT|SIGNED|DOT)
8 
9 // Image types in DIL libraries
10 #define INTIMG 0 // 16 bit unsigned image
11 #define RGBIMG 1 // Color image (RGB)
12 #define FLTIMG 2 // float image
13 
14 // Error codes of DI_OpenImage
15 #define EMEM -1 // Memory allocation error
16 #define SYNER -2 // Format or type inexistent
17 #define EIMAX -3 // Too images
18 
19 // Satus flags for DI_OpenImage
20 #define SSHOW 1 // Image is showed
21 #define SICLOSE 2 // Can't close image via X on window
22 
23 // Associated file format with the image
24 #define FIMG 0
25 #define FFITS 1
26 #define FDIF 2
27 
28 // Image data channels used in DI_RdMat & DI_WrMat
29 #define UMAT 0 // Unsigned matrix
30 #define RMAT 1 // Red channel matrix
31 #define GMAT 2 // Green channel matrix
32 #define BMAT 3 // Blue channel matrix
33 #define FMAT 4 // Float matrix
34 #define CMAT 5 // Complex matrix
35 #define ARGB 6 // RGB average
36 
37 // File formats used
38 #define KASC 0
39 #define KBMP 1
40 #define KDIF 2
41 #define KFTS 3
42 #define KGIF 4
43 #define KIMG 5
44 #define KJPEG 6
45 #define KPBM 7
46 #define KPGM 8
47 #define KRAW 9
48 #define KTIF 10
49 #define KPNG 11
50 #define KALL 20
51 
52 // Math operation between images
53 #define M_ADD 0
54 #define M_SUB 1
55 #define M_DARK 2
56 #define M_MEDIA 3
57 #define M_MUL 4
58 #define M_DIV 5
59 #define M_MOD 6
60 #define M_AND 10
61 #define M_OR 11
62 #define M_XOR 12
63 #define M_MOVE 20
64 
65 // Palette math operations
66 #define PAL_LINEAR 0
67 #define PAL_CLINEA 1
68 #define PAL_SINE 2
69 #define PAL_CSINE 3
70 #define PAL_COS 4
71 #define PAL_CCOS 5
72 #define PAL_LOG 6
73 
74 // Available function in test image
75 #define TST_SQUARE 0
76 #define TST_SINE 1
77 #define TST_TRIANGLE 2
78 #define TST_LOGARITMIC 3
79 #define TST_SPOT 4
80 #define TST_SQUARE_F 5
81 #define TST_SINE_F 6
82 
83 // Available command for DI_DIFLoad
84 #define WIN_CREATE -1
85 
86 // Convolution Filters
87 #define CNV_LOWPASS_0 0
88 #define CNV_LOWPASS_1 1
89 #define CNV_LOWPASS_2 2
90 #define CNV_LOWPASS_3 3
91 #define CNV_LOWPASS_4 4
92 #define CNV_LOWPASS_5 5
93 #define CNV_LOWPASS_6 6
94 #define CNV_LOWPASS_7 7
95 
96 #define CNV_HIGHPASS_0 32
97 #define CNV_HIGHPASS_1 33
98 #define CNV_HIGHPASS_2 34
99 #define CNV_HIGHPASS_3 35
100 #define CNV_HIGHPASS_4 36
101 #define CNV_HIGHPASS_5 37
102 #define CNV_HIGHPASS_6 38
103 #define CNV_HIGHPASS_7 39
104 
105 #define CNV_EDGE_0 64
106 #define CNV_EDGE_1 65
107 #define CNV_EDGE_2 66
108 #define CNV_EDGE_3 67
109 #define CNV_EDGE_4 68
110 #define CNV_EDGE_5 69
111 #define CNV_EDGE_6 70
112 #define CNV_EDGE_7 71
113 
114 // Size & range definitions
115 #define MAXFLT 1E6 // Max floating point number
116 #define MAXZOOM 64 // Max zoom factor
117 #define MAXIMG 128 // Max images number (open at same time)
118 #define WINUM 8 // Maximum opened window on the same image
119 #define FLAGNUM 8 // Maximum flags on the image
120 #define MAXUNDO 32 // Maximum undo operations
121 
122 // Flag collection for graphics operations
123 #define G_GRID 1
124 #define G_SIGHT 2
125 #define G_CROSS 4
126 #define G_FLAG 8
127 
128 // Clipboard commands
129 #define DI_WINCOPY 1 // Copy the window settings
130 #define DI_COPYCONT 2 // Copy the window contents
131 
132 // Warning codes
133 #define WPROTECT 0
134 #define WLAST 1
135 #define WMAXIMG 2
136 #define WWIN 3
137 #define WERMEM 4
138 #define WDSKER 5
139 #define WFITER 6
140 #define WUNDEF -1
141 
142 // Grab variable types
143 #define CB_S8 1
144 #define CB_U8 2
145 #define CB_S16 3
146 #define CB_U16 4
147 #define CB_S32 5
148 #define CB_U32 6
149 #define CB_FLT 7
150 #define CB_DBL 8
151 #define CB_STR 9
152 #define CB_HEX 10
153 
154 // 2D activity flags
155 #define SET2D_BW 1
156 #define SET2D_GRID 2
157 #define SET2D_POINTS 4
158 #define SET2D_LOG 8
159 #define SET2D_BAR 16
160 
161 // MGUI Color codes
162 #define MC_SHELL 1 // Shell color
163 #define MC_FORM 2 // Form color
164 #define MC_MENU 3
165 #define MC_COUNTS 4
166 #define MC_LABEL 5
167 #define MC_BUTTON 6
168 #define MC_MEASURE 7
169 
170 // DIF File Keywords
171 #define DIF_STAT 1 // Low, High, ILow, IHigh, Media, Sigma, MaxNumbers
172 #define DIF_CAMERA 2 // CCD, PTF, OFF, GAIN, RANGE, SEXP, TAMB, TCCD, BINH, BINL, SX, SY, WX, WY
173 #define DIF_TIME 3 // DATE, TIME
174 #define DIF_USER 4 // FLEN, DIAMETER, AIRMASS, OBSERVER, FILTER, NOTES
175 #define DIF_ETIME 5 // Elapsed Time between images
176 #define DIF_PALETTE 6 // Palette inside the file
177 
178 #define MIN_IMG_DIM 380 // Minimum image dimension for readout cursor
179 
180 // Shortcuts
181 #define Image DIL.Img.Mat
182 #define IMG DIL.Img
183 #define SRV DIL.Img.IServer
184 
185 // Matrix read write
186 #define UWrMat(s, x, y, v) DIL.Img.Mat[s].Imat[(long) DIL.Img.Idx[s] * (y) + (x)] = (v)
187 #define RWrMat(s, x, y, v) DIL.Img.Mat[s].Rmat[(long) DIL.Img.Idx[s] * (y) + (x)] = (v)
188 #define GWrMat(s, x, y, v) DIL.Img.Mat[s].Gmat[(long) DIL.Img.Idx[s] * (y) + (x)] = (v)
189 #define BWrMat(s, x, y, v) DIL.Img.Mat[s].Bmat[(long) DIL.Img.Idx[s] * (y) + (x)] = (v)
190 #define FWrMat(s, x, y, v) DIL.Img.Mat[s].Fmat[(long) DIL.Img.Idx[s] * (y) + (x)] = (v)
191 #define _WrMat(s, x, y, v) DIL.Img.Mat[s].cmplx[y][x] = v
192 #define URdMat(s, x, y) DIL.Img.Mat[s].Imat[(long) DIL.Img.Idx[s] * (y) + (x)]
193 #define RRdMat(s, x, y) DIL.Img.Mat[s].Rmat[(long) DIL.Img.Idx[s] * (y) + (x)]
194 #define GRdMat(s, x, y) DIL.Img.Mat[s].Gmat[(long) DIL.Img.Idx[s] * (y) + (x)]
195 #define BRdMat(s, x, y) DIL.Img.Mat[s].Bmat[(long) DIL.Img.Idx[s] * (y) + (x)]
196 #define FRdMat(s, x, y) DIL.Img.Mat[s].Fmat[(long) DIL.Img.Idx[s] * (y) + (x)]
197 #define _RdMat(s, x, y) DIL.Img.Mat[s].cmplx[y][x]
198 
199 // UNIX definitions
200 #ifndef _WIN32
201 #define O_BINARY 0
202 #define _MAX_PATH 1024
203 #endif
204 
205 // Windows/Unix variable types definitions
206 #ifndef VARTYPES
207 #define VARTYPES
208 typedef unsigned char U8; // 1 byte
209 typedef char S8; // 1 byte
210 typedef short int S16; // 2 byte
211 typedef short unsigned U16; // 2 byte
212 typedef unsigned long U32; // 4 byte
213 typedef long S32; // 4 byte
214 #endif
215 
216 // C++ compability
217 #ifndef C_DEF
218  #ifdef __cplusplus
219  #define C_DEF extern "C"
220  #else
221  #define C_DEF
222  #endif
223 #endif
224 
225 // Complex number struct definitions
226 struct cpx {
227  double real;
228  double imag;
229 };
230 typedef struct cpx COMPLEX;
231 
232 // Time/Date struct
233 #ifndef TSTRUCT
234 struct time {
235  U8 ti_min; /* Minutes */
236  U8 ti_hour; /* Hours */
237  U8 ti_hund; /* Hundredths of seconds */
238  U8 ti_sec; /* Seconds */
239 };
240 struct date {
241  S16 da_year; /* Year - 1980 */
242  U8 da_day; /* Day of the month */
243  U8 da_mon; /* Month (1 = Jan) */
244 };
245 #endif
246 #define TSTRUCT
247 
248 struct parser {
249  char command[32]; // Max command lenght is 32 characters
251 };
252 
253 // ROI analyze
254 typedef struct roi {
255  // Parameters
256  int sx; // Start of window X
257  int sy; // Start of window Y
258  int dimx; // Window dimension in X
259  int dimy; // Window dimension in Y
260  // Outputs
261  double area; // Number of pixel area
262  double sum; // Total value of all pixels
263  double media; // Media of area
264  double adev; // Mean absolute deviation
265  double sigma; // STD of area
266  double varia; // Variance of area
267  double curt; // Kurtosis
268  double skew; // Skew
269  double min; // Minimum value of area
270  double max; // Maximum value of area
271  double ctrst; // Contrast value
272  double range; // Range of values
273  int lmin[2];// Location of minimum value [0] = x, [1] = y
274  int lmax[2];// Location of maximum value [0] = x, [1] = y
275 }roi;
276 
277 typedef struct img {
278  char calc; // Flag for statistics request
279  S16 attrib; // Image closing attribute: 0 = normal, 1 = Can't close from X button
280  S16 type; // 0 = 8 = 16 bit, 1 = RGB, 2 = float
281  S16 show; // Image showing attribute: 1 = normal, 0 = hide, 2 = GIF save
282  char save; // 0 = Image not saved, 1 = Saved image
283  S16 kind; // Files source: 0 = IMG, 1 = FITS, 2 = DIF
284  S16 col; // 0 = b/w, 1 = RGB
285  U32 graph; // Flag collection for graphics operations
286  U16 *Imat; // Image matrix: unsigned 16 bit
287  float *Fmat; // Image matrix: float 32 bit
288  U16 *Rmat; // Red channel: unsigned 16 bit
289  U16 *Gmat; // Green channel:unsigned 16 bit
290  U16 *Bmat; // Blue channel: unsigned 16 bit
291  float **cmplx; // FFT matrix
292  U8 **index; // GIF matrix, used in GIF as color index
293  U8 FFT; // 1 = FFT present
294  float Low; // Min value on image
295  float High; // Max value on image
296  float RLow; // Min value on red channel
297  float RHigh; // Max value on red channel
298  float GLow; // Min value on green channel
299  float GHigh; // Max value on green channel
300  float BLow; // Min value on blue channel
301  float BHigh; // Max value on blue channel
302  float ILow; // Min value user defined
303  float IHigh; // Max value user defined
304  char Ctrst; // Contrast flag: 0 = auto, 1 = manual
305  float Media; // Image average
306  float Sigma; // Standard deviation
307  char Fname[80]; // Associated file name with the image
308  char Path[_MAX_PATH];// Path name of the file
309  float MaxNumbers; // Image number range 8 bit = 255, 16 = 1023, 4095, 16383, 65535, FLOAT
310  S16 mother; // Mother image: -1 don't exist, >= 0 number of mother server
311  S16 daughter; // Daughter image: -1 don't exist, >= 0 number of daughter server
312  S16 zson; // Used zoom for daughter
313  // Public object of the image server
314  MOBJECT sel; // Flag of selected image
315  MOBJECT inf; // Flag of info activity
316  MOBJECT full; // Flag of RGB color selctions
317  MOBJECT red; // Flag of red channel selctions
318  MOBJECT green; // Flag of green channel selections
319  MOBJECT blue; // Flag of blue channel selections
320  MOBJECT xloc; // X label (cursor)
321  MOBJECT yloc; // Y label (cursor)
322  MOBJECT value; // Value label (cursor)
323  MOBJECT cshell; // Cursor shell
324  MOBJECT PopMnu; // Pop Up menu on the image
325  int cur; // Cursor activity 1 = on
326  // Camera parameters
327  char InfoPar; // 0 = Camera info not loaded, 1 = Loaded
328  char CCDName[20]; // Name of used CCD
329  char CamName[20]; // Camera Name
330  S16 off; // Amplifier offset
331  double gain; // Amplifier gain
332  S16 range; // A/D range
333  double SExp; // Time exposure used for this image
334  S16 TAMB; // Ambient temperature
335  S16 TCCD; // CCD Temperature
336  U16 HBin; // Hor. Bin. value
337  U16 VBin; // Ver. Bin. value
338  // ROI parameters
339  char Win; // 1 = Window operation
340  U16 Sx; // Start of window X
341  U16 Sy; // Start of window Y
342  U16 Wx; // Wind. Dim. X
343  U16 Wy; // Wind. Dim. Y
344 
345  double pxd; // Pixel dimension X
346  double pyd; // Pixel dimension Y
347  struct time TIME; // Registration time
348  struct date DATE; // Registration date
349  int snap; // Grid snap on the image
350  U32 etime; // Elapsed time between saved images
351 }img;
352 
353 // Mailbox for callbacks and processes
354 typedef struct message {
355  int server; // Used server
356  int row; // Current image row
357  int col; // Current image colon
358  U32 data; // Generic
359 }message;
360 
361 // Window structure data
362 typedef struct frame {
363  U16 on; // 1 = At least one window present
364  U16 x[WINUM]; // X location
365  U16 y[WINUM]; // Y location
366  U16 w[WINUM]; // Width
367  U16 h[WINUM]; // Height
368  U16 acc[WINUM]; // 1 = winodw on
369  U16 glue[WINUM];// 1 = glued window
370  U16 sel; // Selected window
371 }frame;
372 
373 typedef struct imgflag {
374  U16 on; // At least one flag
377  U16 acc[FLAGNUM];
378  U16 glue[FLAGNUM];
379  U16 sel; // Selected flag
380 }imgflag;
381 
382 typedef struct pal {
383  U16 r[256];
384  U16 g[256];
385  U16 b[256];
386 }pal;
387 
388 typedef struct control {
389  int snap; // Grid snap
390 }control;
391 
392 typedef struct col {
393  // Color for MGUI Objects
394  int BackShell[3];
395  int ForeShell[3];
396  int BackMenu[3];
397  int ForeMenu[3];
398  int BackForm[3];
399  int ForeForm[3];
400  int BackCounts[3];
401  int ForeCounts[3];
402  int BackLabel[3];
403  int ForeLabel[3];
404  int BackButton[3];
405  int ForeButton[3];
406  int BackMeasure[3];
407  int ForeMeasure[3];
408  // Used color by DIL
409  MTColor HistoGrid; // Histogram grid
410  MTColor HistoCol; // Histogram foreground
411  MTColor HistoBack; // Histogram background
412  MTColor FrameCol; // Window color
413  MTColor VCol; // Color of vertex window
414  MTColor ActCol; // Used color to indicate image stretching operations
415  MTColor ActColN; // Color for integer math on image
416  MTColor ActColF; // Color for float math on image
417  MTColor Black; // Generic use
418  MTColor White; // ""
419  MTColor Gray; // ""
420  MTColor Mark; // Used color for all markers
421 }col;
422 
423 typedef struct info {
426  char AirMass[20];
427  char Observer[20];
428  char Filter[20];
429  char Notes[20];
430 }info;
431 
432 #define MAX2DPLOT 32
433 
434 typedef struct plot {
435  char title[1024];// Plot title
436  MOBJECT sh; // Shell of plot area
437  MOBJECT draw; // Draw area
438  MOBJECT lbl; // Label associated to X value
439  MOBJECT lblv; // Label associated to value
440  MOBJECT x; // Label of x position
441  MOBJECT val; // Label of the value
442  MOBJECT lzx; // Label of X zoom
443  MOBJECT lzy; // Label of Y zoom
444  MOBJECT cshell; // Cursor shell
445  MOBJECT ldx; // Label for delta X
446  MOBJECT ldv; // Label for delta value
447  double *data; // Array of plot area
448  double *sdata; // Backup of data
449  COMPLEX *ft; // Frequency Domain of the array
450  U8 fton; // 1 = FT on
451  double min; // Minimum value
452  double max; // Maximum value
453  double yoff; // Offset Y
454  U16 xoff; // Offset X
455  double zx; // Zoom X
456  double zy; // Zoom Y
457  double sx; // Start X
458  double rx; // Range X
459  double vx; // Multiplier value
460  int num; // Num of elements in plot array
461  int dx; // Showed elements in X
462  int dy; // Y axis dimension
463  int ody; // Original Y axis dimension
464  double ady; // Y axis ratio
465  U8 back[3]; // RGB color for background plot area
466  U8 fore[3]; // RGB color for foreground plot area
467  U32 status; // Flag activity
468 // U8 bw; // 1 = BW display
469 // U8 grid; // 1 = Grid
470  U8 mark; // 1 = Marker on
471 // U8 points; // 1 = Show all points of data
472  U8 done; // 1 = Drawing completed
473 }plot;
474 
475 typedef struct console {
476  char *Console;
477  int Active; // 1 = Console active
478  // OCon = MObject for label
479  // ConsSh = Shell of the consolle
480  // ConTextLbl = Label for input
481  // ConText = Edit for input
482  MOBJECT OCon, ConsSh, ConTextLbl, ConText;
483  // CCol, CRow = cursor position
484  // CWx, CWy = Console number of characters
485  // CScroll = 1: Scroll active, 0: Page mode
486  // CDsp = 1: Display is active, 0: Display off
487  int CCol, CRow, CWx, CWy, CScroll, CDsp;
488  char *Input;
489  char InputDone;
490 
491 }console;
492 
493 // Lens
494 typedef struct lens {
495  // Lens variables
496  U8 LensON; // If 1 indicate lens activity
497  int LensPix;
498  int LensWx, LensWy, LWx, LWy;
499  MOBJECT LensDraw, LensLbl, LensLblX, LensLblY, LensLblV;
502 }lens;
503 
504 // Old variable for IMG file format
505 typedef struct oldimg {
506  info Inf[MAXIMG]; // Old user information for IMG files
507  U8 User[MAXIMG]; // Old flag used in IMG files to indicate CCD windowing operation
508  U16 ccdXoff[MAXIMG];// Old coordinate used in IMG files for windowing operations
509  U16 ccdYoff[MAXIMG];// Old coordinate used in IMG files for windowing operations
510  U16 ccdWx[MAXIMG]; // Old coordinate used in IMG files for windowing operations
511  U16 ccdWy[MAXIMG]; // Old coordinate used in IMG files for windowing operations
512  U8 Bin[MAXIMG]; // Value of binning stored in IMG files
513 }oldimg;
514 
515 // Coordinate variables for the image
516 typedef struct coord {
517  //
518  // Vert locate the window vertex
519  //
520  // 0 1
521  // *-------------*
522  // | |
523  // | |
524  // | |
525  // | |
526  // | |
527  // *-------------*
528  // 2 3
529  U16 VertX[WINUM][4]; // Vertex window on current image
530  U16 VertY[WINUM][4]; // Vertex window on current image
531 
532  // Polygon coordinate and flags
533  U16 *Vx[MAXIMG], *Vy[MAXIMG];
535 
536  U16 OrgX, OrgY; // Server origin
537  U16 LocX[MAXIMG], LocY[MAXIMG]; // Cursor position on the image
538 }coord;
539 
540 typedef struct histogram {
541  // Histogram variables
542  MOBJECT HistoDraw, HistoShell, HistoObj[8], HistoMnu;
543  U16 HistoMode, HistoWin, HistoMul;
544  U8 HistOn, HistoReent;
545  float *Histo[MAXIMG], HistoLow, HistoHigh;
546  U8 AutoCtrst; // If 1 perform max/min on histogram call
547  double DI_Amp, DI_Off; // Amplify & offset for image control
548 }histogram;
549 
550 // Images global variables
551 typedef struct image {
552  img Mat[MAXIMG]; // Image matrix structures
553  U8 DSPChange; // 1 = Rebuild image bitmap
554  U8 RGBSelector; // Select a display channel, 0 = All, 1 = Red, 2 = Green, 3 = Blue
555  frame Frame[MAXIMG]; // frames structure on the image
556  imgflag Flag[MAXIMG]; // flags structure on the image
557  oldimg OldIMG; // Old IMG variables definition
558  coord Coord; // Coordinates
559  histogram H; // Histogram variables
560  lens Lens; // Lens variables
561  U8 Prof[MAXIMG]; // Enable image profile
562  U8 PProf[MAXIMG]; // Indicate profile action
563  MIMAGE Imim[MAXIMG]; // Buffer draw area
564  MOBJECT Iimg[MAXIMG]; // MGUI image server
565  MOBJECT Isrv[MAXIMG]; // Shell server
566  MOBJECT Isfr[MAXIMG]; // Scrolled form
567  U8 Iacc[MAXIMG]; // Server status access
568  MOBJECT ShActive[MAXIMG]; // Flag activity
569  U16 Icnt; // Server count
570  U16 Idx[MAXIMG]; // X Server dimension
571  U16 Idy[MAXIMG]; // Y Server dimension
572  U16 IServer; // Used server
573  U16 Undo[MAXIMG]; // Undo counter
574  U16 PVsrv; // Previous server
575  double PixX[MAXIMG]; // Zoom value
576  double PixY[MAXIMG]; // Zoom value
577  U16 DimX[MAXIMG], DimY[MAXIMG]; // Scroll bar dimension
578  U16 LshX[MAXIMG], LshY[MAXIMG]; // Shell position on the screen
579 
580  MTColor iPAL[MAXIMG][256]; // Palette x 256 colors, for drawing elements: lines, text, etc.
581  MTColor RPAL[MAXIMG][256]; // Palette x 256 colors, Red channel for drawing elements: lines, text, etc.
582  MTColor GPAL[MAXIMG][256]; // Palette x 256 colors, Green channel for drawing elements: lines, text, etc.
583  MTColor BPAL[MAXIMG][256]; // Palette x 256 colors, Blue channel for drawing elements: lines, text, etc.
584  pal PAL[MAXIMG]; // Color palette for monochrome and color image
585 }image;
586 
587 #define VM_UPDATE_TIME 100L
588 
589 typedef struct animate {
590  TIMEOUT_ID to_id; // Animate timer id
591  int cntani; // Counting variable
592  int Num; // Num. of frame
593  int sx;
594  int sy;
595  int width; // Width of the pix area
596  int height; // Height of the pix area
597  int dx; // Destination in pixel area
598  int dy; // Destination in pixel area
599  MOBJECT pix; // Pixel area
600  MIMAGE MImage[1024];
601 }animate;
602 
603 // Active shell list parameters
604 typedef struct shelldim {
606  int dx;
607  int dy;
608 }shelldim;
609 
610 #define MAXSHELL 128
611 typedef struct shellinfo {
613  int SHa[MAXSHELL];
614  int SHc;
615 }shellinfo;
616 
617 // Graphics
618 typedef struct graph {
619  plot Plot[MAX2DPLOT];// Plot area variables
620  int PlotN; // Plot area counter
621  // Animate
623  // Digits
624  MIMAGE digit[13]; // BMP for seven segment number
625 }graph;
626 
627 // Utility
628 typedef struct util {
629  console Con[MAXIMG]; // Console variables
630  int ConNum; // Console opened
631  int ConActive; // Active console id
632 }util;
633 
634 // Math data
635 typedef struct math {
636  char U16fmt[16]; // U16 print specifier
637  char FLTfmt[16]; // float print specifier
638 }math;
639 
640 // Config
641 typedef struct cfg {
642  col Col; // Menu, Shell Color Attributes
643  int PopUpHelp; // 1 = PopUp help active
644  U16 ShLoc[8][2]; // Location of service shell:
645  // 0 - Exposure
646  // 1 - Message
647  U16 Maxx, Maxy; // Max absolute value of graphic interface
648  U32 NColors; // Max number of colors available on graphic card
649  U16 Planes; // Graphic Planes
650  math M; // Math definitions
651  MTFont font; // Default font for graphics
652 }cfg;
653 
654 // Windows Manager Data
655 typedef struct wm {
656  int on; // 1 = Windows Manager Active
657  MOBJECT sh; // Shell of windows manager
658  MOBJECT rb[MAXIMG]; // Activate radio button
659  MOBJECT type[MAXIMG]; // Image types label
660  MOBJECT data[MAXIMG]; // Data types label
661  MOBJECT name[MAXIMG]; // Image name label
662 }wm;
663 
664 // Clipboard data
665 typedef struct clip {
666  int s_srv; // Source server
667  int d_srv; // Destination server
668  int s_win; // Source window identifier
669  int d_win; // Destination window identifier
670  int com; // Code of command
671 }clip;
672 
673 // DIL struct
674 typedef struct dil {
678  cfg Cfg; // Configuration variables
679  message Msg; // Mailbox for variables handshacking
680  wm WM; // Windows Manager Data
681  clip Clip; // Clipboard data
682  MOBJECT CS[256]; // Generic mobject array for complex procedures
683  shellinfo S; // Active Shell information
684 }dil;
685 
686 //*** Added by DanBo 08/09/2003 - Modified 14/04/2004 (added binxxxx Values) *****************
687 typedef struct hdrsp{
688  int imgfmt;
689  int imgtype;
690  int camtype;
691  int ccdtype;
692  int ccdwx;
693  int ccdwy;
694  int ccdxs ;
695  int ccdys ;
696  int ccdxe ;
697  int ccdye ;
698  int ccdvbin;
699  int ccdnr;
700  struct time TIME;
701  struct date DATE;
702  char mirpos[8];
703  char binmirpos[8];
704  int lambda;
705  const char *filpos;
706  char binfilpos[5];
707  float ccdtemp;
708  float ccdtexp;
709  unsigned int imgmax;
710  unsigned int imgmin;
711  double imgavg;
712  double imgsig;
713  int dummy1;
714  int dummy2;
715  int dummy3;
716  int dummy4;
717  char *comment;
718  char bincomment[255];
719  float s_latitude;
720  float s_longitude;
721  char s_name[4];
722  unsigned int s_alt;
723  int nom;
724  float s_sza;
725 
726 }hdrsp;
727 
S16 daughter
Definition: Dildef.h:311
MTFont font
Definition: Dildef.h:651
cfg Cfg
Definition: Dildef.h:678
MOBJECT full
Definition: Dildef.h:316
int d_srv
Definition: Dildef.h:667
U16 Icnt
Definition: Dildef.h:569
int row
Definition: Dildef.h:356
struct clip clip
U8 done
Definition: Dildef.h:472
unsigned int Maxx
Definition: D_Zoom.c:18
U16 VBin
Definition: Dildef.h:337
int on
Definition: Dildef.h:656
Definition: Dildef.h:277
int sx
Definition: Dildef.h:593
struct message message
int com
Definition: Dildef.h:670
float Sigma
Definition: Dildef.h:306
U16 OrgY
Definition: Dildef.h:536
struct pal pal
S16 kind
Definition: Dildef.h:283
U32 graph
Definition: Dildef.h:285
int CWy
Definition: Dildef.h:487
double yoff
Definition: Dildef.h:453
int PopUpHelp
Definition: Dildef.h:643
struct oldimg oldimg
MOBJECT value
Definition: Dildef.h:322
int LensPix
Definition: Dildef.h:497
double ctrst
Definition: Dildef.h:271
char Ctrst
Definition: Dildef.h:304
float GHigh
Definition: Dildef.h:299
int cntani
Definition: Dildef.h:591
unsigned int imgmin
Image minimum value.
Definition: Dildef.h:710
double min
Definition: Dildef.h:451
U16 Planes
Definition: Dildef.h:649
double max
Definition: Dildef.h:270
int LWy
Definition: Dildef.h:498
Definition: Dildef.h:362
util Utl
Definition: Dildef.h:677
MOBJECT OCon
Definition: Dildef.h:482
struct util util
Definition: Dildef.h:382
MTColor Mark
Definition: Dildef.h:420
int dx
Definition: Dildef.h:461
float MaxNumbers
Definition: Dildef.h:309
struct frame frame
double * data
Definition: Dildef.h:447
MTColor ActCol
Definition: Dildef.h:414
U32 data
Definition: Dildef.h:358
int ccdwy
Total Number of Y Pixels.
Definition: Dildef.h:693
char InputDone
Definition: Dildef.h:489
double vx
Definition: Dildef.h:459
U8 da_mon
Definition: Dildef.h:243
Definition: Dildef.h:665
U8 ti_sec
Definition: Dildef.h:238
char InfoPar
Definition: Dildef.h:327
U16 HistoWin
Definition: Dildef.h:543
double gain
Definition: Dildef.h:331
U16 IServer
Definition: Dildef.h:572
MOBJECT sh
Definition: Dildef.h:657
int snap
Definition: Dildef.h:349
int sx
Definition: Dildef.h:256
struct img img
int ccdwx
Total Number of X Pixels.
Definition: Dildef.h:692
double imgavg
Image average value.
Definition: Dildef.h:711
S16 off
Definition: Dildef.h:330
int dummy4
Definition: Dildef.h:716
MOBJECT xloc
Definition: Dildef.h:320
int dummy3
Definition: Dildef.h:715
double pxd
Definition: Dildef.h:345
MOBJECT PopMnu
Definition: Dildef.h:324
U16 * Imat
Definition: Dildef.h:286
int ccdys
Y Start.
Definition: Dildef.h:695
U16 HBin
Definition: Dildef.h:336
U16 on
Definition: Dildef.h:374
animate Movie
Definition: Dildef.h:622
MOBJECT sh
Definition: Dildef.h:436
int nom
number of measurements (averaging)
Definition: Dildef.h:723
S16 type
Definition: Dildef.h:280
double curt
Definition: Dildef.h:267
Definition: Dildef.h:392
MTColor ActColF
Definition: Dildef.h:416
U16 * Gmat
Definition: Dildef.h:289
int col
Definition: Dildef.h:357
float ccdtemp
CCD Temperature.
Definition: Dildef.h:707
struct cfg cfg
double skew
Definition: Dildef.h:268
Definition: Dildef.h:423
MOBJECT cshell
Definition: Dildef.h:444
Definition: Dildef.h:551
#define WINUM
Definition: Dildef.h:118
MTColor Gray
Definition: Dildef.h:419
Definition: Dildef.h:434
double imag
Definition: Dildef.h:228
U8 LensON
Definition: Dildef.h:496
#define FLAGNUM
Definition: Dildef.h:119
MOBJECT val
Definition: Dildef.h:441
Definition: Dildef.h:628
U32 NColors
Definition: Dildef.h:648
Definition: Dildef.h:687
MOBJECT lblv
Definition: Dildef.h:439
struct info info
struct imgflag imgflag
int ccdxe
X End.
Definition: Dildef.h:696
U16 * Rmat
Definition: Dildef.h:288
int dimx
Definition: Dildef.h:258
CARD32 MTColor
Definition: Mguidefs.h:183
S16 range
Definition: Dildef.h:332
image Img
Definition: Dildef.h:675
double * sdata
Definition: Dildef.h:448
S16 da_year
Definition: Dildef.h:241
int PlotN
Definition: Dildef.h:620
int height
Definition: Dildef.h:596
MOBJECT lzy
Definition: Dildef.h:443
U16 Wy
Definition: Dildef.h:343
U8 da_day
Definition: Dildef.h:242
U8 HistoReent
Definition: Dildef.h:544
unsigned char U8
1 byte without sign, range 0-255
Definition: dcldef.h:371
short unsigned U16
2 byte without sign, range 0-65535
Definition: dcldef.h:375
int ccdtype
Definition: Dildef.h:691
MOBJECT cshell
Definition: Dildef.h:323
float BHigh
Definition: Dildef.h:301
S16 TAMB
Definition: Dildef.h:334
int imgtype
Definition: Dildef.h:689
double max
Definition: Dildef.h:452
U8 DSPChange
Definition: Dildef.h:553
MOBJECT pix
Definition: Dildef.h:599
U8 ti_hour
Definition: Dildef.h:236
MTColor VCol
Definition: Dildef.h:413
U8 ti_hund
Definition: Dildef.h:237
unsigned int s_alt
station altitude
Definition: Dildef.h:722
struct wm wm
MOBJECT lbl
Definition: Dildef.h:438
float s_longitude
station longitude
Definition: Dildef.h:720
double adev
Definition: Dildef.h:264
int sy
Definition: Dildef.h:594
struct animate animate
struct coord coord
float RHigh
Definition: Dildef.h:297
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
double zy
Definition: Dildef.h:456
U16 xoff
Definition: Dildef.h:454
char save
Definition: Dildef.h:282
int dy
Definition: Dildef.h:462
Definition: Dildef.h:494
Definition: Dildef.h:226
U16 on
Definition: Dildef.h:363
unsigned long U32
4 byte without sign, range 0-4294967295
Definition: dcldef.h:376
U16 PVsrv
Definition: Dildef.h:574
char * comment
comment
Definition: Dildef.h:717
#define MAX2DPLOT
Definition: Dildef.h:432
U16 sel
Definition: Dildef.h:379
int dy
Definition: Dildef.h:598
int ody
Definition: Dildef.h:463
Definition: Dildef.h:641
MTColor HistoGrid
Definition: Dildef.h:409
char calc
Definition: Dildef.h:278
struct image image
message Msg
Definition: Dildef.h:679
MTColor ActColN
Definition: Dildef.h:415
int imgfmt
Image format: 0 = ASCII, 1 = BIN.
Definition: Dildef.h:688
Definition: Dildef.h:655
int MTFont
Definition: Mguidefs.h:175
MOBJECT HistoShell
Definition: Dildef.h:542
U16 Sy
Definition: Dildef.h:341
struct col col
char * Input
Definition: Dildef.h:488
float RLow
Definition: Dildef.h:296
double sigma
Definition: Dildef.h:265
MOBJECT blue
Definition: Dildef.h:319
int dummy2
Definition: Dildef.h:714
Definition: Dildef.h:505
int ccdnr
Row number (ccdyoff-ccdwx)/ccdvbin.
Definition: Dildef.h:699
struct control control
double min
Definition: Dildef.h:269
Image description.
Definition: Mguidefs.h:436
Definition: Dildef.h:240
double pyd
Definition: Dildef.h:346
Definition: Dildef.h:618
histogram H
Definition: Dildef.h:559
int dimy
Definition: Dildef.h:259
U8 FFT
Definition: Dildef.h:293
MOBJECT x
Definition: Dildef.h:440
float IHigh
Definition: Dildef.h:303
float s_sza
sun solar zenith angles
Definition: Dildef.h:724
U16 Sx
Definition: Dildef.h:340
double imgsig
Image standard deviation value.
Definition: Dildef.h:712
double sx
Definition: Dildef.h:457
char Win
Definition: Dildef.h:339
MOBJECT LensLblY
Definition: Dildef.h:499
int snap
Definition: Dildef.h:389
U16 Maxy
Definition: Dildef.h:647
int dx
Definition: Dildef.h:606
struct dil dil
shellinfo S
Definition: Dildef.h:683
int cur
Definition: Dildef.h:325
clip Clip
Definition: Dildef.h:681
S16 col
Definition: Dildef.h:284
float s_latitude
station latitude
Definition: Dildef.h:719
int ConActive
Definition: Dildef.h:631
#define _MAX_PATH
Definition: Dildef.h:202
int SHc
Definition: Dildef.h:614
U8 fton
Definition: Dildef.h:450
int ConNum
Definition: Dildef.h:630
#define MAXSHELL
Definition: Dildef.h:610
U8 ** index
Definition: Dildef.h:292
MOBJECT yloc
Definition: Dildef.h:321
long S32
4 byte with sign, range +2147483647-2147483647
Definition: dcldef.h:377
struct shellinfo shellinfo
MIMAGE LensMim
Definition: Dildef.h:500
math M
Definition: Dildef.h:650
MOBJECT red
Definition: Dildef.h:317
float ILow
Definition: Dildef.h:302
double SExp
Definition: Dildef.h:333
short int S16
2 byte with sign, -32768+32767
Definition: dcldef.h:374
MTColor HistoCol
Definition: Dildef.h:410
short int S16
Definition: Dildef.h:210
MTColor HistoBack
Definition: Dildef.h:411
const char * filpos
Filter position.
Definition: Dildef.h:705
MOBJECT sel
Definition: Dildef.h:314
U8 VPFlg
Definition: Dildef.h:534
MOBJECT LensShell
Definition: Dildef.h:501
int sy
Definition: Dildef.h:257
MOBJECT green
Definition: Dildef.h:318
double varia
Definition: Dildef.h:266
S32 tok
Definition: Dildef.h:250
char S8
Definition: Dildef.h:209
float * Fmat
Definition: Dildef.h:287
int d_win
Definition: Dildef.h:669
U32 status
Definition: Dildef.h:467
COMPLEX * ft
Definition: Dildef.h:449
double DI_Off
Definition: Dildef.h:547
int camtype
Definition: Dildef.h:690
MTColor Black
Definition: Dildef.h:417
U8 ti_min
Definition: Dildef.h:235
coord Coord
Definition: Dildef.h:558
short unsigned U16
Definition: Dildef.h:211
MOBJECT ldx
Definition: Dildef.h:445
Definition: Dildef.h:674
TIMEOUT_ID to_id
Definition: Dildef.h:590
struct math math
U16 sel
Definition: Dildef.h:370
double area
Definition: Dildef.h:261
struct console console
int Active
Definition: Dildef.h:477
int num
Definition: Dildef.h:460
int ccdye
Y End.
Definition: Dildef.h:697
unsigned long U32
Definition: Dildef.h:212
float HistoLow
Definition: Dildef.h:545
struct histogram histogram
char * Console
Definition: Dildef.h:476
U16 FLen
Definition: Dildef.h:424
CARD32 TIMEOUT_ID
Definition: Mguidefs.h:1421
float ** cmplx
Definition: Dildef.h:291
lens Lens
Definition: Dildef.h:560
U16 Wx
Definition: Dildef.h:342
int dummy1
Definition: Dildef.h:713
MOBJECT draw
Definition: Dildef.h:437
int ccdxs
X Start.
Definition: Dildef.h:694
double ady
Definition: Dildef.h:464
graph Graph
Definition: Dildef.h:676
void * MOBJECT
Definition: Mguidefs.h:192
Definition: Dildef.h:234
U8 RGBSelector
Definition: Dildef.h:554
struct shelldim shelldim
MOBJECT sh
Definition: Dildef.h:605
S16 mother
Definition: Dildef.h:310
double range
Definition: Dildef.h:272
MOBJECT ldv
Definition: Dildef.h:446
int Num
Definition: Dildef.h:592
MOBJECT lzx
Definition: Dildef.h:442
MOBJECT inf
Definition: Dildef.h:315
U8 AutoCtrst
Definition: Dildef.h:546
struct roi roi
Definition: Dildef.h:248
double sum
Definition: Dildef.h:262
col Col
Definition: Dildef.h:642
int s_srv
Definition: Dildef.h:666
S16 TCCD
Definition: Dildef.h:335
Definition: Dildef.h:516
double real
Definition: Dildef.h:227
int server
Definition: Dildef.h:355
Definition: Dildef.h:254
Definition: Dildef.h:635
int lambda
wavelength value
Definition: Dildef.h:704
float GLow
Definition: Dildef.h:298
struct plot plot
struct hdrsp hdrsp
int dy
Definition: Dildef.h:607
double zx
Definition: Dildef.h:455
float Low
Definition: Dildef.h:294
double media
Definition: Dildef.h:263
float ccdtexp
ccd Exposure time
Definition: Dildef.h:708
struct lens lens
int dx
Definition: Dildef.h:597
MTColor FrameCol
Definition: Dildef.h:412
U16 * Bmat
Definition: Dildef.h:290
unsigned int imgmax
Image maximum value.
Definition: Dildef.h:709
float High
Definition: Dildef.h:295
S16 show
Definition: Dildef.h:281
int width
Definition: Dildef.h:595
long S32
Definition: Dildef.h:213
struct graph graph
int ccdvbin
Vertical binning value.
Definition: Dildef.h:698
oldimg OldIMG
Definition: Dildef.h:557
wm WM
Definition: Dildef.h:680
float BLow
Definition: Dildef.h:300
U32 etime
Definition: Dildef.h:350
MTColor White
Definition: Dildef.h:418
U16 Diameter
Definition: Dildef.h:425
float Media
Definition: Dildef.h:305
int s_win
Definition: Dildef.h:668
S16 attrib
Definition: Dildef.h:279
U8 mark
Definition: Dildef.h:470
double rx
Definition: Dildef.h:458
unsigned char U8
Definition: Dildef.h:208
#define MAXIMG
Definition: Dildef.h:117
S16 zson
Definition: Dildef.h:312
______________________________________________________________________________________
Generated on Mon Sep 18 2017 11:44:08 for DAS - Rel. 3.1.6 - 18/09/2017.