Changeset 292 for trunk/src


Ignore:
Timestamp:
Nov 21, 2011, 11:12:06 AM (12 years ago)
Author:
sommeria
Message:

GUI civ patch2 corrected (SmoothingParam?).
uvmatand view_field updated with panels.
read_plot_param removed (replaced by the mostgeneral read_GUI)

Location:
trunk/src
Files:
2 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r289 r292  
    3636    'cell2tab';... %transform a Matlab cell in a character array suitable for display in a table
    3737    'check_field_structure';...% check the validity of the field struture representation consistant with the netcdf format
    38     'check_functions';...
     38    'check_files';...
    3939    'civ';...   %function associated with the interface 'civ.fig' for PIV and spline interpolation
    4040    'civ.fig';...
     
    7878    'read_civxdata';...reads civx data from netcdf files
    7979    'read_imatext';...%read .civ files (obsolete, but can be adapted to other text documentation files)
    80     'read_plot_param';... %read the plotting option parameters on the uvmat interface
     80    'read_GUI';... %read all parameters set by a GUI as a Matlab structure
    8181    'read_set_object';...%read the data on the set_object interface
    8282    'read_xls';...%read excel files containing the list of the experiments
  • trunk/src/civ.m

    r291 r292  
    2323%TODO: search range
    2424
    25 % Last Modified by GUIDE v2.5 19-Nov-2011 19:26:20
     25% Last Modified by GUIDE v2.5 21-Nov-2011 10:58:28
    2626% Begin initialization code - DO NOT EDIT
    2727gui_Singleton = 1;
     
    41664166end
    41674167% set(handles.frame_patch2,'BackgroundColor',[1 1 0])
    4168 % set(handles.num_SmoothParam,'Visible','on')
     4168% set(handles.num_SmoothingParam,'Visible','on')
    41694169% set(handles.num_SmoothingParam,'Visible','on')
    41704170% set(handles.num_MaxDiff,'Visible','on')
     
    41924192% return
    41934193% set(handles.frame_patch2,'BackgroundColor',[0.831 0.816 0.784])
    4194 % set(handles.num_SmoothParam,'Visible','off')
     4194% set(handles.num_SmoothingParam,'Visible','off')
    41954195% set(handles.num_SmoothingParam,'Visible','off')
    41964196% set(handles.num_MaxDiff,'Visible','off')
     
    48674867if isequal(get(handles.CheckStereo,'Value'),0)
    48684868    set(handles.num_SubdomainSize,'Visible','on')
    4869     set(handles.num_SmoothParam,'Visible','on')
     4869    set(handles.num_SmoothingParam,'Visible','on')
    48704870else
    48714871    set(handles.num_SubdomainSize,'Visible','off')
    4872     set(handles.num_SmoothParam,'Visible','off')
     4872    set(handles.num_SmoothingParam,'Visible','off')
    48734873end
    48744874
     
    53495349    cmd=[Param.xml.PatchBin...
    53505350        ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)...
    5351         ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothParam)...
     5351        ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)...
    53525352        ' -nopt ' num2str(Param.(patchname).SubdomainSize) ...
    53535353        '  > ' filename '.' lower(patchname) '.log 2>&1']; % redirect standard output to the log file
     
    53555355    cmd=['"' Param.xml.PatchBin...
    53565356        '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)...
    5357         ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothParam)...
     5357        ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)...
    53585358        ' -nopt ' num2str(Param.(patchname).SubdomainSize)...
    53595359        '  > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file
     
    54265426        'del "' filename '.cmx" \n'];
    54275427end
    5428 
  • trunk/src/mouse_down.m

    r252 r292  
    4040    set(hcurrentfig,'Units','normalized')
    4141hhcurrentfig=guidata(hcurrentfig);
    42 test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom action, first priority
     42test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom action, first priority
    4343test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler  action, second priority;
    4444test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority
     
    371371        Field.FF(ivec)=0;
    372372    end
    373     PlotParam=read_plot_param(hhcurrentfig);
     373    PlotParam=read_GUI(hcurrentfig);
    374374    plot_field(Field,haxes,PlotParam);
    375375    eval(['FigData.' tagaxes '=Field;'])%record the modified field in FigData
  • trunk/src/mouse_motion.m

    r251 r292  
    3636end
    3737hhcurrentfig=guidata(currentfig);
    38 test_zoom=get(hhcurrentfig.zoom,'Value');%test for zoom activated on the current figure
     38test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom activated on the current figure
    3939test_draw=0;%test for mouse drawing of object, =0 by default
    4040test_object=0; %test for object editing or creation
     
    279279    end
    280280end
    281 set(handles.text_display_1,'String',text_displ_1);
    282 set(handles.text_display_2,'String',text_displ_2);
    283 set(handles.text_display_3,'String',text_displ_3);
    284 set(handles.text_display_4,'String',text_displ_4);
     281if ~isempty(text_displ_1)
     282set(handles.text_display,'String',[{text_displ_1};{text_displ_2};{text_displ_3};{text_displ_4}])
     283else
     284   set(handles.text_display,'String',get(handles.text_display,'UserData'))
     285end
     286% set(handles.text_display_1,'String',text_displ_1);
     287% set(handles.text_display_2,'String',text_displ_2);
     288% set(handles.text_display_3,'String',text_displ_3);
     289% set(handles.text_display_4,'String',text_displ_4);
    285290
    286291%%%%%%%%%%%%%
  • trunk/src/mouse_up.m

    r252 r292  
    4343    testsubplot=0;
    4444end
    45 test_zoom=get(hhcurrentfig.zoom,'Value');
     45test_zoom=get(hhcurrentfig.CheckZoom,'Value');
    4646
    4747huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle
     
    164164                    hh_plotfield=hhuvmat;
    165165                end
    166                 [PlotType,PlotParam]=plot_field(ProjData,hh_plotfield.axes3,read_plot_param(hh_plotfield));%update an existing field plot
     166                %[PlotType,PlotParam]=plot_field(ProjData,hh_plotfield.axes3,read_plot_param(hh_plotfield));%update an existing field plot
     167                [PlotType,PlotParam]=plot_field(ProjData,hh_plotfield.axes3,read_GUI(hview_field));%update an existing field plot
    167168                write_plot_param(hh_plotfield,PlotParam); %update the display of plotting parameters for the current object
    168169            end
     
    272273         % desactivate the zoom if the full field is visible within the axes
    273274            if isequal(xlim,AxeData.RangeX) && isequal(ylim,AxeData.RangeY)
    274                 set(hhuvmat.zoom,'Value',0)
    275                 set(hhuvmat.zoom,'BackgroundColor',[0.7 0.7 0.7])
    276                 set(hhuvmat.FixLimits,'Value',0)
    277                 set(hhuvmat.FixLimits,'BackgroundColor',[0.7 0.7 0.7])
     275                set(hhuvmat.CheckZoom,'Value',0)
     276                set(hhuvmat.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
     277                set(hhuvmat.CheckFixLimits,'Value',0)
     278                set(hhuvmat.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])
    278279            end
    279280        end
     
    286287    end
    287288    if isfield(AxeData,'LimEditBox')&& AxeData.LimEditBox% update display of the GUI containing the axis (uvmat or view_field)
    288         set(hhcurrentfig.MinX,'String',num2str(xlim(1)))
    289         set(hhcurrentfig.MaxX,'String',num2str(xlim(2)))
    290         set(hhcurrentfig.MinY,'String',num2str(ylim(1)))
    291         set(hhcurrentfig.MaxY,'String',num2str(ylim(2)))
     289        set(hhcurrentfig.num_MinX,'String',num2str(xlim(1)))
     290        set(hhcurrentfig.num_MaxX,'String',num2str(xlim(2)))
     291        set(hhcurrentfig.num_MinY,'String',num2str(ylim(1)))
     292        set(hhcurrentfig.num_MaxY,'String',num2str(ylim(2)))
    292293    end
    293294end
  • trunk/src/plot_field.m

    r252 r292  
    44%  This function is used by uvmat to plot fields. It automatically chooses the representation
    55% appropriate to the input field structure:
    6 %     2D vector fields are represented by arrows, 2D scalar fiedlds by grey scale images or contour plots, 1D fields are represented by usual plot with (abscissa, ordinate).
     6%     2D vector fields are represented by arrows, 2D scalar fields by grey scale images or contour plots, 1D fields are represented by usual plot with (abscissa, ordinate).
    77%  The input field structure is first tested by check_field_structure.m,
    88%  then split into blocks of related variables  by find_field_indices.m.
    9 %  The dimensionality of each block is obtained  by this fuction
     9%  The dimensionality of each block is obtained  by this function
    1010%  considering the presence of variables with the attribute .Role='coord_x'
    1111%  and/or coord_y and/or coord_z (case of unstructured coordinates), or
     
    5252%   haxes: handle of the plotting axes to update with the new plot. If this input is absent or not a valid axes handle, a new figure is created.
    5353%
    54 %   PlotParam: parameters for plotting, as read on the uvmat interface (by function 'read_plot_param.m')
    55 %     .FixLimits:=0 (default) adjust axes limit to the X,Y data, =1: preserves the previous axes limits
    56 %     .FixEqual: =0 (default):automatic adjustment of the graph, keep 1 to 1 aspect ratio for x and y scales.
     54%   PlotParam: parameters for plotting, as read on the uvmat or view_field interface (by function 'read_GUI.m')
     55%     .Coordinates.CheckFixLimits:=0 (default) adjust axes limit to the X,Y data, =1: preserves the previous axes limits
     56%     .Coordinates.CheckFixEqual: =0 (default):automatic adjustment of the graph, keep 1 to 1 aspect ratio for x and y scales.
    5757%            --scalars--
    5858%    .Scalar.MaxA: upper bound (saturation color) for the scalar representation, max(field) by default
    5959%    .Scalar.MinA: lower bound (saturation) for the scalar representation, min(field) by default
    60 %    .Scalar.FixScal: =0 (default) lower and upper bounds of the scalar representation set to the min and max of the field
     60%    .Scalar.CheckFixScal: =0 (default) lower and upper bounds of the scalar representation set to the min and max of the field
    6161%               =1 lower and upper bound imposed by .AMax and .MinA
    62 %    .Scalar.BW= 1 black and white representation imposed, =0 by default.
    63 %    .Scalar.Contours= 1: represent scalars by contour plots (Matlab function 'contour'); =0 by default
     62%    .Scalar.CheckBW= 1 black and white representation imposed, =0 by default.
     63%    .Scalar.CheckContours= 1: represent scalars by contour plots (Matlab function 'contour'); =0 by default
    6464%    .IncrA : contour interval
    6565%            -- vectors--
    6666%    .Vectors.VecScale: scale for the vector representation
    67 %    .Vectors.FixVec: =0 (default) automatic length for vector representation, =1: length set by .VecScale
    68 %    .Vectors.HideFalse= 0 (default) false vectors represented in magenta, =1: false vectors not represented;
    69 %    .Vectors.HideWarning= 0 (default) vectors marked by warnflag~=0 marked in black, 1: no warning representation;
    70 %    .Vectors.decimate4 = 0 (default) all vectors reprtesented, =1: half of  the vectors represented along each coordinate
     67%    .Vectors.CheckFixVec: =0 (default) automatic length for vector representation, =1: length set by .VecScale
     68%    .Vectors.CheckHideFalse= 0 (default) false vectors represented in magenta, =1: false vectors not represented;
     69%    .Vectors.CheckHideWarning= 0 (default) vectors marked by warnflag~=0 marked in black, 1: no warning representation;
     70%    .Vectors.CheckDecimate4 = 0 (default) all vectors reprtesented, =1: half of  the vectors represented along each coordinate
    7171%         -- vector color--
    7272%    .Vectors.ColorCode= 'black','white': imposed color  (default ='blue')
     
    7777%    .Vectors.colcode1 : first threshold for rgb, first value for'continuous'
    7878%    .Vectors.colcode2 : second threshold for rgb, last value (saturation) for 'continuous'
    79 %    .Vectors.FixedCbounds;  =0 (default): the bounds on C representation are min and max, =1: they are fixed by .Minc and .MaxC
     79%    .Vectors.CheckFixedCbounds;  =0 (default): the bounds on C representation are min and max, =1: they are fixed by .Minc and .MaxC
    8080%    .Vectors.MinC = imposed minimum of the scalar field used for vector color;
    8181%    .Vectors.MaxC = imposed maximum of the scalar field used for vector color;
    8282%
    83 %
    8483% PosColorbar: if not empty, display a colorbar for B&W images
    8584%               imposed position of the colorbar (ex [0.821 0.471 0.019 0.445])
     
    102101
    103102function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,PosColorbar)
    104 % TODO:
    105103% use htext: handles of the text edit box (uicontrol)
    106104% introduce PlotParam.Hold: 'on' or 'off' (for curves)
     
    111109PlotType='text'; %default
    112110PlotParamOut=PlotParam;%default
     111Coordinates=[];
     112if isfield(PlotParam,'Coordinates')
     113Coordinates=PlotParam.Coordinates;
     114end
    113115
    114116%% test axes and figure
     
    175177   
    176178        %% set axes properties
    177     if isfield(PlotParam,'FixLimits') && isequal(PlotParam.FixLimits,1)  %adjust the graph limits*
     179    if isfield(Coordinates,'CheckFixLimits') && isequal(Coordinates.CheckFixLimits,1)  %adjust the graph limits*
    178180        set(haxes,'XLimMode', 'manual')
    179181        set(haxes,'YLimMode', 'manual')
     
    182184        set(haxes,'YLimMode', 'auto')
    183185    end
    184     if ~isfield(PlotParam,'FixEqual')&& isfield(Data,'CoordUnit')
    185         PlotParam.FixEqual=1;
    186     end
    187     if isfield(PlotParam,'FixEqual') && isequal(PlotParam.FixEqual,1)
     186    if ~isfield(Coordinates,'CheckFixEqual')&& isfield(Data,'CoordUnit')
     187        Coordinates.CheckFixEqual=1;
     188    end
     189    if isfield(Coordinates,'CheckFixEqual') && isequal(Coordinates.CheckFixEqual,1)
    188190        set(haxes,'DataAspectRatioMode','manual')
    189191       set(haxes,'DataAspectRatio',[1 1 1])
     
    222224     plot_profile([],[],[],haxes);%
    223225else
    224         PlotParamOut=plot_profile(Data,CellVarIndex(index_1D),VarType(index_1D),haxes,PlotParam);%
     226        Coordinates=plot_profile(Data,CellVarIndex(index_1D),VarType(index_1D),haxes,PlotParam.Coordinates);%
    225227        if testzoomaxes
    226             [zoomaxes,PlotParamOut]=plot_profile(Data,CellVarIndex(index_1D),VarType(index_1D),zoomaxes,PlotParam);
     228            [zoomaxes,Coordinates]=plot_profile(Data,CellVarIndex(index_1D),VarType(index_1D),zoomaxes,PlotParam.Coordinates);
    227229            AxeData.ZoomAxes=zoomaxes;
     230        end
     231        if ~isempty(Coordinates)
     232            PlotParamOut.Coordinates=Coordinates;
    228233        end
    229234        PlotType='line';
     
    242247end
    243248if isfield(PlotParamOut,'MinX')
    244 %     'TESTplot'
    245 %     haxes
    246 %     PlotParamOut.MinX
    247 %     PlotParamOut.MaxY
    248 %     set(haxes,'XLim',[PlotParamOut.MinX PlotParamOut.MaxX])
    249 %     set(haxes,'YLim',[PlotParamOut.MinY PlotParamOut.MaxY])
    250249    AxeData.RangeX=[PlotParamOut.MinX PlotParamOut.MaxX];%'[PlotParamOut.MinX PlotParamOut.MaxX];
    251250    AxeData.RangeY=[PlotParamOut.MinY PlotParamOut.MaxY];%[PlotParamOut.MinY PlotParamOut.MaxY]
     
    262261    set(hfig,'UserData',FigData)
    263262end
    264              
     263
    265264%-------------------------------------------------------------------
    266265function errormsg=plot_text(FieldData,CellVarIndex,htext)
    267266%-------------------------------------------------------------------
    268 % if exist('hdisplay_in','var') && ~isempty(hdisplay_in) && ishandle(hdisplay_in) && isequal(get(hdisplay_in,'Type'),'uicontrol')
    269 %     hdisplay=hdisplay_in;
    270 % else
    271 %     figure;%create new figure
    272 %     hdisplay=uicontrol('Style','edit', 'Units','normalized','Position', [0 0 1 1],'Max',2,'FontName','monospaced');
    273 % end
    274267errormsg=[];
    275268txt_cell={};
    276269for icell=1:length(CellVarIndex)
    277270    VarIndex=CellVarIndex{icell};%  indices of the selected variables in the list data.ListVarName
    278 % ff=fields(FieldData);%list of field names
    279 % vv=struct2cell(FieldData);%list of field values
    280 %
    281 % for icell=1:length(vv)
    282271    for ivar=1:length(VarIndex)
    283272         VarName=FieldData.ListVarName{VarIndex(ivar)};
    284          eval(['VarValue=FieldData.' VarName ';'])
     273         VarValue=FieldData.(VarName);
    285274         if size(VarValue,1)~=1
    286275             VarValue=VarValue';
     
    290279    end
    291280end
    292 
    293281set(htext,'String',txt_cell)
    294 %     txt_cell=[txt_cell {num2str(
    295 %     Tabcell{icell,1}=ff{icell};
    296 %     ss=vv{icell};
    297 %     sizss=size(ss);
    298 %     if isnumeric(ss)
    299 %         if sizss(1)<=1 && length(ss)<5
    300 %             displ{icell}=num2str(ss);
    301 %         else
    302 %             displ{icell}=[class(ss) ', size ' num2str(size(ss))];
    303 %         end
    304 %     elseif ischar(ss)
    305 %         displ{icell}=ss;
    306 %     elseif iscell(ss)
    307 %         sizcell=size(ss);
    308 %         if sizcell(1)==1 && length(sizcell)==2 %line cell
    309 %            ssline='{''';
    310 %            for icolumn=1:sizcell(2)
    311 %                if isnumeric(ss{icolumn})
    312 %                    if size(ss{icolumn},1)<=1 && length(ss{icolumn})<5
    313 %                       sscolumn=num2str(ss{icolumn});%line vector
    314 %                    else
    315 %                       sscolumn=[class(ss{icolumn}) ', size ' num2str(size(ss{icolumn}))];
    316 %                    end
    317 %                elseif ischar(ss{icolumn})
    318 %                    sscolumn=ss{icolumn};
    319 %                else
    320 %                    sscolumn=class(ss{icolumn});
    321 %                end
    322 %                if icolumn==1
    323 %                    ssline=[ssline sscolumn];
    324 %                else
    325 %                    ssline=[ssline ''',''' sscolumn];
    326 %                end
    327 %            end
    328 %            displ{icell}=[ssline '''}'];
    329 %         else
    330 %            displ{icell}=[class(ss) ', size ' num2str(sizcell)];
    331 %         end
    332 %     else
    333 %         displ{icell}=class(ss);
    334 %     end
    335 %     Tabcell{icell,2}=displ{icell};
    336 % end
    337 % Tabchar=cell2tab(Tabcell,': ');
    338 % set(hdisplay,'String', Tabchar)
    339 
     282set(htext,'UserData',txt_cell)% for storage during mouse display
    340283
    341284%-------------------------------------------------------------------
    342 function PlotParamOut=plot_profile(data,CellVarIndex,VarType,haxes,PlotParam)
     285function CoordinatesOut=plot_profile(data,CellVarIndex,VarType,haxes,Coordinates)
    343286%-------------------------------------------------------------------
    344287
    345 if ~exist('PlotParam','var')
    346     PlotParam=[];
    347 end
    348 PlotParamOut=PlotParam; %default
     288if ~exist('Coordinates','var')
     289    Coordinates=[];
     290end
     291CoordinatesOut=Coordinates; %default
    349292hfig=get(haxes,'parent');
    350293%suppress existing plot isf empty data
     
    361304end
    362305
    363 
    364306ColorOrder=[1 0 0;0 0.5 0;0 0 1;0 0.75 0.75;0.75 0 0.75;0.75 0.75 0;0.25 0.25 0.25];
    365307set(haxes,'ColorOrder',ColorOrder)
    366 if isfield(PlotParam,'NextPlot')
    367     set(haxes,'NextPlot',PlotParam.NextPlot)
     308if isfield(Coordinates,'NextPlot')
     309    set(haxes,'NextPlot',Coordinates.NextPlot)
    368310end
    369311% adjust the size of the plot to include the whole field,
     
    372314
    373315%% prepare the string for plot command
    374 %initiate  the plot command
    375316plotstr='hhh=plot(';
    376 % textmean={};
    377317coord_x_index=[];
    378318xtitle='';
     
    513453
    514454%% determine axes bounds
    515 PlotParamOut.RangeX=[min(XMin) max(XMax)];
    516 PlotParamOut.RangeY=[min(YMin_cell) max(YMax_cell)];
    517 fix_lim=isfield(PlotParam,'FixLimits') && PlotParam.FixLimits;
     455CoordinatesOut.RangeX=[min(XMin) max(XMax)];
     456CoordinatesOut.RangeY=[min(YMin_cell) max(YMax_cell)];
     457fix_lim=isfield(Coordinates,'FixLimits') && Coordinates.FixLimits;
    518458if fix_lim
    519     if ~isfield(PlotParam,'MinX')||~isfield(PlotParam,'MaxX')||~isfield(PlotParam,'MinY')||~isfield(PlotParam,'MaxY')
     459    if ~isfield(Coordinates,'MinX')||~isfield(Coordinates,'MaxX')||~isfield(Coordinates,'MinY')||~isfield(Coordinates,'MaxY')
    520460        fix_lim=0; %free limits if lits are not set,
    521461    end
    522462end
    523463if ~fix_lim
    524     PlotParamOut.MinX=min(XMin);
    525     PlotParamOut.MaxX=max(XMax);
    526     PlotParamOut.MinY=min(YMin_cell);
    527     PlotParamOut.MaxY=max(YMax_cell);
     464    CoordinatesOut.MinX=min(XMin);
     465    CoordinatesOut.MaxX=max(XMax);
     466    CoordinatesOut.MinY=min(YMin_cell);
     467    CoordinatesOut.MaxY=max(YMax_cell);
    528468end
    529469
     
    719659%%   image or scalar plot %%%%%%%%%%%%%%%%%%%%%%%%%%
    720660
    721 if ~isfield(PlotParam.Scalar,'Contours')
     661if ~isfield(PlotParam.Scalar,'CheckContours')
    722662    PlotParam.Scalar.Contours=0; %default
    723663end
  • trunk/src/read_GUI.m

    r287 r292  
    4343                end
    4444                if check_input
    45                     ['struct.' tag '=input;']
    46                     eval(['struct.' tag '=input;'])
     45                    struct.(tag)=input;
     46                  %  eval(['struct.' tag '=input;'])
    4747                end
    4848        end
  • trunk/src/set_object.m

    r252 r292  
    759759    return
    760760end
    761 PlotParam=read_plot_param(PlotHandles);
     761%PlotParam=read_plot_param(PlotHandles);
     762fighandle=get(plotaxes,'parent');
     763PlotParam=read_GUI(fighandle);
    762764[PlotType,Object_out{IndexObj}.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotParam);%update an existing field plot
    763765
  • trunk/src/uvmat.m

    r278 r292  
    147147%                     = translate: translate an existing object
    148148%                    = calibration: move a calibration point
    149 %                    = zoom: isolate a subregion for zoom in=1 if an object is being currently drawn, 0 else (set to 0 by releasing mouse button)
     149%                    = CheckZoom: isolate a subregion for CheckZoom in=1 if an object is being currently drawn, 0 else (set to 0 by releasing mouse button)
    150150%            .CurrentOrigin: Origin of a curently drawn edit_object
    151151%            .CurrentLine: currently drawn menuline (A REVOIR)
    152152%            .CurrentObject: handle of the currently drawn edit_object
    153 %            .CurrentRectZoom: current rectangle used for zoom
     153%            .CurrentRectZoom: current rectangle used for CheckZoom
    154154
    155155% Properties attached to projection objects (create, menuline, menuplane...):
     
    714714if isfield(imainfo,'Width') && isfield(imainfo,'Height')
    715715    if length(imainfo)>1
    716         set(handles.npx,'String',num2str(imainfo(1).Width));%fills nbre of pixels x box
    717         set(handles.npy,'String',num2str(imainfo(1).Height));%fills nbre of pixels x box
     716        set(handles.num_Npx,'String',num2str(imainfo(1).Width));%fills nbre of pixels x box
     717        set(handles.num_Npy,'String',num2str(imainfo(1).Height));%fills nbre of pixels x box
    718718    else
    719         set(handles.npx,'String',num2str(imainfo.Width));%fills nbre of pixels x box
    720         set(handles.npy,'String',num2str(imainfo.Height));%fills nbre of pixels x box
    721     end
    722 else
    723     set(handles.npx,'String','');%fills nbre of pixels x box
    724     set(handles.npy,'String','');%fills nbre of pixels x box
    725 end
    726 set(handles.BW,'Value',strcmp(ColorType,'grayscale'))% select handles.BW if grayscale image
     719        set(handles.num_Npx,'String',num2str(imainfo.Width));%fills nbre of pixels x box
     720        set(handles.num_Npy,'String',num2str(imainfo.Height));%fills nbre of pixels x box
     721    end
     722else
     723    set(handles.num_Npx,'String','');%fills nbre of pixels x box
     724    set(handles.num_Npy,'String','');%fills nbre of pixels x box
     725end
     726set(handles.CheckBW,'Value',strcmp(ColorType,'grayscale'))% select handles.CheckBW if grayscale image
    727727
    728728% read parameters (time, geometric calibration..) from a documentation file (.xml advised)
     
    783783    elseif error==1, warntext='inconsistent number of fields in the .civ file';
    784784    end 
    785     set(handles.npx,'String',num2str(npx));%fills nbre of pixels x box
    786     set(handles.npy,'String',num2str(npy));%fills nbre of pixels y box
     785    set(handles.num_Npx,'String',num2str(npx));%fills nbre of pixels x box
     786    set(handles.num_Npy,'String',num2str(npy));%fills nbre of pixels y box
    787787    set(handles.pxcm,'String',num2str(pxcmx));%fills scale x (pixel/cm) box
    788788    set(handles.pycm,'String',num2str(pxcmy));%fills scale y (pixel/cm) box
     
    842842            set(handles.pycm,'String',num2str(pixcmy))
    843843        end
    844         if ~get(handles.FixLimits,'Value')
     844        if ~get(handles.CheckFixLimits,'Value')
    845845            set(handles.transform_fct,'Value',2); % phys transform by default if fixedLimits is off
    846846        end
     
    900900            col_vec={'get_field...'};
    901901        end
    902         set(handles.col_vec,'String',col_vec)
     902        set(handles.ListColorScalar,'String',col_vec)
    903903    end
    904904end
     
    12461246end
    12471247if ~isempty(imainfo)% (an image has been introduced as second fierld input)
    1248     if strcmp(get(handles.npx,'String'),'') || strcmp(get(handles.npy,'String'),'')%update npx and npy if it is not already filled by the first input field
     1248    if strcmp(get(handles.num_Npx,'String'),'') || strcmp(get(handles.num_Npy,'String'),'')%update npx and npy if it is not already filled by the first input field
    12491249        if  isfield(imainfo,'Width') && isfield(imainfo,'Height')
    1250             set(handles.npx,'String',num2str(imainfo.Width));%fills nbre of pixels x box
    1251             set(handles.npy,'String',num2str(imainfo.Height));%fills nbre of pixels x box
     1250            set(handles.num_Npx,'String',num2str(imainfo.Width));%fills nbre of pixels x box
     1251            set(handles.num_Npy,'String',num2str(imainfo.Height));%fills nbre of pixels x box
    12521252        else
    1253             set(handles.npx,'String','');%fills nbre of pixels x box
    1254             set(handles.npy,'String','');%fills nbre of pixels x box
    1255         end
    1256         set(handles.BW,'Value',strcmp(ColorType,'grayscale'))% select handles.BW if grayscale image
     1253            set(handles.num_Npx,'String','');%fills nbre of pixels x box
     1254            set(handles.num_Npy,'String','');%fills nbre of pixels x box
     1255        end
     1256        set(handles.CheckBW,'Value',strcmp(ColorType,'grayscale'))% select handles.CheckBW if grayscale image
    12571257    end
    12581258end
     
    12901290    end
    12911291   
    1292     set(handles.npx,'String',num2str(npx));%fills nbre of pixels x box
    1293     set(handles.npy,'String',num2str(npy));%fills nbre of pixels y box
     1292    set(handles.num_Npx,'String',num2str(npx));%fills nbre of pixels x box
     1293    set(handles.num_Npy,'String',num2str(npy));%fills nbre of pixels y box
    12941294    set(handles.pxcm,'String',num2str(pxcmx));%fills scale x (pixel/cm) box
    12951295    set(handles.pycm,'String',num2str(pxcmy));%fills scale y (pixel/cm) box
     
    16831683function runplus_Callback(hObject, eventdata, handles)
    16841684%-------------------------------------------------------------------
    1685 eventdata
    16861685set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow
    16871686drawnow
     
    21152114        end
    21162115        if strcmp(FieldName,'velocity')
    2117             list_code=get(handles.color_code,'String');% list menu fields
    2118             index_code=get(handles.color_code,'Value');% selected string index
     2116            list_code=get(handles.ListColorCode,'String');% list menu fields
     2117            index_code=get(handles.ListColorCode,'Value');% selected string index
    21192118            if  ~strcmp(list_code{index_code},'black') &&  ~strcmp(list_code{index_code},'white')
    2120                 list_code=get(handles.col_vec,'String');% list menu fields
    2121                 index_code=get(handles.col_vec,'Value');% selected string index
     2119                list_code=get(handles.ListColorScalar,'String');% list menu fields
     2120                index_code=get(handles.ListColorScalar,'Value');% selected string index
    21222121                ParamIn.ColorVar= list_code{index_code}; % selected field
    21232122            end
     
    21562155    end       
    21572156    if isfield(ParamOut,'Npx')&& isfield(ParamOut,'Npy')
    2158         set(handles.npx,'String',num2str(ParamOut.Npx));% display image size on the interface
    2159         set(handles.npy,'String',num2str(ParamOut.Npy));
     2157        set(handles.num_Npx,'String',num2str(ParamOut.Npx));% display image size on the interface
     2158        set(handles.num_Npy,'String',num2str(ParamOut.Npy));
    21602159    end
    21612160    if isfield(ParamOut,'TimeIndex')
     
    22352234            end
    22362235            if strcmp(FieldName_1,'velocity')
    2237                 list_code=get(handles.color_code,'String');% list menu fields
    2238                 index_code=get(handles.color_code,'Value');% selected string index
     2236                list_code=get(handles.ListColorCode,'String');% list menu fields
     2237                index_code=get(handles.ListColorCode,'Value');% selected string index
    22392238                if  ~strcmp(list_code{index_code},'black') &&  ~strcmp(list_code{index_code},'white')
    2240                     list_code=get(handles.col_vec,'String');% list menu fields
    2241                     index_code=get(handles.col_vec,'Value');% selected string index
     2239                    list_code=get(handles.ListColorScalar,'String');% list menu fields
     2240                    index_code=get(handles.ListColorScalar,'Value');% selected string index
    22422241                    ParamIn.ColorVar= list_code{index_code}; % selected field
    22432242                end
     
    22682267%% update uvmat interface
    22692268if isfield(ParamOut,'Npx')
    2270     set(handles.npx,'String',num2str(ParamOut.Npx));% display image size on the interface
    2271     set(handles.npy,'String',num2str(ParamOut.Npy));
     2269    set(handles.num_Npx,'String',num2str(ParamOut.Npx));% display image size on the interface
     2270    set(handles.num_Npy,'String',num2str(ParamOut.Npy));
    22722271elseif isfield(ParamOut_1,'Npx')
    2273     set(handles.npx,'String',num2str(ParamOut_1.Npx));% display image size on the interface
    2274     set(handles.npy,'String',num2str(ParamOut_1.Npy));
     2272    set(handles.num_Npx,'String',num2str(ParamOut_1.Npx));% display image size on the interface
     2273    set(handles.num_Npy,'String',num2str(ParamOut_1.Npy));
    22752274end
    22762275
     
    25812580    UvData.Object{1}.DisplayHandle_uvmat=[]; %plane not visible in uvmat
    25822581    set(handles.list_object_1,'Value',1);
    2583     list_object=get(handles.list_object_1,'String')
     2582    list_object=get(handles.list_object_1,'String');
    25842583    if isempty(list_object)
    25852584        list_object={''};
     
    25992598%% reset the min and max of scalar if only the mask is displayed(TODO: check the need)
    26002599if isfield(UvData,'Mask')&& ~isfield(UvData,'A')
    2601     set(handles.MinA,'String','0')
    2602     set(handles.MaxA,'String','255')
     2600    set(handles.num_MinA,'String','0')
     2601    set(handles.num_MaxA,'String','255')
    26032602end
    26042603
     
    26252624    haxes(1)=handles.axes3;
    26262625end
    2627 PlotParam{1}=read_plot_param(handles);%read plotting parameters on the uvmat interfac
    2628 keeplim(1)=get(handles.FixLimits,'Value');% test for fixed graph limits
     2626%PlotParam{1}=read_plot_param(handles);%read plotting parameters on the uvmat interfac
     2627PlotParam{1}=read_GUI(handles.uvmat);
     2628keeplim(1)=get(handles.CheckFixLimits,'Value');% test for fixed graph limits
    26292629PosColorbar{1}=UvData.OpenParam.PosColorbar;%prescribe the colorbar position on the uvmat interface
    26302630
     
    26402640        plot_handles{2}=guidata(view_field_handle);
    26412641        haxes(2)=plot_handles{2}.axes3;
    2642         PlotParam{2}=read_plot_param(plot_handles{2});%read plotting parameters on the uvmat interface
    2643         keeplim(2)=get(plot_handles{2}.FixLimits,'Value');
     2642        %PlotParam{2}=read_plot_param(plot_handles{2});%read plotting parameters on the viewinterface
     2643        PlotParam{2}=read_GUI(handles.uvmat);%read plotting parameters on the uvmat interface
     2644        keeplim(2)=get(plot_handles{2}.CheckFixLimits,'Value');
    26442645        PosColorbar{2}='*'; %TODO: deal with colorbar position on view_field
    26452646    end
     
    26502651    iobj=IndexObj(imap);
    26512652    [ObjectData,errormsg]=proj_field(UvData.Field,UvData.Object{iobj});% project field on the object
    2652     if testnewseries && isfield(ObjectData,'CoordUnit')
    2653         PlotParam{imap}=rmfield(PlotParam{imap},'FixEqual'); %set FixEqual to depend on the field (=1 if Data.CoordUnit=1 in plot_field)
     2653    if testnewseries && isfield(ObjectData,'CoordUnit')&& isfield(PlotParam{imap},'Coordinates')
     2654        PlotParam{imap}=rmfield(PlotParam{imap}.Coordinates,'CheckFixEqual'); %set FixEqual to depend on the field (=1 if Data.CoordUnit=1 in plot_field)
    26542655    end
    26552656    if ~isempty(errormsg)
     
    28722873
    28732874%-------------------------------------------------------------------
    2874 % --- Executes on button press in 'FixLimits'.
    2875 %-------------------------------------------------------------------
    2876 function FixLimits_Callback(hObject, eventdata, handles)
    2877 test=get(handles.FixLimits,'Value');
     2875% --- Executes on button press in 'CheckFixLimits'.
     2876%-------------------------------------------------------------------
     2877function CheckFixLimits_Callback(hObject, eventdata, handles)
     2878test=get(handles.CheckFixLimits,'Value');
    28782879if test
    2879     set(handles.FixLimits,'BackgroundColor',[1 1 0])
    2880 else
    2881     set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7])
     2880    set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     2881else
     2882    set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])
    28822883    update_plot(handles);
    28832884end
    28842885
    28852886%-------------------------------------------------------------------
    2886 % --- Executes on button press in FixEqual.
    2887 function FixEqual_Callback(hObject, eventdata, handles)
    2888 test=get(handles.FixEqual,'Value');
     2887% --- Executes on button press in CheckFixEqual.
     2888function CheckFixEqual_Callback(hObject, eventdata, handles)
     2889test=get(handles.CheckFixEqual,'Value');
    28892890if test
    2890     set(handles.FixEqual,'BackgroundColor',[1 1 0])
     2891    set(handles.CheckFixEqual,'BackgroundColor',[1 1 0])
    28912892    cla(handles.axes3)
    28922893    update_plot(handles);
    28932894else
    2894     set(handles.FixEqual,'BackgroundColor',[0.7 0.7 0.7])
     2895    set(handles.CheckFixEqual,'BackgroundColor',[0.7 0.7 0.7])
    28952896    update_plot(handles);
    28962897%     axis(handles.axes3,'image')
     
    29012902
    29022903%-------------------------------------------------------------------
    2903 % --- Executes on button press in 'zoom'.
    2904 %-------------------------------------------------------------------
    2905 function zoom_Callback(hObject, eventdata, handles)
    2906 
    2907 if (get(handles.zoom,'Value') == 1);
    2908     set(handles.zoom,'BackgroundColor',[1 1 0])
    2909     set(handles.FixLimits,'Value',1)% propose by default fixed limits for the plotting axes
    2910     set(handles.FixLimits,'BackgroundColor',[1 1 0])
    2911 else
    2912     set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     2904% --- Executes on button press in 'CheckZoom'.
     2905%-------------------------------------------------------------------
     2906function CheckZoom_Callback(hObject, eventdata, handles)
     2907
     2908if (get(handles.CheckZoom,'Value') == 1);
     2909    set(handles.CheckZoom,'BackgroundColor',[1 1 0])
     2910    set(handles.CheckFixLimits,'Value',1)% propose by default fixed limits for the plotting axes
     2911    set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
     2912else
     2913    set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
    29132914end
    29142915
     
    32583259%common to Fields_1_Callback
    32593260if isequal(field,'image')||isequal(field_1,'image')
    3260     set(handles.npx_title,'Visible','on')% visible npx,pxcm... buttons
    3261     set(handles.npy_title,'Visible','on')
    3262     set(handles.npx,'Visible','on')
    3263     set(handles.npy,'Visible','on')
    3264 else
    3265     set(handles.npx_title,'Visible','off')% visible npx,pxcm... buttons
    3266     set(handles.npy_title,'Visible','off')
    3267     set(handles.npx,'Visible','off')
    3268     set(handles.npy,'Visible','off')
     3261    set(handles.TitleNpx,'Visible','on')% visible npx,pxcm... buttons
     3262    set(handles.TitleNpy,'Visible','on')
     3263    set(handles.num_Npx,'Visible','on')
     3264    set(handles.num_Npy,'Visible','on')
     3265else
     3266    set(handles.TitleNpx,'Visible','off')% visible npx,pxcm... buttons
     3267    set(handles.TitleNpy,'Visible','off')
     3268    set(handles.num_Npx,'Visible','off')
     3269    set(handles.num_Npy,'Visible','off')
    32693270end
    32703271setfield(handles);% update the field structure ('civ1'....)
     
    34463447%common to Fields_Callback
    34473448if isequal(field,'image')||isequal(field_1,'image')
    3448     set(handles.npx_title,'Visible','on')% visible npx,pxcm... buttons
    3449     set(handles.npy_title,'Visible','on')
    3450     set(handles.npx,'Visible','on')
    3451     set(handles.npy,'Visible','on')
     3449    set(handles.TitleNpx,'Visible','on')% visible npx,pxcm... buttons
     3450    set(handles.TitleNpy,'Visible','on')
     3451    set(handles.num_Npx,'Visible','on')
     3452    set(handles.num_Npy,'Visible','on')
    34523453%     set(handles.fix_pair,'Value',0)
    34533454else
    3454     set(handles.npx_title,'Visible','off')% visible npx,pxcm... buttons
    3455     set(handles.npy_title,'Visible','off')
    3456     set(handles.npx,'Visible','off')
    3457     set(handles.npy,'Visible','off')
     3455    set(handles.TitleNpx,'Visible','off')% visible npx,pxcm... buttons
     3456    set(handles.TitleNpy,'Visible','off')
     3457    set(handles.num_Npx,'Visible','off')
     3458    set(handles.num_Npy,'Visible','off')
    34583459%     set(handles.fix_pair,'Value',1)
    34593460end
     
    35743575UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface
    35753576if isequal(get(handles.VOLUME,'Value'),1)
    3576     set(handles.zoom,'Value',0)
    3577     set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     3577    set(handles.CheckZoom,'Value',0)
     3578    set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
    35783579    set(handles.edit_vect,'Value',0)
    35793580    edit_vect_Callback(hObject, eventdata, handles)
     
    36333634    set(handles.edit_vect,'BackgroundColor',[1 1 0])
    36343635    set(handles.edit_object,'Value',0)
    3635     set(handles.zoom,'Value',0)
    3636     set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     3636    set(handles.CheckZoom,'Value',0)
     3637    set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
    36373638%     set(handles.create,'Value',0)
    36383639%     set(handles.create,'BackgroundColor',[0 1 0])
     
    37413742
    37423743%------------------------------------------------------------------
    3743 % --- Executes on selection change in col_vec: choice of the color code.
     3744% --- Executes on selection change in ListColorScalar: choice of the color code.
    37443745%
    3745 function col_vec_Callback(hObject, eventdata, handles)
     3746function ListColorScalar_Callback(hObject, eventdata, handles)
    37463747%------------------------------------------------------------------
    37473748% edit the choice for color code
    3748 list_code=get(handles.col_vec,'String');% list menu fields
    3749 index_code=get(handles.col_vec,'Value');% selected string index
     3749list_code=get(handles.ListColorScalar,'String');% list menu fields
     3750index_code=get(handles.ListColorScalar,'Value');% selected string index
    37503751col_code= list_code{index_code(1)}; % selected field
    37513752if isequal(col_code,'black') || isequal(col_code,'white')
    3752    set(handles.slider1,'Visible','off')
    3753    set(handles.slider2,'Visible','off')
    3754    set(handles.colcode1,'Visible','off')
    3755    set(handles.colcode2,'Visible','off')
    3756    set(handles.AutoVecColor,'Visible','off')
     3753   set(handles.Slider1,'Visible','off')
     3754   set(handles.Slider2,'Visible','off')
     3755   set(handles.num_ColCode1,'Visible','off')
     3756   set(handles.num_ColCode2,'Visible','off')
     3757   set(handles.CheckFixVecColor,'Visible','off')
    37573758   set_vec_col_bar(handles)
    37583759else
    3759    set(handles.slider1,'Visible','on')
    3760    set(handles.slider2,'Visible','on')
    3761    set(handles.colcode1,'Visible','on')
    3762    set(handles.colcode2,'Visible','on')
    3763    set(handles.AutoVecColor,'Visible','on') 
     3760   set(handles.Slider1,'Visible','on')
     3761   set(handles.Slider2,'Visible','on')
     3762   set(handles.num_ColCode1,'Visible','on')
     3763   set(handles.num_ColCode2,'Visible','on')
     3764   set(handles.CheckFixVecColor,'Visible','on') 
    37643765   if isequal(col_code,'ima_cor')
    3765        set(handles.AutoVecColor,'Value',0)%fixed scale by default
    3766        set(handles.vec_col_bar,'Value',0)% 3 colors r,g,b by default
    3767        set(handles.slider1,'Min',0);
    3768        set(handles.slider1,'Max',1);
    3769        set(handles.slider2,'Min',0);
    3770        set(handles.slider2,'Max',1);
     3766       set(handles.CheckFixVecColor,'Value',0)%fixed scale by default
     3767       set(handles.VecColBar,'Value',0)% 3 colors r,g,b by default
     3768       set(handles.Slider1,'Min',0);
     3769       set(handles.Slider1,'Max',1);
     3770       set(handles.Slider2,'Min',0);
     3771       set(handles.Slider2,'Max',1);
    37713772 %      set(handles.min_title_vec,'String','0')
    3772        set(handles.max_vec,'String','1')
    3773        set(handles.colcode1,'String','0.333')
     3773       set(handles.num_MaxVec,'String','1')
     3774       set(handles.num_ColCode1,'String','0.333')
    37743775       colcode1_Callback(hObject, eventdata, handles)
    3775        set(handles.colcode2,'String','0.666')
     3776       set(handles.num_ColCode2,'String','0.666')
    37763777       colcode2_Callback(hObject, eventdata, handles)
    37773778   else
    3778        set(handles.AutoVecColor,'Value',1)%auto scale between min,max by default
    3779        set(handles.vec_col_bar,'Value',1)% colormap 'jet' by default
    3780        minval=get(handles.slider1,'Min');
    3781        maxval=get(handles.slider1,'Max');
    3782        set(handles.slider1,'Value',minval)
    3783        set(handles.slider2,'Value',maxval)
     3779       set(handles.CheckFixVecColor,'Value',1)%auto scale between min,max by default
     3780       set(handles.VecColBar,'Value',1)% colormap 'jet' by default
     3781       minval=get(handles.Slider1,'Min');
     3782       maxval=get(handles.Slider1,'Max');
     3783       set(handles.Slider1,'Value',minval)
     3784       set(handles.Slider2,'Value',maxval)
    37843785       set_vec_col_bar(handles)
    37853786   end
     
    37933794% -- Executes on slider movement to set the color code
    37943795%
    3795 function slider1_Callback(hObject, eventdata, handles)
     3796function Slider1_Callback(hObject, eventdata, handles)
    37963797%------------------------------------------------------------------
    3797 slider1=get(handles.slider1,'Value');
    3798 min_val=str2num(get(handles.min_vec,'String'));
    3799 max_val=str2num(get(handles.max_vec,'String'));
     3798slider1=get(handles.Slider1,'Value');
     3799min_val=str2num(get(handles.num_MinVec,'String'));
     3800max_val=str2num(get(handles.num_MaxVec,'String'));
    38003801col=min_val+(max_val-min_val)*slider1;
    3801 set(handles.colcode1,'String',num2str(col))
    3802 if(get(handles.slider2,'Value') < col)%move also the second slider at the same value if needed
    3803     set(handles.slider2,'Value',col)
    3804     set(handles.colcode2,'String',num2str(col))
     3802set(handles.num_ColCode1,'String',num2str(col))
     3803if(get(handles.Slider2,'Value') < col)%move also the second slider at the same value if needed
     3804    set(handles.Slider2,'Value',col)
     3805    set(handles.num_ColCode2,'String',num2str(col))
    38053806end
    38063807colcode1_Callback(hObject, eventdata, handles)
     
    38093810% Executes on slider movement to set the color code
    38103811%----------------------------------------------------------------
    3811 function slider2_Callback(hObject, eventdata, handles)
    3812 slider2=get(handles.slider2,'Value');
    3813 min_val=str2num(get(handles.min_vec,'String'));
    3814 max_val=str2num(get(handles.max_vec,'String'));
     3812function Slider2_Callback(hObject, eventdata, handles)
     3813slider2=get(handles.Slider2,'Value');
     3814min_val=str2num(get(handles.num_MinVec,'String'));
     3815max_val=str2num(get(handles.num_MaxVec,'String'));
    38153816col=min_val+(max_val-min_val)*slider2;
    3816 set(handles.colcode2,'String',num2str(col))
    3817 if(get(handles.slider1,'Value') > col)%move also the first slider at the same value if needed
    3818     set(handles.slider1,'Value',col)
    3819     set(handles.colcode1,'String',num2str(col))
     3817set(handles.num_ColCode2,'String',num2str(col))
     3818if(get(handles.Slider1,'Value') > col)%move also the first slider at the same value if needed
     3819    set(handles.Slider1,'Value',col)
     3820    set(handles.num_ColCode1,'String',num2str(col))
    38203821end
    38213822colcode2_Callback(hObject, eventdata, handles)
     
    38243825%execute on return carriage on the edit box corresponding to slider 1
    38253826%----------------------------------------------------------------
    3826 function colcode1_Callback(hObject, eventdata, handles)
    3827 % col=str2num(get(handles.colcode1,'String'));
    3828 % set(handles.slider1,'Value',col)
     3827function num_ColCode1_Callback(hObject, eventdata, handles)
     3828% col=str2num(get(handles.num_ColCode1,'String'));
     3829% set(handles.Slider1,'Value',col)
    38293830set_vec_col_bar(handles)
    38303831update_plot(handles);
     
    38333834%execute on return carriage on the edit box corresponding to slider 2
    38343835%----------------------------------------------------------------
    3835 function colcode2_Callback(hObject, eventdata, handles)
    3836 % col=str2num(get(handles.colcode2,'String'));
    3837 % set(handles.slider2,'Value',col)
     3836function num_ColCode2_Callback(hObject, eventdata, handles)
     3837% col=str2num(get(handles.num_ColCode2,'String'));
     3838% set(handles.Slider2,'Value',col)
    38383839% slider2_Callback(hObject, eventdata, handles)
    38393840set_vec_col_bar(handles)
     
    38423843%update the slider values after displaying vectors
    38433844%--------------------------------------------------------
    3844 % function slider_update(handles,auto,minC,colcode1,colcode2,maxC)
    3845 % set(handles.slider1,'Min',minC)
    3846 % set(handles.slider1,'Max',maxC)
    3847 % set(handles.slider2,'Min',minC)
    3848 % set(handles.slider2,'Max',maxC)
     3845% function slider_update(handles,auto,minC,num_ColCode1,num_ColCode2,maxC)
     3846% set(handles.Slider1,'Min',minC)
     3847% set(handles.Slider1,'Max',maxC)
     3848% set(handles.Slider2,'Min',minC)
     3849% set(handles.Slider2,'Max',maxC)
    38493850% set(handles.min_title_vec,'String',num2str(minC))
    3850 % set(handles.max_vec,'String',num2str(maxC))
     3851% set(handles.num_MaxVec,'String',num2str(maxC))
    38513852% if auto
    3852 %         set(handles.colcode1,'String',num2str(colcode1,3))%update display
    3853 %         set(handles.colcode2,'String',num2str(colcode2,3))
     3853%         set(handles.num_ColCode1,'String',num2str(num_ColCode1,3))%update display
     3854%         set(handles.num_ColCode2,'String',num2str(num_ColCode2,3))
    38543855% end
    3855 % set(handles.slider1,'Value',colcode1)%update slider with constant display
    3856 % set(handles.slider2,'Value',colcode2)
     3856% set(handles.Slider1,'Value',num_ColCode1)%update slider with constant display
     3857% set(handles.Slider2,'Value',num_ColCode2)
    38573858% set_vec_col_bar(handles)
    38583859
    38593860
    38603861%-------------------------------------------------------
    3861 % --- Executes on button press in AutoVecColor.
     3862% --- Executes on button press in CheckFixVecColor.
    38623863%-------------------------------------------------------
    3863 function vec_col_bar_Callback(hObject, eventdata, handles)
     3864function VecColBar_Callback(hObject, eventdata, handles)
    38643865set_vec_col_bar(handles)
    38653866
     
    39243925end
    39253926
    3926 set(handles.FixLimits,'Value',0)
    3927 set(handles.FixLimits,'BackgroundColor',[0.7 0.7 0.7])
     3927set(handles.CheckFixLimits,'Value',0)
     3928set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])
    39283929
    39293930%delete drawn objects
     
    40414042            end
    40424043        end
    4043 %         set(haxes,'XLimMode','auto')%reset auto mode (after zoom effect)
     4044%         set(haxes,'XLimMode','auto')%reset auto mode (after CheckZoom effect)
    40444045%         set(haxes,'YLimMode','auto')
    40454046%         PlotParam.Auto_xy=1;
     
    40534054
    40544055%------------------------------------------------------------------------
    4055 function MinX_Callback(hObject, eventdata, handles)
    4056 %------------------------------------------------------------------------
    4057 set(handles.FixLimits,'Value',1) %suppress auto mode
    4058 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     4056function num_MinX_Callback(hObject, eventdata, handles)
     4057%------------------------------------------------------------------------
     4058set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     4059set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    40594060update_plot(handles);
    40604061
    40614062%------------------------------------------------------------------------
    4062 function MaxX_Callback(hObject, eventdata, handles)
    4063 %------------------------------------------------------------------------
    4064 set(handles.FixLimits,'Value',1) %suppress auto mode
    4065 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     4063function num_MaxX_Callback(hObject, eventdata, handles)
     4064%------------------------------------------------------------------------
     4065set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     4066set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    40664067update_plot(handles);
    40674068
    40684069%------------------------------------------------------------------------
    4069 function MinY_Callback(hObject, eventdata, handles)
     4070function num_MinY_Callback(hObject, eventdata, handles)
    40704071%------------------------------------------
    4071 set(handles.FixLimits,'Value',1) %suppress auto mode
    4072 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     4072set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     4073set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    40734074update_plot(handles);
    40744075
    40754076%------------------------------------------------------------------------
    4076 function MaxY_Callback(hObject, eventdata, handles)
    4077 %------------------------------------------------------------------------
    4078 set(handles.FixLimits,'Value',1) %suppress auto mode
    4079 set(handles.FixLimits,'BackgroundColor',[1 1 0])
     4077function num_MaxY_Callback(hObject, eventdata, handles)
     4078%------------------------------------------------------------------------
     4079set(handles.CheckFixLimits,'Value',1) %suppress auto mode
     4080set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])
    40804081update_plot(handles);
    40814082
    40824083%------------------------------------------------------------------------
    4083 function MinA_Callback(hObject, eventdata, handles)
     4084function num_MinA_Callback(hObject, eventdata, handles)
    40844085%------------------------------------------
    4085 set(handles.FixScal,'Value',1) %suppress auto mode
    4086 set(handles.FixScal,'BackgroundColor',[1 1 0])
    4087 MinA=str2double(get(handles.MinA,'String'));
    4088 MaxA=str2double(get(handles.MaxA,'String'));
     4086set(handles.CheckFixScalar,'Value',1) %suppress auto mode
     4087set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     4088MinA=str2double(get(handles.num_MinA,'String'));
     4089MaxA=str2double(get(handles.num_MaxA,'String'));
    40894090if MinA>MaxA% switch minA and maxA in case of error
    40904091    MinA_old=MinA;
    40914092    MinA=MaxA;
    40924093    MaxA=MinA_old;
    4093     set(handles.MinA,'String',num2str(MinA,5));
    4094     set(handles.MaxA,'String',num2str(MaxA,5));
     4094    set(handles.num_MinA,'String',num2str(MinA,5));
     4095    set(handles.num_MaxA,'String',num2str(MaxA,5));
    40954096end
    40964097update_plot(handles);
    40974098
    40984099%------------------------------------------------------------------------
    4099 function MaxA_Callback(hObject, eventdata, handles)
    4100 %------------------------------------------------------------------------
    4101 set(handles.FixScal,'Value',1) %suppress auto mode
    4102 set(handles.FixScal,'BackgroundColor',[1 1 0])
    4103 MinA=str2double(get(handles.MinA,'String'));
    4104 MaxA=str2double(get(handles.MaxA,'String'));
     4100function num_MaxA_Callback(hObject, eventdata, handles)
     4101%------------------------------------------------------------------------
     4102set(handles.CheckFixScalar,'Value',1) %suppress auto mode
     4103set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     4104MinA=str2double(get(handles.num_MinA,'String'));
     4105MaxA=str2double(get(handles.num_MaxA,'String'));
    41054106if MinA>MaxA% switch minA and maxA in case of error
    41064107        MinA_old=MinA;
    41074108    MinA=MaxA;
    41084109    MaxA=MinA_old;
    4109     set(handles.MinA,'String',num2str(MinA,5));
    4110     set(handles.MaxA,'String',num2str(MaxA,5));
     4110    set(handles.num_MinA,'String',num2str(MinA,5));
     4111    set(handles.num_MaxA,'String',num2str(MaxA,5));
    41114112end
    41124113update_plot(handles);
    41134114
    41144115%------------------------------------------------------------------------
    4115 function FixScal_Callback(hObject, eventdata, handles)
    4116 %------------------------------------------------------------------------
    4117 test=get(handles.FixScal,'Value');
     4116function CheckFixScalar_Callback(hObject, eventdata, handles)
     4117%------------------------------------------------------------------------
     4118test=get(handles.CheckFixScalar,'Value');
    41184119if test
    4119     set(handles.FixScal,'BackgroundColor',[1 1 0])
    4120 else
    4121     set(handles.FixScal,'BackgroundColor',[0.7 0.7 0.7])
     4120    set(handles.CheckFixScalar,'BackgroundColor',[1 1 0])
     4121else
     4122    set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7])
    41224123    update_plot(handles);
    41234124end
    41244125
    41254126%-------------------------------------------------------------------
    4126 function BW_Callback(hObject, eventdata, handles)
     4127function CheckBW_Callback(hObject, eventdata, handles)
    41274128%-------------------------------------------------------------------
    41284129update_plot(handles);
    41294130
    41304131%-------------------------------------------------------------------
    4131 function Contours_Callback(hObject, eventdata, handles)
    4132 %-------------------------------------------------------------------
    4133 val=get(handles.Contours,'Value');
     4132function ListContour_Callback(hObject, eventdata, handles)
     4133%-------------------------------------------------------------------
     4134val=get(handles.ListContour,'Value');
    41344135if val==2
    41354136    set(handles.interval_txt,'Visible','on')
    4136     set(handles.IncrA,'Visible','on')
     4137    set(handles.num_IncrA,'Visible','on')
    41374138else
    41384139    set(handles.interval_txt,'Visible','off')
    4139     set(handles.IncrA,'Visible','off')
     4140    set(handles.num_IncrA,'Visible','off')
    41404141end
    41414142update_plot(handles);
    41424143
    41434144%-------------------------------------------------------------------
    4144 function IncrA_Callback(hObject, eventdata, handles)
     4145function num_IncrA_Callback(hObject, eventdata, handles)
    41454146%-------------------------------------------------------------------
    41464147update_plot(handles);
    41474148
    41484149%-------------------------------------------------------------------
    4149 function HideWarning_Callback(hObject, eventdata, handles)
     4150function CheckHideWarning_Callback(hObject, eventdata, handles)
    41504151%-------------------------------------------------------------------
    41514152update_plot(handles);
    41524153
    41534154%-------------------------------------------------------------------
    4154 function HideFalse_Callback(hObject, eventdata, handles)
     4155function CheckHideFalse_Callback(hObject, eventdata, handles)
    41554156%-------------------------------------------------------------------
    41564157update_plot(handles);
    41574158
    41584159%-------------------------------------------------------------------
    4159 function VecScale_Callback(hObject, eventdata, handles)
    4160 %-------------------------------------------------------------------
    4161 set(handles.FixVec,'Value',1);
    4162 set(handles.FixVec,'BackgroundColor',[1 1 0])
     4160function num_VecScale_Callback(hObject, eventdata, handles)
     4161%-------------------------------------------------------------------
     4162set(handles.CheckFixVectors,'Value',1);
     4163set(handles.CheckFixVectors,'BackgroundColor',[1 1 0])
    41634164update_plot(handles);
    41644165
    41654166%-------------------------------------------------------------------
    4166 function FixVec_Callback(hObject, eventdata, handles)
    4167 %-------------------------------------------------------------------
    4168 test=get(handles.FixVec,'Value');
     4167function CheckFixVectors_Callback(hObject, eventdata, handles)
     4168%-------------------------------------------------------------------
     4169test=get(handles.CheckFixVectors,'Value');
    41694170if test
    4170     set(handles.FixVec,'BackgroundColor',[1 1 0])
     4171    set(handles.CheckFixVectors,'BackgroundColor',[1 1 0])
    41714172else
    41724173    update_plot(handles);
    4173     %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3))
    4174     set(handles.FixVec,'BackgroundColor',[0.7 0.7 0.7])
    4175 end
    4176 
    4177 %------------------------------------------------------------------------
    4178 % --- Executes on selection change in decimate4 (nb_vec/4).
    4179 function decimate4_Callback(hObject, eventdata, handles)
     4174    %set(handles.num_VecScale,'String',num2str(ScalOut.num_VecScale,3))
     4175    set(handles.CheckFixVectors,'BackgroundColor',[0.7 0.7 0.7])
     4176end
     4177
     4178%------------------------------------------------------------------------
     4179% --- Executes on selection change in CheckDecimate4 (nb_vec/4).
     4180function CheckDecimate4_Callback(hObject, eventdata, handles)
    41804181%------------------------------------------------------------------------
    41814182update_plot(handles);
    41824183
    41834184%------------------------------------------------------------------------
    4184 % --- Executes on selection change in color_code menu
    4185 function color_code_Callback(hObject, eventdata, handles)
     4185% --- Executes on selection change in ListColorCode menu
     4186function ListColorCode_Callback(hObject, eventdata, handles)
    41864187%------------------------------------------------------------------------
    41874188set_vec_col_bar(handles)
     
    41894190
    41904191%------------------------------------------------------------------------
    4191 % --- Executes on button press in AutoVecColor.
    4192 function AutoVecColor_Callback(hObject, eventdata, handles)
    4193 %------------------------------------------------------------------------
    4194 test=get(handles.AutoVecColor,'Value');
     4192% --- Executes on button press in CheckFixVecColor.
     4193function CheckFixVecColor_Callback(hObject, eventdata, handles)
     4194%------------------------------------------------------------------------
     4195test=get(handles.CheckFixVecColor,'Value');
    41954196if test
    4196     set(handles.AutoVecColor,'BackgroundColor',[1 1 0])
     4197    set(handles.CheckFixVecColor,'BackgroundColor',[1 1 0])
    41974198else
    41984199    update_plot(handles);
    4199     %set(handles.VecScale,'String',num2str(ScalOut.VecScale,3))
    4200     set(handles.AutoVecColor,'BackgroundColor',[0.7 0.7 0.7])
    4201 end
    4202 
    4203 %------------------------------------------------------------------------
    4204 % --- Executes on selection change in max_vec.
    4205 function min_vec_Callback(hObject, eventdata, handles)
     4200    %set(handles.num_VecScale,'String',num2str(ScalOut.num_VecScale,3))
     4201    set(handles.CheckFixVecColor,'BackgroundColor',[0.7 0.7 0.7])
     4202end
     4203
     4204%------------------------------------------------------------------------
     4205% --- Executes on selection change in num_MaxVec.
     4206function num_MinVec_Callback(hObject, eventdata, handles)
    42064207%------------------------------------------------------------------------
    42074208max_vec_Callback(hObject, eventdata, handles)
    42084209
    42094210%------------------------------------------------------------------------
    4210 % --- Executes on selection change in max_vec.
    4211 function max_vec_Callback(hObject, eventdata, handles)
    4212 %------------------------------------------------------------------------
    4213 set(handles.AutoVecColor,'Value',1)
     4211% --- Executes on selection change in num_MaxVec.
     4212function num_MaxVec_Callback(hObject, eventdata, handles)
     4213%------------------------------------------------------------------------
     4214set(handles.CheckFixVecColor,'Value',1)
    42144215AutoVecColor_Callback(hObject, eventdata, handles)
    4215 min_val=str2num(get(handles.min_vec,'String'));
    4216 max_val=str2num(get(handles.max_vec,'String'));
    4217 slider1=get(handles.slider1,'Value');
    4218 slider2=get(handles.slider2,'Value');
     4216min_val=str2num(get(handles.num_MinVec,'String'));
     4217max_val=str2num(get(handles.num_MaxVec,'String'));
     4218slider1=get(handles.Slider1,'Value');
     4219slider2=get(handles.Slider2,'Value');
    42194220colcode1=min_val+(max_val-min_val)*slider1;
    42204221colcode2=min_val+(max_val-min_val)*slider2;
    4221 set(handles.colcode1,'String',num2str(colcode1))
    4222 set(handles.colcode2,'String',num2str(colcode2))
     4222set(handles.num_ColCode1,'String',num2str(colcode1))
     4223set(handles.num_ColCode2,'String',num2str(colcode2))
    42234224update_plot(handles);
    42244225
     
    42274228function set_vec_col_bar(handles)
    42284229%------------------------------------------------------------------------
    4229 %get the image of the color display button 'vec_col_bar' in pixels
    4230 set(handles.vec_col_bar,'Unit','pixel');
    4231 pos_vert=get(handles.vec_col_bar,'Position');
    4232 set(handles.vec_col_bar,'Unit','Normalized');
     4230%get the image of the color display button 'VecColBar' in pixels
     4231set(handles.VecColBar,'Unit','pixel');
     4232pos_vert=get(handles.VecColBar,'Position');
     4233set(handles.VecColBar,'Unit','Normalized');
    42334234width=ceil(pos_vert(3));
    42344235height=ceil(pos_vert(4));
    42354236
    42364237%get slider indications
    4237 list=get(handles.color_code,'String');
    4238 ichoice=get(handles.color_code,'Value');
     4238list=get(handles.ListColorCode,'String');
     4239ichoice=get(handles.ListColorCode,'Value');
    42394240colcode.ColorCode=list{ichoice};
    4240 colcode.MinC=str2num(get(handles.min_vec,'String'));
    4241 colcode.MaxC=str2num(get(handles.max_vec,'String'));
     4241colcode.MinC=str2num(get(handles.num_MinVec,'String'));
     4242colcode.MaxC=str2num(get(handles.num_MaxVec,'String'));
    42424243test3color=strcmp(colcode.ColorCode,'rgb') || strcmp(colcode.ColorCode,'bgr');
    42434244if test3color
    4244     colcode.colcode1=str2num(get(handles.colcode1,'String'));
    4245     colcode.colcode2=str2num(get(handles.colcode2,'String'));
     4245    colcode.colcode1=str2num(get(handles.num_ColCode1,'String'));
     4246    colcode.colcode2=str2num(get(handles.num_ColCode2,'String'));
    42464247end
    42474248colcode.FixedCbounds=0;
     
    42564257A(:,:,2)=A2';
    42574258A(:,:,3)=A3';
    4258 set(handles.vec_col_bar,'Cdata',A)
     4259set(handles.VecColBar,'Cdata',A)
    42594260
    42604261
     
    42654266UvData=get(handles.uvmat,'UserData');
    42664267AxeData=UvData.axes3;
    4267 PlotParam=read_plot_param(handles);
     4268%PlotParam=read_plot_param(handles);
     4269PlotParam=read_GUI(handles.uvmat);
    42684270[PP,PlotParamOut]= plot_field(AxeData,haxes,PlotParam);
    42694271write_plot_param(handles,PlotParamOut); %update the auto plot parameters
     
    42834285    set(handles.edit_object,'BackgroundColor',[1,1,0]) 
    42844286    %suppress the other options
    4285     set(handles.zoom,'Value',0)
     4287    set(handles.CheckZoom,'Value',0)
    42864288    zoom_Callback(hObject, eventdata, handles)
    42874289    hgeometry_calib=findobj(allchild(0),'tag','geometry_calib');
     
    43964398if option==1 ||option==2% lefet mouse selection, peroject the field:
    43974399    ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on ObjectData
    4398     plot_field(ProjData,PlotHandles.axes3,read_plot_param(PlotHandles));%read plotting parameters on the uvmat interfacPlotHandles);
     4400    %plot_field(ProjData,PlotHandles.axes3,read_plot_param(PlotHandles));%read plotting parameters on the uvmat interfacPlotHandles);
     4401    plot_field(ProjData,PlotHandles.axes3,read_GUI(get(PlotHandles.axes3,'Parent')));%read plotting parameters on the uvmat interfacPlotHandles);
    43994402    UvData.Object=update_obj(UvData,IndexObj,[]);
    44004403    set(handles.uvmat,'UserData',UvData)
     
    45874590
    45884591%suppress competing options
    4589 set(handles.zoom,'Value',0)
    4590 set(handles.zoom,'BackgroundColor',[0.7 0.7 0.7])
     4592set(handles.CheckZoom,'Value',0)
     4593set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7])
    45914594set(handles.list_object_1,'Value',1)     
    45924595% initiate display of GUI geometry_calib
     
    50285031set(handles.MenuObject,'checked','on')
    50295032set(handles.uvmat,'UserData',UvData)
    5030 set(handles.zoom,'Value',0)
    5031 zoom_Callback(handles.uvmat, [], handles)
     5033set(handles.CheckZoom,'Value',0)
     5034CheckZoom_Callback(handles.uvmat, [], handles)
    50325035set(handles.delete_object,'Visible','on')
    50335036set(handles.uvmat_title,'Visible','on')
     
    50375040function MenuRuler_Callback(hObject, eventdata, handles)
    50385041%------------------------------------------------------------------------
    5039 set(handles.zoom,'Value',0)
    5040 zoom_Callback(handles.uvmat, [], handles)
     5042set(handles.CheckZoom,'Value',0)
     5043CheckZoom_Callback(handles.uvmat, [], handles)
    50415044set(handles.MenuRuler,'checked','on')
    50425045UvData=get(handles.uvmat,'UserData');
  • trunk/src/view_field.m

    r231 r292  
    100100
    101101if isfield(PlotParamOut,'Vectors')
    102     set(handles.VECT_title,'Visible','on')
     102    set(handles.Vectors,'Visible','on')
    103103end
    104104write_plot_param(handles,PlotParamOut);% update the display of the plotting parameters
     
    696696ProjField=ViewFieldData.axes3;
    697697%ProjField=get(haxes,'UserData');
    698 PlotParam=read_plot_param(handles);
     698PlotParam=read_GUI(handles.view_field);
    699699[PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1);
    700700write_plot_param(handles,PlotParamOut); %update the auto plot parameters
     
    741741
    742742
     743
     744
     745% --- Executes on button press in CheckZoom.
     746function CheckZoom_Callback(hObject, eventdata, handles)
     747% hObject    handle to CheckZoom (see GCBO)
     748% eventdata  reserved - to be defined in a future version of MATLAB
     749% handles    structure with handles and user data (see GUIDATA)
     750
     751% Hint: get(hObject,'Value') returns toggle state of CheckZoom
     752
     753
     754% --- Executes on button press in CheckFixLimits.
     755function CheckFixLimits_Callback(hObject, eventdata, handles)
     756% hObject    handle to CheckFixLimits (see GCBO)
     757% eventdata  reserved - to be defined in a future version of MATLAB
     758% handles    structure with handles and user data (see GUIDATA)
     759
     760% Hint: get(hObject,'Value') returns toggle state of CheckFixLimits
     761
     762
     763
     764function num_MinY_Callback(hObject, eventdata, handles)
     765% hObject    handle to num_MinY (see GCBO)
     766% eventdata  reserved - to be defined in a future version of MATLAB
     767% handles    structure with handles and user data (see GUIDATA)
     768
     769% Hints: get(hObject,'String') returns contents of num_MinY as text
     770%        str2double(get(hObject,'String')) returns contents of num_MinY as a double
     771
     772
     773% --- Executes during object creation, after setting all properties.
     774function num_MinY_CreateFcn(hObject, eventdata, handles)
     775% hObject    handle to num_MinY (see GCBO)
     776% eventdata  reserved - to be defined in a future version of MATLAB
     777% handles    empty - handles not created until after all CreateFcns called
     778
     779% Hint: edit controls usually have a white background on Windows.
     780%       See ISPC and COMPUTER.
     781if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     782    set(hObject,'BackgroundColor','white');
     783end
     784
     785
     786
     787function num_MaxY_Callback(hObject, eventdata, handles)
     788% hObject    handle to num_MaxY (see GCBO)
     789% eventdata  reserved - to be defined in a future version of MATLAB
     790% handles    structure with handles and user data (see GUIDATA)
     791
     792% Hints: get(hObject,'String') returns contents of num_MaxY as text
     793%        str2double(get(hObject,'String')) returns contents of num_MaxY as a double
     794
     795
     796% --- Executes on button press in CheckFixEqual.
     797function CheckFixEqual_Callback(hObject, eventdata, handles)
     798% hObject    handle to CheckFixEqual (see GCBO)
     799% eventdata  reserved - to be defined in a future version of MATLAB
     800% handles    structure with handles and user data (see GUIDATA)
     801
     802% Hint: get(hObject,'Value') returns toggle state of CheckFixEqual
     803
     804
     805
     806function num_MinX_Callback(hObject, eventdata, handles)
     807% hObject    handle to num_MinX (see GCBO)
     808% eventdata  reserved - to be defined in a future version of MATLAB
     809% handles    structure with handles and user data (see GUIDATA)
     810
     811% Hints: get(hObject,'String') returns contents of num_MinX as text
     812%        str2double(get(hObject,'String')) returns contents of num_MinX as a double
     813
     814
     815
     816function num_MaxX_Callback(hObject, eventdata, handles)
     817% hObject    handle to num_MaxX (see GCBO)
     818% eventdata  reserved - to be defined in a future version of MATLAB
     819% handles    structure with handles and user data (see GUIDATA)
     820
     821% Hints: get(hObject,'String') returns contents of num_MaxX as text
     822%        str2double(get(hObject,'String')) returns contents of num_MaxX as a double
     823
     824
     825% --- Executes on selection change in ListContour.
     826function ListContour_Callback(hObject, eventdata, handles)
     827% hObject    handle to ListContour (see GCBO)
     828% eventdata  reserved - to be defined in a future version of MATLAB
     829% handles    structure with handles and user data (see GUIDATA)
     830
     831% Hints: contents = cellstr(get(hObject,'String')) returns ListContour contents as cell array
     832%        contents{get(hObject,'Value')} returns selected item from ListContour
     833
     834
     835% --- Executes on button press in checkbox49.
     836function checkbox49_Callback(hObject, eventdata, handles)
     837% hObject    handle to checkbox49 (see GCBO)
     838% eventdata  reserved - to be defined in a future version of MATLAB
     839% handles    structure with handles and user data (see GUIDATA)
     840
     841% Hint: get(hObject,'Value') returns toggle state of checkbox49
     842
     843
     844
     845function num_MaxA_Callback(hObject, eventdata, handles)
     846% hObject    handle to num_MaxA (see GCBO)
     847% eventdata  reserved - to be defined in a future version of MATLAB
     848% handles    structure with handles and user data (see GUIDATA)
     849
     850% Hints: get(hObject,'String') returns contents of num_MaxA as text
     851%        str2double(get(hObject,'String')) returns contents of num_MaxA as a double
     852
     853
     854% --- Executes during object creation, after setting all properties.
     855function num_MaxA_CreateFcn(hObject, eventdata, handles)
     856% hObject    handle to num_MaxA (see GCBO)
     857% eventdata  reserved - to be defined in a future version of MATLAB
     858% handles    empty - handles not created until after all CreateFcns called
     859
     860% Hint: edit controls usually have a white background on Windows.
     861%       See ISPC and COMPUTER.
     862if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     863    set(hObject,'BackgroundColor','white');
     864end
     865
     866
     867
     868function num_Npy_Callback(hObject, eventdata, handles)
     869% hObject    handle to num_Npy (see GCBO)
     870% eventdata  reserved - to be defined in a future version of MATLAB
     871% handles    structure with handles and user data (see GUIDATA)
     872
     873% Hints: get(hObject,'String') returns contents of num_Npy as text
     874%        str2double(get(hObject,'String')) returns contents of num_Npy as a double
     875
     876
     877% --- Executes during object creation, after setting all properties.
     878function num_Npy_CreateFcn(hObject, eventdata, handles)
     879% hObject    handle to num_Npy (see GCBO)
     880% eventdata  reserved - to be defined in a future version of MATLAB
     881% handles    empty - handles not created until after all CreateFcns called
     882
     883% Hint: edit controls usually have a white background on Windows.
     884%       See ISPC and COMPUTER.
     885if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     886    set(hObject,'BackgroundColor','white');
     887end
     888
     889
     890
     891function num_IncrA_Callback(hObject, eventdata, handles)
     892% hObject    handle to num_IncrA (see GCBO)
     893% eventdata  reserved - to be defined in a future version of MATLAB
     894% handles    structure with handles and user data (see GUIDATA)
     895
     896% Hints: get(hObject,'String') returns contents of num_IncrA as text
     897%        str2double(get(hObject,'String')) returns contents of num_IncrA as a double
     898
     899
     900% --- Executes on button press in CheckBW.
     901function CheckBW_Callback(hObject, eventdata, handles)
     902% hObject    handle to CheckBW (see GCBO)
     903% eventdata  reserved - to be defined in a future version of MATLAB
     904% handles    structure with handles and user data (see GUIDATA)
     905
     906% Hint: get(hObject,'Value') returns toggle state of CheckBW
     907
     908
     909
     910function num_MinA_Callback(hObject, eventdata, handles)
     911% hObject    handle to num_MinA (see GCBO)
     912% eventdata  reserved - to be defined in a future version of MATLAB
     913% handles    structure with handles and user data (see GUIDATA)
     914
     915% Hints: get(hObject,'String') returns contents of num_MinA as text
     916%        str2double(get(hObject,'String')) returns contents of num_MinA as a double
     917
     918
     919
     920function num_Npx_Callback(hObject, eventdata, handles)
     921% hObject    handle to num_Npx (see GCBO)
     922% eventdata  reserved - to be defined in a future version of MATLAB
     923% handles    structure with handles and user data (see GUIDATA)
     924
     925% Hints: get(hObject,'String') returns contents of num_Npx as text
     926%        str2double(get(hObject,'String')) returns contents of num_Npx as a double
     927
     928
     929% --- Executes on button press in CheckFixVectors.
     930function CheckFixVectors_Callback(hObject, eventdata, handles)
     931% hObject    handle to CheckFixVectors (see GCBO)
     932% eventdata  reserved - to be defined in a future version of MATLAB
     933% handles    structure with handles and user data (see GUIDATA)
     934
     935% Hint: get(hObject,'Value') returns toggle state of CheckFixVectors
     936
     937
     938
     939function num_VecScale_Callback(hObject, eventdata, handles)
     940% hObject    handle to num_VecScale (see GCBO)
     941% eventdata  reserved - to be defined in a future version of MATLAB
     942% handles    structure with handles and user data (see GUIDATA)
     943
     944% Hints: get(hObject,'String') returns contents of num_VecScale as text
     945%        str2double(get(hObject,'String')) returns contents of num_VecScale as a double
     946
     947
     948% --- Executes on selection change in ListColorCode.
     949function ListColorCode_Callback(hObject, eventdata, handles)
     950% hObject    handle to ListColorCode (see GCBO)
     951% eventdata  reserved - to be defined in a future version of MATLAB
     952% handles    structure with handles and user data (see GUIDATA)
     953
     954% Hints: contents = cellstr(get(hObject,'String')) returns ListColorCode contents as cell array
     955%        contents{get(hObject,'Value')} returns selected item from ListColorCode
     956
     957
     958% --- Executes on selection change in ListColorScalar.
     959function ListColorScalar_Callback(hObject, eventdata, handles)
     960% hObject    handle to ListColorScalar (see GCBO)
     961% eventdata  reserved - to be defined in a future version of MATLAB
     962% handles    structure with handles and user data (see GUIDATA)
     963
     964% Hints: contents = cellstr(get(hObject,'String')) returns ListColorScalar contents as cell array
     965%        contents{get(hObject,'Value')} returns selected item from ListColorScalar
     966
     967
     968% --- Executes on button press in vecColBar.
     969function vecColBar_Callback(hObject, eventdata, handles)
     970% hObject    handle to vecColBar (see GCBO)
     971% eventdata  reserved - to be defined in a future version of MATLAB
     972% handles    structure with handles and user data (see GUIDATA)
     973
     974
     975% --- Executes on slider movement.
     976function Slider1_Callback(hObject, eventdata, handles)
     977% hObject    handle to Slider1 (see GCBO)
     978% eventdata  reserved - to be defined in a future version of MATLAB
     979% handles    structure with handles and user data (see GUIDATA)
     980
     981% Hints: get(hObject,'Value') returns position of slider
     982%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
     983
     984
     985% --- Executes during object creation, after setting all properties.
     986function Slider1_CreateFcn(hObject, eventdata, handles)
     987% hObject    handle to Slider1 (see GCBO)
     988% eventdata  reserved - to be defined in a future version of MATLAB
     989% handles    empty - handles not created until after all CreateFcns called
     990
     991% Hint: slider controls usually have a light gray background.
     992if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     993    set(hObject,'BackgroundColor',[.9 .9 .9]);
     994end
     995
     996
     997% --- Executes on slider movement.
     998function Slider2_Callback(hObject, eventdata, handles)
     999% hObject    handle to Slider2 (see GCBO)
     1000% eventdata  reserved - to be defined in a future version of MATLAB
     1001% handles    structure with handles and user data (see GUIDATA)
     1002
     1003% Hints: get(hObject,'Value') returns position of slider
     1004%        get(hObject,'Min') and get(hObject,'Max') to determine range of slider
     1005
     1006
     1007% --- Executes during object creation, after setting all properties.
     1008function Slider2_CreateFcn(hObject, eventdata, handles)
     1009% hObject    handle to Slider2 (see GCBO)
     1010% eventdata  reserved - to be defined in a future version of MATLAB
     1011% handles    empty - handles not created until after all CreateFcns called
     1012
     1013% Hint: slider controls usually have a light gray background.
     1014if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     1015    set(hObject,'BackgroundColor',[.9 .9 .9]);
     1016end
     1017
     1018
     1019
     1020function num_ColCode1_Callback(hObject, eventdata, handles)
     1021% hObject    handle to num_ColCode1 (see GCBO)
     1022% eventdata  reserved - to be defined in a future version of MATLAB
     1023% handles    structure with handles and user data (see GUIDATA)
     1024
     1025% Hints: get(hObject,'String') returns contents of num_ColCode1 as text
     1026%        str2double(get(hObject,'String')) returns contents of num_ColCode1 as a double
     1027
     1028
     1029% --- Executes during object creation, after setting all properties.
     1030function num_ColCode1_CreateFcn(hObject, eventdata, handles)
     1031% hObject    handle to num_ColCode1 (see GCBO)
     1032% eventdata  reserved - to be defined in a future version of MATLAB
     1033% handles    empty - handles not created until after all CreateFcns called
     1034
     1035% Hint: edit controls usually have a white background on Windows.
     1036%       See ISPC and COMPUTER.
     1037if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     1038    set(hObject,'BackgroundColor','white');
     1039end
     1040
     1041
     1042
     1043function num_MaxVec_Callback(hObject, eventdata, handles)
     1044% hObject    handle to num_MaxVec (see GCBO)
     1045% eventdata  reserved - to be defined in a future version of MATLAB
     1046% handles    structure with handles and user data (see GUIDATA)
     1047
     1048% Hints: get(hObject,'String') returns contents of num_MaxVec as text
     1049%        str2double(get(hObject,'String')) returns contents of num_MaxVec as a double
     1050
     1051
     1052% --- Executes during object creation, after setting all properties.
     1053function num_MaxVec_CreateFcn(hObject, eventdata, handles)
     1054% hObject    handle to num_MaxVec (see GCBO)
     1055% eventdata  reserved - to be defined in a future version of MATLAB
     1056% handles    empty - handles not created until after all CreateFcns called
     1057
     1058% Hint: edit controls usually have a white background on Windows.
     1059%       See ISPC and COMPUTER.
     1060if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     1061    set(hObject,'BackgroundColor','white');
     1062end
     1063
     1064
     1065% --- Executes on button press in checkbox52.
     1066function checkbox52_Callback(hObject, eventdata, handles)
     1067% hObject    handle to checkbox52 (see GCBO)
     1068% eventdata  reserved - to be defined in a future version of MATLAB
     1069% handles    structure with handles and user data (see GUIDATA)
     1070
     1071% Hint: get(hObject,'Value') returns toggle state of checkbox52
     1072
     1073
     1074
     1075function num_MinVec_Callback(hObject, eventdata, handles)
     1076% hObject    handle to num_MinVec (see GCBO)
     1077% eventdata  reserved - to be defined in a future version of MATLAB
     1078% handles    structure with handles and user data (see GUIDATA)
     1079
     1080% Hints: get(hObject,'String') returns contents of num_MinVec as text
     1081%        str2double(get(hObject,'String')) returns contents of num_MinVec as a double
     1082
     1083
     1084% --- Executes during object creation, after setting all properties.
     1085function num_MinVec_CreateFcn(hObject, eventdata, handles)
     1086% hObject    handle to num_MinVec (see GCBO)
     1087% eventdata  reserved - to be defined in a future version of MATLAB
     1088% handles    empty - handles not created until after all CreateFcns called
     1089
     1090% Hint: edit controls usually have a white background on Windows.
     1091%       See ISPC and COMPUTER.
     1092if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     1093    set(hObject,'BackgroundColor','white');
     1094end
     1095
     1096
     1097% --- Executes on button press in CheckDecimate4.
     1098function CheckDecimate4_Callback(hObject, eventdata, handles)
     1099% hObject    handle to CheckDecimate4 (see GCBO)
     1100% eventdata  reserved - to be defined in a future version of MATLAB
     1101% handles    structure with handles and user data (see GUIDATA)
     1102
     1103% Hint: get(hObject,'Value') returns toggle state of CheckDecimate4
     1104
     1105
     1106% --- Executes on button press in heckHideFalse.
     1107function heckHideFalse_Callback(hObject, eventdata, handles)
     1108% hObject    handle to heckHideFalse (see GCBO)
     1109% eventdata  reserved - to be defined in a future version of MATLAB
     1110% handles    structure with handles and user data (see GUIDATA)
     1111
     1112% Hint: get(hObject,'Value') returns toggle state of heckHideFalse
     1113
     1114
     1115
     1116function num_Colcode2_Callback(hObject, eventdata, handles)
     1117% hObject    handle to num_Colcode2 (see GCBO)
     1118% eventdata  reserved - to be defined in a future version of MATLAB
     1119% handles    structure with handles and user data (see GUIDATA)
     1120
     1121% Hints: get(hObject,'String') returns contents of num_Colcode2 as text
     1122%        str2double(get(hObject,'String')) returns contents of num_Colcode2 as a double
     1123
     1124
     1125% --- Executes during object creation, after setting all properties.
     1126function num_Colcode2_CreateFcn(hObject, eventdata, handles)
     1127% hObject    handle to num_Colcode2 (see GCBO)
     1128% eventdata  reserved - to be defined in a future version of MATLAB
     1129% handles    empty - handles not created until after all CreateFcns called
     1130
     1131% Hint: edit controls usually have a white background on Windows.
     1132%       See ISPC and COMPUTER.
     1133if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
     1134    set(hObject,'BackgroundColor','white');
     1135end
     1136
     1137
     1138% --- Executes on button press in CheckHideWarnin.
     1139function CheckHideWarnin_Callback(hObject, eventdata, handles)
     1140% hObject    handle to CheckHideWarnin (see GCBO)
     1141% eventdata  reserved - to be defined in a future version of MATLAB
     1142% handles    structure with handles and user data (see GUIDATA)
     1143
     1144% Hint: get(hObject,'Value') returns toggle state of CheckHideWarnin
  • trunk/src/write_plot_param.m

    r204 r292  
    44if isfield(PlotParam,'FixEqual')
    55    if PlotParam.FixEqual
    6         set(handles.FixEqual,'Value',1)
    7         set(handles.FixEqual,'BackgroundColor',[1 1 0])
     6        set(handles.CheckFixEqual,'Value',1)
     7        set(handles.CheckFixEqual,'BackgroundColor',[1 1 0])
    88    else
    9         set(handles.FixEqual,'Value',0)
    10         set(handles.FixEqual,'BackgroundColor',[0.7 0.7 0.7])
     9        set(handles.CheckFixEqual,'Value',0)
     10        set(handles.CheckFixEqual,'BackgroundColor',[0.7 0.7 0.7])
    1111    end
    1212end
    1313if isfield(PlotParam,'MinX')
    14 set(handles.MinX,'String',num2str(PlotParam.MinX,4));
    15 set(handles.MaxX,'String',num2str(PlotParam.MaxX,4));
    16 set(handles.MinY,'String',num2str(PlotParam.MinY,4));
    17 set(handles.MaxY,'String',num2str(PlotParam.MaxY,4));
     14    set(handles.num_MinX,'String',num2str(PlotParam.MinX,4));
     15    set(handles.num_MaxX,'String',num2str(PlotParam.MaxX,4));
     16    set(handles.num_MinY,'String',num2str(PlotParam.MinY,4));
     17    set(handles.num_MaxY,'String',num2str(PlotParam.MaxY,4));
    1818else
    19     set(handles.MinX,'String','');
    20 set(handles.MaxX,'String','');
    21 set(handles.MinY,'String','');
    22 set(handles.MaxY,'String','');
     19    set(handles.num_MinX,'String','');
     20    set(handles.num_MaxX,'String','');
     21    set(handles.num_MinY,'String','');
     22    set(handles.num_MaxY,'String','');
    2323end
    2424
     
    2727    set_scal_display(handles,'on')
    2828    if isfield(PlotParam.Scalar,'MaxA')
    29         set(handles.MaxA,'String',num2str(PlotParam.Scalar.MaxA,3));
     29        set(handles.num_MaxA,'String',num2str(PlotParam.Scalar.MaxA,3));
    3030    end
    3131    if isfield(PlotParam.Scalar,'MinA')
    32         set(handles.MinA,'String',num2str(PlotParam.Scalar.MinA,3));
     32        set(handles.num_MinA,'String',num2str(PlotParam.Scalar.MinA,3));
    3333    end
    3434
    3535    if isfield(PlotParam.Scalar,'IncrA')
    36         set(handles.IncrA,'String',num2str(PlotParam.Scalar.IncrA,3))
     36        set(handles.num_IncrA,'String',num2str(PlotParam.Scalar.IncrA,3))
    3737    end
    3838else
     
    4444    set_vect_display(handles,'on')
    4545    if isfield(PlotParam.Vectors,'VecScale')
    46         set(handles.VecScale,'String',num2str(PlotParam.Vectors.VecScale,3))
     46        set(handles.num_VecScale,'String',num2str(PlotParam.Vectors.VecScale,3))
    4747    end
    4848    if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC')
     
    8787function set_scal_display(handles,state)
    8888%------------------------------------------------------------------
    89 % set(handles.SCALAR_title,'Visible',state)
    90 set(handles.MaxA,'Visible',state)
    91 set(handles.MinA,'Visible',state)
    92 %set(handles.IncrA,'Visible',state)
    93 set(handles.FixScal,'Visible',state)
    94 set(handles.BW,'Visible',state)
    95 set(handles.Contours,'Visible',state)
    96 set(handles.min_title,'Visible',state)
    97 set(handles.max_title,'Visible',state)
    98 %set(handles.frame_scal,'Visible',state)
    99 set(handles.npx,'Visible',state)
    100 set(handles.npy,'Visible',state)
    101 set(handles.npx_title,'Visible',state)
    102 set(handles.npy_title,'Visible',state)
    103 %set(handles.makemask,'Visible',state)
     89set(handles.Scalar,'Visible',state)
     90% set(handles.num_MaxA,'Visible',state)
     91% set(handles.num_MinA,'Visible',state)
     92% %set(handles.IncrA,'Visible',state)
     93% set(handles.CheckFixScalar,'Visible',state)
     94% set(handles.CheckBW,'Visible',state)
     95% set(handles.ListContour,'Visible',state)
     96% set(handles.TitleMinA,'Visible',state)
     97% set(handles.TitleMaxA,'Visible',state)
     98% set(handles.num_Npx,'Visible',state)
     99% set(handles.num_Npy,'Visible',state)
     100% set(handles.TitleNpx,'Visible',state)
     101% set(handles.TitleNpy,'Visible',state)
    104102
    105103%---------------------------------------------
     
    107105function set_vect_display(handles,state)
    108106%------------------------------------------------------------------
    109 set(handles.frame_vect,'Visible',state)
     107set(handles.Vectors,'Visible',state)
    110108% set(handles.VECT_title,'Visible',state)
    111 set(handles.VecScale,'Visible',state)
    112 set(handles.FixVec,'Visible',state)
    113 set(handles.HideFalse,'Visible',state)
    114 set(handles.HideWarning,'Visible',state)
    115 % if isfield(handles,'record')
    116 %     set(handles.record,'Visible',state)
     109% set(handles.num_VecScale,'Visible',state)
     110% set(handles.FixVec,'Visible',state)
     111% set(handles.HideFalse,'Visible',state)
     112% set(handles.HideWarning,'Visible',state)
     113% % if isfield(handles,'record')
     114% %     set(handles.record,'Visible',state)
     115% % end
     116% set(handles.num_ColCode1,'Visible',state)
     117% set(handles.num_ColCode2,'Visible',state)
     118% set(handles.num_MinVec,'Visible',state)
     119% set(handles.num_MaxVec,'Visible',state)
     120% set(handles.scale_title,'Visible',state)
     121% set(handles.slider1,'Visible',state)
     122% set(handles.slider2,'Visible',state)
     123% set(handles.col_vec,'Visible',state)
     124% set(handles.Color_title,'Visible',state)
     125% set(handles.color_code,'Visible',state)
     126% set(handles.vec_col_bar,'Visible',state)
     127% % set(handles.record,'Visible',state)
     128% set(handles.AutoVecColor,'Visible',state)
     129% set(handles.decimate4,'Visible',state)
     130% set(handles.min_C_title,'Visible',state)
     131% set(handles.max_C_title,'Visible',state)
     132% if isfield(handles,'MenuEditVectors')
     133%     set(handles.MenuEditVectors,'Enable',state)
    117134% end
    118 set(handles.colcode1,'Visible',state)
    119 set(handles.colcode2,'Visible',state)
    120 set(handles.min_vec,'Visible',state)
    121 set(handles.max_vec,'Visible',state)
    122 set(handles.scale_title,'Visible',state)
    123 set(handles.slider1,'Visible',state)
    124 set(handles.slider2,'Visible',state)
    125 set(handles.col_vec,'Visible',state)
    126 set(handles.Color_title,'Visible',state)
    127 set(handles.color_code,'Visible',state)
    128 set(handles.vec_col_bar,'Visible',state)
    129 % set(handles.record,'Visible',state)
    130 set(handles.AutoVecColor,'Visible',state)
    131 set(handles.decimate4,'Visible',state)
    132 set(handles.min_C_title,'Visible',state)
    133 set(handles.max_C_title,'Visible',state)
    134 if isfield(handles,'MenuEditVectors')
    135     set(handles.MenuEditVectors,'Enable',state)
    136 end
Note: See TracChangeset for help on using the changeset viewer.