1 | %'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation |
---|
2 | function write_plot_param(handles,PlotParam) |
---|
3 | |
---|
4 | %scalar or image parameters |
---|
5 | if isfield(PlotParam,'Scalar') |
---|
6 | set_scal_display(handles,'on') |
---|
7 | if isfield(PlotParam.Scalar,'MaxA') |
---|
8 | set(handles.MaxA,'String',num2str(PlotParam.Scalar.MaxA,3)); |
---|
9 | end |
---|
10 | if isfield(PlotParam.Scalar,'MinA') |
---|
11 | set(handles.MinA,'String',num2str(PlotParam.Scalar.MinA,3)); |
---|
12 | end |
---|
13 | |
---|
14 | if isfield(PlotParam.Scalar,'IncrA') |
---|
15 | set(handles.IncrA,'String',num2str(PlotParam.Scalar.IncrA,3)) |
---|
16 | end |
---|
17 | else |
---|
18 | set_scal_display(handles,'off') |
---|
19 | end |
---|
20 | |
---|
21 | % parameter for vector field |
---|
22 | if isfield(PlotParam,'Vectors') |
---|
23 | set_vect_display(handles,'on') |
---|
24 | if isfield(PlotParam.Vectors,'VecScale') |
---|
25 | set(handles.VecScale,'String',num2str(PlotParam.Vectors.VecScale,3)) |
---|
26 | end |
---|
27 | if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') |
---|
28 | MinC=PlotParam.Vectors.MinC; |
---|
29 | MaxC=PlotParam.Vectors.MaxC; |
---|
30 | set(handles.min_vec,'String', num2str(MinC,3)); |
---|
31 | set(handles.max_vec,'String',num2str(MaxC,3)); |
---|
32 | list=get(handles.color_code,'String'); |
---|
33 | ichoice=get(handles.color_code,'Value'); |
---|
34 | color_option=list{ichoice}; |
---|
35 | test3color=strcmp(color_option,'rgb')||strcmp(color_option,'bgr'); |
---|
36 | if test3color% need to update color thresholds |
---|
37 | set(handles.colcode1,'Visible','on') |
---|
38 | set(handles.colcode2,'Visible','on') |
---|
39 | set(handles.slider1,'Visible','on') |
---|
40 | set(handles.slider2,'Visible','on') |
---|
41 | % slider1=get(handles.slider1,'Value'); |
---|
42 | % slider2=get(handles.slider2,'Value'); |
---|
43 | colcode1=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode1; |
---|
44 | colcode2=MinC+(MaxC-MinC)*PlotParam.Vectors.colcode2; |
---|
45 | set(handles.colcode1,'String',num2str(colcode1,3)) |
---|
46 | set(handles.colcode2,'String',num2str(colcode2,3)) |
---|
47 | set(handles.slider1,'Value',PlotParam.Vectors.colcode1) |
---|
48 | set(handles.slider2,'Value',PlotParam.Vectors.colcode2) |
---|
49 | else |
---|
50 | set(handles.colcode1,'Visible','off') |
---|
51 | set(handles.colcode2,'Visible','off') |
---|
52 | set(handles.slider1,'Visible','off') |
---|
53 | set(handles.slider2,'Visible','off') |
---|
54 | end |
---|
55 | end |
---|
56 | else |
---|
57 | set_vect_display(handles,'off') |
---|
58 | set(handles.edit_vect,'Visible','off') |
---|
59 | end |
---|
60 | |
---|
61 | %------------------------------------------------------------------ |
---|
62 | %prepare interface for scalar display: state ='on' or 'off' |
---|
63 | function set_scal_display(handles,state) |
---|
64 | %------------------------------------------------------------------ |
---|
65 | set(handles.SCALAR_title,'Visible',state) |
---|
66 | set(handles.MaxA,'Visible',state) |
---|
67 | set(handles.MinA,'Visible',state) |
---|
68 | %set(handles.IncrA,'Visible',state) |
---|
69 | set(handles.AutoScal,'Visible',state) |
---|
70 | set(handles.BW,'Visible',state) |
---|
71 | set(handles.Contours,'Visible',state) |
---|
72 | set(handles.SCALAR_title,'Visible',state) |
---|
73 | set(handles.min_title,'Visible',state) |
---|
74 | set(handles.max_title,'Visible',state) |
---|
75 | set(handles.frame_scal,'Visible',state) |
---|
76 | set(handles.npx,'Visible',state) |
---|
77 | set(handles.npy,'Visible',state) |
---|
78 | set(handles.npx_title,'Visible',state) |
---|
79 | set(handles.npy_title,'Visible',state) |
---|
80 | %set(handles.makemask,'Visible',state) |
---|
81 | |
---|
82 | %--------------------------------------------- |
---|
83 | %prepare interface for vector display: state ='on' or 'off' |
---|
84 | function set_vect_display(handles,state) |
---|
85 | %------------------------------------------------------------------ |
---|
86 | set(handles.frame_vect,'Visible',state) |
---|
87 | set(handles.VECT_title,'Visible',state) |
---|
88 | set(handles.VecScale,'Visible',state) |
---|
89 | set(handles.AutoVec,'Visible',state) |
---|
90 | set(handles.HideFalse,'Visible',state) |
---|
91 | set(handles.HideWarning,'Visible',state) |
---|
92 | set(handles.record,'Visible',state) |
---|
93 | set(handles.colcode1,'Visible',state) |
---|
94 | set(handles.colcode2,'Visible',state) |
---|
95 | set(handles.min_vec,'Visible',state) |
---|
96 | set(handles.max_vec,'Visible',state) |
---|
97 | set(handles.scale_title,'Visible',state) |
---|
98 | set(handles.slider1,'Visible',state) |
---|
99 | set(handles.slider2,'Visible',state) |
---|
100 | set(handles.col_vec,'Visible',state) |
---|
101 | set(handles.Color_title,'Visible',state) |
---|
102 | set(handles.color_code,'Visible',state) |
---|
103 | set(handles.vec_col_bar,'Visible',state) |
---|
104 | set(handles.record,'Visible',state) |
---|
105 | set(handles.AutoVecColor,'Visible',state) |
---|
106 | set(handles.decimate4,'Visible',state) |
---|
107 | set(handles.min_C_title,'Visible',state) |
---|
108 | set(handles.max_C_title,'Visible',state) |
---|
109 | set(handles.MenuEditVectors,'Enable',state) |
---|