-
Notifications
You must be signed in to change notification settings - Fork 1
/
ezwinit.c
74 lines (65 loc) · 1.58 KB
/
ezwinit.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/*
* ezwinit.c
*
* Routines to initialize the EZ widgets used in xdisp.
*
* Create_EZ_Widgets()
* ReInitialize()
*
* Copyright Bruce Pike, 1997
*/
#include "xdisp.h"
/*----------------------- Create_EZ_Widgets() --------------------------*/
void Create_EZ_Widgets()
{
/* initialize all widgets */
Initialize_File_Widgets();
Initialize_Info_Widget();
Initialize_Help_Widget();
Initialize_Input_Widget();
Initialize_Plot_Widget();
Initialize_Error_Widget();
/* set the default font for all EZ widgets */
if (font!=NULL) {
EZ_SetDefaultLabelFont(font);
EZ_SetDefaultMenuTitleFont(font);
}
else {
EZ_SetDefaultLabelFont(DEFAULT_EZ_FONT);
EZ_SetDefaultMenuTitleFont(DEFAULT_EZ_FONT);
}
}
/*------------------------ ReInitialize --------------------------*/
void ReInitialize()
{
int i, j;
/* image dimensions, etc */
oWidth = Width = oHeight = Height = 0;
minc_x_dim = minc_y_dim = minc_z_dim = minc_t_dim = -1;
file_format = UNKNOWN_FORMAT;
RW_valid = True;
rw_offset = 0.0;
rw_scale = 1.0;
X_reverse = Y_reverse = False;
cropped = False;
crop_y = crop_x = 0;
image_increment = 0;
/* a other few handy things */
Lower = SHRT_MAX;
Upper = SHRT_MIN;
rw_Lower = (double) Lower;
rw_Upper = (double) Upper;
I_Max = SHRT_MIN;
I_Min = SHRT_MAX;
zoom_flag = 0;
zoom_factor_x = zoom_factor_y = 1.0;
h_profile_active = 0;
v_profile_active = 0;
ez_buffer_mode = 1;
selzoom_active = 0;
selzoom_factor_x = selzoom_factor_y = 2;
ox = oy = 0;
plot_active = -1;
plot_style = 1;
plot_roi_size = 0;
}