source: trunk/src/read_plot_param.m @ 198

Last change on this file since 198 was 191, checked in by sommeria, 14 years ago

introduce edit boxes to set axis limits. rationalisation of names FixScal?, FixLimits?....
introduce volume scan in calibration procedures

File size: 2.6 KB
Line 
1%'read_plot_param':  read plotting parameters from the interface uvmat
2%------------------------------------------
3% function PlotParam=read_plot_param(handles)
4%
5% OUTPUT:
6% PlotParam: structure containing the values of all the relevant plotting parameters
7%
8% INPUT:
9% handles: structure containing the handles of the relevant uicontrols in the uvmat interface
10%
11%      -- TODO:   get the handles using get_plot_handles and findobj as  default input --
12
13function PlotParam=read_plot_param(handles)
14
15PlotParam.FixEqual=get(handles.FixEqual,'Value');
16PlotParam.FixLimits=get(handles.FixLimits,'Value');
17if PlotParam.FixLimits
18PlotParam.MinX=str2double(get(handles.MinX,'String'));
19PlotParam.MaxX=str2double(get(handles.MaxX,'String'));
20PlotParam.MinY=str2double(get(handles.MinY,'String'));
21PlotParam.MaxY=str2double(get(handles.MaxY,'String'));
22end
23% scalars
24Scalar.MaxA=str2double(get(handles.MaxA,'String'));
25Scalar.MinA=str2double(get(handles.MinA,'String'));
26Scalar.FixScal=get(handles.FixScal,'Value');
27Scalar.BW=get(handles.BW,'Value');
28Scalar.Contours=get(handles.Contours,'Value')==2;
29Scalar.IncrA=str2double(get(handles.IncrA,'String'));
30PlotParam.Scalar=Scalar;
31
32%vectors
33Vectors.VecScale=str2double(get(handles.VecScale,'String'));
34Vectors.FixVec=get(handles.FixVec,'Value');%automatic vector length
35Vectors.HideFalse=get(handles.HideFalse,'Value');
36Vectors.HideWarning=get(handles.HideWarning,'Value');
37Vectors.decimate4=get(handles.decimate4,'Value');% =1; for reducing the nbre of vectors
38
39%vector color
40code_list=get(handles.color_code,'String');
41val=get(handles.color_code,'Value');
42% menu_col=get(handles.col_vec,'String');
43% menu_val=get(handles.col_vec,'Value');
44colcode1=str2double(get(handles.colcode1,'String'));% first threshold for rgb, first value for'continuous'
45colcode2=str2double(get(handles.colcode2,'String'));% second threshold for rgb, last value (saturation) for 'continuous'
46
47Vectors.ColorCode=code_list{val}; % option of color code for vectors
48Vectors.FixedCbounds=get(handles.AutoVecColor,'Value');% =1; fixed scale for color vector, =0 otherwise (default)
49Vectors.MinC=str2double(get(handles.min_vec,'String')); % imposed min of C, (needed if .FixedCbounds=1)
50Vectors.MaxC=str2double(get(handles.max_vec,'String')); % imposed max of C, needed if .FixedCbounds=1
51if Vectors.MaxC <= Vectors.MinC
52    Vectors.ColorCode='black';
53else
54    Vectors.colcode1=Vectors.MinC+(colcode1-Vectors.MinC)/(Vectors.MaxC-Vectors.MinC);% relative thresholds
55    Vectors.colcode2=Vectors.MinC+(colcode2-Vectors.MinC)/(Vectors.MaxC-Vectors.MinC);
56end
57PlotParam.Vectors=Vectors;
58
Note: See TracBrowser for help on using the repository browser.