source: trunk/src/write_plot_param.m @ 131

Last change on this file since 131 was 128, checked in by sommeria, 14 years ago

series: give writting access to the group for all subdirectories produced
uvmat.fig: change of vect and scalar frames (to be consistent with view_field)
uvmat: various cleaning
plot_field: various cleaning to improve axes definition and avoid blinking
geometry_calib: improved dispay of point coordiantes, improved link with dataview for REPLICATE.
struct2nc: repair bug , file was not closed.
cell2tab: cleaning
dataview: improve the browser
civ: solve pb of image naming

File size: 4.4 KB
Line 
1%'write_plot_param': update the plotting parameters on the uvmat interface after a plotting operation
2function write_plot_param(handles,PlotParam)
3
4%scalar or image parameters
5if 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
17else
18    set_scal_display(handles,'off')
19end
20
21% parameter for vector field
22if 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
56else
57    set_vect_display(handles,'off')
58    if isfield(handles,'edit_vect')
59        set(handles.edit_vect,'Visible','off')
60        set(handles.record,'Visible','off')
61    end
62end
63
64%------------------------------------------------------------------
65%prepare interface for scalar display: state ='on' or 'off'
66function set_scal_display(handles,state)
67%------------------------------------------------------------------
68% set(handles.SCALAR_title,'Visible',state)
69set(handles.MaxA,'Visible',state)
70set(handles.MinA,'Visible',state)
71%set(handles.IncrA,'Visible',state)
72set(handles.AutoScal,'Visible',state)
73set(handles.BW,'Visible',state)
74set(handles.Contours,'Visible',state)
75set(handles.min_title,'Visible',state)
76set(handles.max_title,'Visible',state)
77set(handles.frame_scal,'Visible',state)
78set(handles.npx,'Visible',state)
79set(handles.npy,'Visible',state)
80set(handles.npx_title,'Visible',state)
81set(handles.npy_title,'Visible',state)
82%set(handles.makemask,'Visible',state)
83
84%---------------------------------------------
85%prepare interface for vector display: state ='on' or 'off'
86function set_vect_display(handles,state)
87%------------------------------------------------------------------
88set(handles.frame_vect,'Visible',state)
89% set(handles.VECT_title,'Visible',state)
90set(handles.VecScale,'Visible',state)
91set(handles.AutoVec,'Visible',state)
92set(handles.HideFalse,'Visible',state)
93set(handles.HideWarning,'Visible',state)
94% if isfield(handles,'record')
95%     set(handles.record,'Visible',state)
96% end
97set(handles.colcode1,'Visible',state)
98set(handles.colcode2,'Visible',state)
99set(handles.min_vec,'Visible',state)
100set(handles.max_vec,'Visible',state)
101set(handles.scale_title,'Visible',state)
102set(handles.slider1,'Visible',state)
103set(handles.slider2,'Visible',state)
104set(handles.col_vec,'Visible',state)
105set(handles.Color_title,'Visible',state)
106set(handles.color_code,'Visible',state)
107set(handles.vec_col_bar,'Visible',state)
108% set(handles.record,'Visible',state)
109set(handles.AutoVecColor,'Visible',state)
110set(handles.decimate4,'Visible',state)
111set(handles.min_C_title,'Visible',state)
112set(handles.max_C_title,'Visible',state)
113if isfield(handles,'MenuEditVectors')
114    set(handles.MenuEditVectors,'Enable',state)
115end
Note: See TracBrowser for help on using the repository browser.