- Timestamp:
- Nov 21, 2011, 11:12:06 AM (13 years ago)
- Location:
- trunk/src
- Files:
-
- 2 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_files.m
r289 r292 36 36 'cell2tab';... %transform a Matlab cell in a character array suitable for display in a table 37 37 'check_field_structure';...% check the validity of the field struture representation consistant with the netcdf format 38 'check_f unctions';...38 'check_files';... 39 39 'civ';... %function associated with the interface 'civ.fig' for PIV and spline interpolation 40 40 'civ.fig';... … … 78 78 'read_civxdata';...reads civx data from netcdf files 79 79 '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 interface80 'read_GUI';... %read all parameters set by a GUI as a Matlab structure 81 81 'read_set_object';...%read the data on the set_object interface 82 82 'read_xls';...%read excel files containing the list of the experiments -
trunk/src/civ.m
r291 r292 23 23 %TODO: search range 24 24 25 % Last Modified by GUIDE v2.5 19-Nov-2011 19:26:2025 % Last Modified by GUIDE v2.5 21-Nov-2011 10:58:28 26 26 % Begin initialization code - DO NOT EDIT 27 27 gui_Singleton = 1; … … 4166 4166 end 4167 4167 % set(handles.frame_patch2,'BackgroundColor',[1 1 0]) 4168 % set(handles.num_Smooth Param,'Visible','on')4168 % set(handles.num_SmoothingParam,'Visible','on') 4169 4169 % set(handles.num_SmoothingParam,'Visible','on') 4170 4170 % set(handles.num_MaxDiff,'Visible','on') … … 4192 4192 % return 4193 4193 % set(handles.frame_patch2,'BackgroundColor',[0.831 0.816 0.784]) 4194 % set(handles.num_Smooth Param,'Visible','off')4194 % set(handles.num_SmoothingParam,'Visible','off') 4195 4195 % set(handles.num_SmoothingParam,'Visible','off') 4196 4196 % set(handles.num_MaxDiff,'Visible','off') … … 4867 4867 if isequal(get(handles.CheckStereo,'Value'),0) 4868 4868 set(handles.num_SubdomainSize,'Visible','on') 4869 set(handles.num_Smooth Param,'Visible','on')4869 set(handles.num_SmoothingParam,'Visible','on') 4870 4870 else 4871 4871 set(handles.num_SubdomainSize,'Visible','off') 4872 set(handles.num_Smooth Param,'Visible','off')4872 set(handles.num_SmoothingParam,'Visible','off') 4873 4873 end 4874 4874 … … 5349 5349 cmd=[Param.xml.PatchBin... 5350 5350 ' -f ' filename '.nc -m ' num2str(Param.(patchname).Nx)... 5351 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).Smooth Param)...5351 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)... 5352 5352 ' -nopt ' num2str(Param.(patchname).SubdomainSize) ... 5353 5353 ' > ' filename '.' lower(patchname) '.log 2>&1']; % redirect standard output to the log file … … 5355 5355 cmd=['"' Param.xml.PatchBin... 5356 5356 '" -f "' filename '.nc" -m ' num2str(Param.(patchname).Nx)... 5357 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).Smooth Param)...5357 ' -n ' num2str(Param.(patchname).Ny) ' -ro ' num2str(Param.(patchname).SmoothingParam)... 5358 5358 ' -nopt ' num2str(Param.(patchname).SubdomainSize)... 5359 5359 ' > "' filename '.' lower(patchname) '.log" 2>&1']; % redirect standard output to the log file … … 5426 5426 'del "' filename '.cmx" \n']; 5427 5427 end 5428 -
trunk/src/mouse_down.m
r252 r292 40 40 set(hcurrentfig,'Units','normalized') 41 41 hhcurrentfig=guidata(hcurrentfig); 42 test_zoom=get(hhcurrentfig. zoom,'Value');%test for zoom action, first priority42 test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom action, first priority 43 43 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on');%test for ruler action, second priority; 44 44 test_edit=get(hhuvmat.edit_object,'Value');%test for object editing, third priority … … 371 371 Field.FF(ivec)=0; 372 372 end 373 PlotParam=read_ plot_param(hhcurrentfig);373 PlotParam=read_GUI(hcurrentfig); 374 374 plot_field(Field,haxes,PlotParam); 375 375 eval(['FigData.' tagaxes '=Field;'])%record the modified field in FigData -
trunk/src/mouse_motion.m
r251 r292 36 36 end 37 37 hhcurrentfig=guidata(currentfig); 38 test_zoom=get(hhcurrentfig. zoom,'Value');%test for zoom activated on the current figure38 test_zoom=get(hhcurrentfig.CheckZoom,'Value');%test for zoom activated on the current figure 39 39 test_draw=0;%test for mouse drawing of object, =0 by default 40 40 test_object=0; %test for object editing or creation … … 279 279 end 280 280 end 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); 281 if ~isempty(text_displ_1) 282 set(handles.text_display,'String',[{text_displ_1};{text_displ_2};{text_displ_3};{text_displ_4}]) 283 else 284 set(handles.text_display,'String',get(handles.text_display,'UserData')) 285 end 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); 285 290 286 291 %%%%%%%%%%%%% -
trunk/src/mouse_up.m
r252 r292 43 43 testsubplot=0; 44 44 end 45 test_zoom=get(hhcurrentfig. zoom,'Value');45 test_zoom=get(hhcurrentfig.CheckZoom,'Value'); 46 46 47 47 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle … … 164 164 hh_plotfield=hhuvmat; 165 165 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 167 168 write_plot_param(hh_plotfield,PlotParam); %update the display of plotting parameters for the current object 168 169 end … … 272 273 % desactivate the zoom if the full field is visible within the axes 273 274 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]) 278 279 end 279 280 end … … 286 287 end 287 288 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))) 292 293 end 293 294 end -
trunk/src/plot_field.m
r252 r292 4 4 % This function is used by uvmat to plot fields. It automatically chooses the representation 5 5 % appropriate to the input field structure: 6 % 2D vector fields are represented by arrows, 2D scalar fie dlds 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). 7 7 % The input field structure is first tested by check_field_structure.m, 8 8 % then split into blocks of related variables by find_field_indices.m. 9 % The dimensionality of each block is obtained by this fu ction9 % The dimensionality of each block is obtained by this function 10 10 % considering the presence of variables with the attribute .Role='coord_x' 11 11 % and/or coord_y and/or coord_z (case of unstructured coordinates), or … … 52 52 % 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. 53 53 % 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 limits56 % . 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. 57 57 % --scalars-- 58 58 % .Scalar.MaxA: upper bound (saturation color) for the scalar representation, max(field) by default 59 59 % .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 field60 % .Scalar.CheckFixScal: =0 (default) lower and upper bounds of the scalar representation set to the min and max of the field 61 61 % =1 lower and upper bound imposed by .AMax and .MinA 62 % .Scalar. BW= 1 black and white representation imposed, =0 by default.63 % .Scalar.C ontours= 1: represent scalars by contour plots (Matlab function 'contour'); =0 by default62 % .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 64 64 % .IncrA : contour interval 65 65 % -- vectors-- 66 66 % .Vectors.VecScale: scale for the vector representation 67 % .Vectors. FixVec: =0 (default) automatic length for vector representation, =1: length set by .VecScale68 % .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 coordinate67 % .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 71 71 % -- vector color-- 72 72 % .Vectors.ColorCode= 'black','white': imposed color (default ='blue') … … 77 77 % .Vectors.colcode1 : first threshold for rgb, first value for'continuous' 78 78 % .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 .MaxC79 % .Vectors.CheckFixedCbounds; =0 (default): the bounds on C representation are min and max, =1: they are fixed by .Minc and .MaxC 80 80 % .Vectors.MinC = imposed minimum of the scalar field used for vector color; 81 81 % .Vectors.MaxC = imposed maximum of the scalar field used for vector color; 82 82 % 83 %84 83 % PosColorbar: if not empty, display a colorbar for B&W images 85 84 % imposed position of the colorbar (ex [0.821 0.471 0.019 0.445]) … … 102 101 103 102 function [PlotType,PlotParamOut,haxes]= plot_field(Data,haxes,PlotParam,PosColorbar) 104 % TODO:105 103 % use htext: handles of the text edit box (uicontrol) 106 104 % introduce PlotParam.Hold: 'on' or 'off' (for curves) … … 111 109 PlotType='text'; %default 112 110 PlotParamOut=PlotParam;%default 111 Coordinates=[]; 112 if isfield(PlotParam,'Coordinates') 113 Coordinates=PlotParam.Coordinates; 114 end 113 115 114 116 %% test axes and figure … … 175 177 176 178 %% 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* 178 180 set(haxes,'XLimMode', 'manual') 179 181 set(haxes,'YLimMode', 'manual') … … 182 184 set(haxes,'YLimMode', 'auto') 183 185 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) 188 190 set(haxes,'DataAspectRatioMode','manual') 189 191 set(haxes,'DataAspectRatio',[1 1 1]) … … 222 224 plot_profile([],[],[],haxes);% 223 225 else 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);% 225 227 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); 227 229 AxeData.ZoomAxes=zoomaxes; 230 end 231 if ~isempty(Coordinates) 232 PlotParamOut.Coordinates=Coordinates; 228 233 end 229 234 PlotType='line'; … … 242 247 end 243 248 if isfield(PlotParamOut,'MinX') 244 % 'TESTplot'245 % haxes246 % PlotParamOut.MinX247 % PlotParamOut.MaxY248 % set(haxes,'XLim',[PlotParamOut.MinX PlotParamOut.MaxX])249 % set(haxes,'YLim',[PlotParamOut.MinY PlotParamOut.MaxY])250 249 AxeData.RangeX=[PlotParamOut.MinX PlotParamOut.MaxX];%'[PlotParamOut.MinX PlotParamOut.MaxX]; 251 250 AxeData.RangeY=[PlotParamOut.MinY PlotParamOut.MaxY];%[PlotParamOut.MinY PlotParamOut.MaxY] … … 262 261 set(hfig,'UserData',FigData) 263 262 end 264 263 265 264 %------------------------------------------------------------------- 266 265 function errormsg=plot_text(FieldData,CellVarIndex,htext) 267 266 %------------------------------------------------------------------- 268 % if exist('hdisplay_in','var') && ~isempty(hdisplay_in) && ishandle(hdisplay_in) && isequal(get(hdisplay_in,'Type'),'uicontrol')269 % hdisplay=hdisplay_in;270 % else271 % figure;%create new figure272 % hdisplay=uicontrol('Style','edit', 'Units','normalized','Position', [0 0 1 1],'Max',2,'FontName','monospaced');273 % end274 267 errormsg=[]; 275 268 txt_cell={}; 276 269 for icell=1:length(CellVarIndex) 277 270 VarIndex=CellVarIndex{icell};% indices of the selected variables in the list data.ListVarName 278 % ff=fields(FieldData);%list of field names279 % vv=struct2cell(FieldData);%list of field values280 %281 % for icell=1:length(vv)282 271 for ivar=1:length(VarIndex) 283 272 VarName=FieldData.ListVarName{VarIndex(ivar)}; 284 eval(['VarValue=FieldData.' VarName ';'])273 VarValue=FieldData.(VarName); 285 274 if size(VarValue,1)~=1 286 275 VarValue=VarValue'; … … 290 279 end 291 280 end 292 293 281 set(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 282 set(htext,'UserData',txt_cell)% for storage during mouse display 340 283 341 284 %------------------------------------------------------------------- 342 function PlotParamOut=plot_profile(data,CellVarIndex,VarType,haxes,PlotParam)285 function CoordinatesOut=plot_profile(data,CellVarIndex,VarType,haxes,Coordinates) 343 286 %------------------------------------------------------------------- 344 287 345 if ~exist(' PlotParam','var')346 PlotParam=[];347 end 348 PlotParamOut=PlotParam; %default288 if ~exist('Coordinates','var') 289 Coordinates=[]; 290 end 291 CoordinatesOut=Coordinates; %default 349 292 hfig=get(haxes,'parent'); 350 293 %suppress existing plot isf empty data … … 361 304 end 362 305 363 364 306 ColorOrder=[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]; 365 307 set(haxes,'ColorOrder',ColorOrder) 366 if isfield( PlotParam,'NextPlot')367 set(haxes,'NextPlot', PlotParam.NextPlot)308 if isfield(Coordinates,'NextPlot') 309 set(haxes,'NextPlot',Coordinates.NextPlot) 368 310 end 369 311 % adjust the size of the plot to include the whole field, … … 372 314 373 315 %% prepare the string for plot command 374 %initiate the plot command375 316 plotstr='hhh=plot('; 376 % textmean={};377 317 coord_x_index=[]; 378 318 xtitle=''; … … 513 453 514 454 %% 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;455 CoordinatesOut.RangeX=[min(XMin) max(XMax)]; 456 CoordinatesOut.RangeY=[min(YMin_cell) max(YMax_cell)]; 457 fix_lim=isfield(Coordinates,'FixLimits') && Coordinates.FixLimits; 518 458 if 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') 520 460 fix_lim=0; %free limits if lits are not set, 521 461 end 522 462 end 523 463 if ~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); 528 468 end 529 469 … … 719 659 %% image or scalar plot %%%%%%%%%%%%%%%%%%%%%%%%%% 720 660 721 if ~isfield(PlotParam.Scalar,'C ontours')661 if ~isfield(PlotParam.Scalar,'CheckContours') 722 662 PlotParam.Scalar.Contours=0; %default 723 663 end -
trunk/src/read_GUI.m
r287 r292 43 43 end 44 44 if check_input 45 ['struct.' tag '=input;']46 eval(['struct.' tag '=input;'])45 struct.(tag)=input; 46 % eval(['struct.' tag '=input;']) 47 47 end 48 48 end -
trunk/src/set_object.m
r252 r292 759 759 return 760 760 end 761 PlotParam=read_plot_param(PlotHandles); 761 %PlotParam=read_plot_param(PlotHandles); 762 fighandle=get(plotaxes,'parent'); 763 PlotParam=read_GUI(fighandle); 762 764 [PlotType,Object_out{IndexObj}.PlotParam,plotaxes]=plot_field(ProjData,plotaxes,PlotParam);%update an existing field plot 763 765 -
trunk/src/uvmat.m
r278 r292 147 147 % = translate: translate an existing object 148 148 % = 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) 150 150 % .CurrentOrigin: Origin of a curently drawn edit_object 151 151 % .CurrentLine: currently drawn menuline (A REVOIR) 152 152 % .CurrentObject: handle of the currently drawn edit_object 153 % .CurrentRectZoom: current rectangle used for zoom153 % .CurrentRectZoom: current rectangle used for CheckZoom 154 154 155 155 % Properties attached to projection objects (create, menuline, menuplane...): … … 714 714 if isfield(imainfo,'Width') && isfield(imainfo,'Height') 715 715 if length(imainfo)>1 716 set(handles.n px,'String',num2str(imainfo(1).Width));%fills nbre of pixels x box717 set(handles.n py,'String',num2str(imainfo(1).Height));%fills nbre of pixels x box716 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 718 718 else 719 set(handles.n px,'String',num2str(imainfo.Width));%fills nbre of pixels x box720 set(handles.n py,'String',num2str(imainfo.Height));%fills nbre of pixels x box721 end 722 else 723 set(handles.n px,'String','');%fills nbre of pixels x box724 set(handles.n py,'String','');%fills nbre of pixels x box725 end 726 set(handles. BW,'Value',strcmp(ColorType,'grayscale'))% select handles.BW if grayscale image719 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 722 else 723 set(handles.num_Npx,'String','');%fills nbre of pixels x box 724 set(handles.num_Npy,'String','');%fills nbre of pixels x box 725 end 726 set(handles.CheckBW,'Value',strcmp(ColorType,'grayscale'))% select handles.CheckBW if grayscale image 727 727 728 728 % read parameters (time, geometric calibration..) from a documentation file (.xml advised) … … 783 783 elseif error==1, warntext='inconsistent number of fields in the .civ file'; 784 784 end 785 set(handles.n px,'String',num2str(npx));%fills nbre of pixels x box786 set(handles.n py,'String',num2str(npy));%fills nbre of pixels y box785 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 787 787 set(handles.pxcm,'String',num2str(pxcmx));%fills scale x (pixel/cm) box 788 788 set(handles.pycm,'String',num2str(pxcmy));%fills scale y (pixel/cm) box … … 842 842 set(handles.pycm,'String',num2str(pixcmy)) 843 843 end 844 if ~get(handles. FixLimits,'Value')844 if ~get(handles.CheckFixLimits,'Value') 845 845 set(handles.transform_fct,'Value',2); % phys transform by default if fixedLimits is off 846 846 end … … 900 900 col_vec={'get_field...'}; 901 901 end 902 set(handles. col_vec,'String',col_vec)902 set(handles.ListColorScalar,'String',col_vec) 903 903 end 904 904 end … … 1246 1246 end 1247 1247 if ~isempty(imainfo)% (an image has been introduced as second fierld input) 1248 if strcmp(get(handles.n px,'String'),'') || strcmp(get(handles.npy,'String'),'')%update npx and npy if it is not already filled by the first input field1248 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 1249 1249 if isfield(imainfo,'Width') && isfield(imainfo,'Height') 1250 set(handles.n px,'String',num2str(imainfo.Width));%fills nbre of pixels x box1251 set(handles.n py,'String',num2str(imainfo.Height));%fills nbre of pixels x box1250 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 1252 1252 else 1253 set(handles.n px,'String','');%fills nbre of pixels x box1254 set(handles.n py,'String','');%fills nbre of pixels x box1255 end 1256 set(handles. BW,'Value',strcmp(ColorType,'grayscale'))% select handles.BW if grayscale image1253 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 1257 1257 end 1258 1258 end … … 1290 1290 end 1291 1291 1292 set(handles.n px,'String',num2str(npx));%fills nbre of pixels x box1293 set(handles.n py,'String',num2str(npy));%fills nbre of pixels y box1292 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 1294 1294 set(handles.pxcm,'String',num2str(pxcmx));%fills scale x (pixel/cm) box 1295 1295 set(handles.pycm,'String',num2str(pxcmy));%fills scale y (pixel/cm) box … … 1683 1683 function runplus_Callback(hObject, eventdata, handles) 1684 1684 %------------------------------------------------------------------- 1685 eventdata1686 1685 set(handles.runplus,'BackgroundColor',[1 1 0])%paint the command button in yellow 1687 1686 drawnow … … 2115 2114 end 2116 2115 if strcmp(FieldName,'velocity') 2117 list_code=get(handles. color_code,'String');% list menu fields2118 index_code=get(handles. color_code,'Value');% selected string index2116 list_code=get(handles.ListColorCode,'String');% list menu fields 2117 index_code=get(handles.ListColorCode,'Value');% selected string index 2119 2118 if ~strcmp(list_code{index_code},'black') && ~strcmp(list_code{index_code},'white') 2120 list_code=get(handles. col_vec,'String');% list menu fields2121 index_code=get(handles. col_vec,'Value');% selected string index2119 list_code=get(handles.ListColorScalar,'String');% list menu fields 2120 index_code=get(handles.ListColorScalar,'Value');% selected string index 2122 2121 ParamIn.ColorVar= list_code{index_code}; % selected field 2123 2122 end … … 2156 2155 end 2157 2156 if isfield(ParamOut,'Npx')&& isfield(ParamOut,'Npy') 2158 set(handles.n px,'String',num2str(ParamOut.Npx));% display image size on the interface2159 set(handles.n py,'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)); 2160 2159 end 2161 2160 if isfield(ParamOut,'TimeIndex') … … 2235 2234 end 2236 2235 if strcmp(FieldName_1,'velocity') 2237 list_code=get(handles. color_code,'String');% list menu fields2238 index_code=get(handles. color_code,'Value');% selected string index2236 list_code=get(handles.ListColorCode,'String');% list menu fields 2237 index_code=get(handles.ListColorCode,'Value');% selected string index 2239 2238 if ~strcmp(list_code{index_code},'black') && ~strcmp(list_code{index_code},'white') 2240 list_code=get(handles. col_vec,'String');% list menu fields2241 index_code=get(handles. col_vec,'Value');% selected string index2239 list_code=get(handles.ListColorScalar,'String');% list menu fields 2240 index_code=get(handles.ListColorScalar,'Value');% selected string index 2242 2241 ParamIn.ColorVar= list_code{index_code}; % selected field 2243 2242 end … … 2268 2267 %% update uvmat interface 2269 2268 if isfield(ParamOut,'Npx') 2270 set(handles.n px,'String',num2str(ParamOut.Npx));% display image size on the interface2271 set(handles.n py,'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)); 2272 2271 elseif isfield(ParamOut_1,'Npx') 2273 set(handles.n px,'String',num2str(ParamOut_1.Npx));% display image size on the interface2274 set(handles.n py,'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)); 2275 2274 end 2276 2275 … … 2581 2580 UvData.Object{1}.DisplayHandle_uvmat=[]; %plane not visible in uvmat 2582 2581 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'); 2584 2583 if isempty(list_object) 2585 2584 list_object={''}; … … 2599 2598 %% reset the min and max of scalar if only the mask is displayed(TODO: check the need) 2600 2599 if 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') 2603 2602 end 2604 2603 … … 2625 2624 haxes(1)=handles.axes3; 2626 2625 end 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 2627 PlotParam{1}=read_GUI(handles.uvmat); 2628 keeplim(1)=get(handles.CheckFixLimits,'Value');% test for fixed graph limits 2629 2629 PosColorbar{1}=UvData.OpenParam.PosColorbar;%prescribe the colorbar position on the uvmat interface 2630 2630 … … 2640 2640 plot_handles{2}=guidata(view_field_handle); 2641 2641 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'); 2644 2645 PosColorbar{2}='*'; %TODO: deal with colorbar position on view_field 2645 2646 end … … 2650 2651 iobj=IndexObj(imap); 2651 2652 [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) 2654 2655 end 2655 2656 if ~isempty(errormsg) … … 2872 2873 2873 2874 %------------------------------------------------------------------- 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 %------------------------------------------------------------------- 2877 function CheckFixLimits_Callback(hObject, eventdata, handles) 2878 test=get(handles.CheckFixLimits,'Value'); 2878 2879 if 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]) 2881 else 2882 set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7]) 2882 2883 update_plot(handles); 2883 2884 end 2884 2885 2885 2886 %------------------------------------------------------------------- 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. 2888 function CheckFixEqual_Callback(hObject, eventdata, handles) 2889 test=get(handles.CheckFixEqual,'Value'); 2889 2890 if test 2890 set(handles. FixEqual,'BackgroundColor',[1 1 0])2891 set(handles.CheckFixEqual,'BackgroundColor',[1 1 0]) 2891 2892 cla(handles.axes3) 2892 2893 update_plot(handles); 2893 2894 else 2894 set(handles. FixEqual,'BackgroundColor',[0.7 0.7 0.7])2895 set(handles.CheckFixEqual,'BackgroundColor',[0.7 0.7 0.7]) 2895 2896 update_plot(handles); 2896 2897 % axis(handles.axes3,'image') … … 2901 2902 2902 2903 %------------------------------------------------------------------- 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 axes2910 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 %------------------------------------------------------------------- 2906 function CheckZoom_Callback(hObject, eventdata, handles) 2907 2908 if (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]) 2912 else 2913 set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7]) 2913 2914 end 2914 2915 … … 3258 3259 %common to Fields_1_Callback 3259 3260 if isequal(field,'image')||isequal(field_1,'image') 3260 set(handles. npx_title,'Visible','on')% visible npx,pxcm... buttons3261 set(handles. npy_title,'Visible','on')3262 set(handles.n px,'Visible','on')3263 set(handles.n py,'Visible','on')3264 else 3265 set(handles. npx_title,'Visible','off')% visible npx,pxcm... buttons3266 set(handles. npy_title,'Visible','off')3267 set(handles.n px,'Visible','off')3268 set(handles.n py,'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') 3265 else 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') 3269 3270 end 3270 3271 setfield(handles);% update the field structure ('civ1'....) … … 3446 3447 %common to Fields_Callback 3447 3448 if isequal(field,'image')||isequal(field_1,'image') 3448 set(handles. npx_title,'Visible','on')% visible npx,pxcm... buttons3449 set(handles. npy_title,'Visible','on')3450 set(handles.n px,'Visible','on')3451 set(handles.n py,'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') 3452 3453 % set(handles.fix_pair,'Value',0) 3453 3454 else 3454 set(handles. npx_title,'Visible','off')% visible npx,pxcm... buttons3455 set(handles. npy_title,'Visible','off')3456 set(handles.n px,'Visible','off')3457 set(handles.n py,'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') 3458 3459 % set(handles.fix_pair,'Value',1) 3459 3460 end … … 3574 3575 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 3575 3576 if 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]) 3578 3579 set(handles.edit_vect,'Value',0) 3579 3580 edit_vect_Callback(hObject, eventdata, handles) … … 3633 3634 set(handles.edit_vect,'BackgroundColor',[1 1 0]) 3634 3635 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]) 3637 3638 % set(handles.create,'Value',0) 3638 3639 % set(handles.create,'BackgroundColor',[0 1 0]) … … 3741 3742 3742 3743 %------------------------------------------------------------------ 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. 3744 3745 % 3745 function col_vec_Callback(hObject, eventdata, handles)3746 function ListColorScalar_Callback(hObject, eventdata, handles) 3746 3747 %------------------------------------------------------------------ 3747 3748 % edit the choice for color code 3748 list_code=get(handles. col_vec,'String');% list menu fields3749 index_code=get(handles. col_vec,'Value');% selected string index3749 list_code=get(handles.ListColorScalar,'String');% list menu fields 3750 index_code=get(handles.ListColorScalar,'Value');% selected string index 3750 3751 col_code= list_code{index_code(1)}; % selected field 3751 3752 if 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') 3757 3758 set_vec_col_bar(handles) 3758 3759 else 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') 3764 3765 if isequal(col_code,'ima_cor') 3765 set(handles. AutoVecColor,'Value',0)%fixed scale by default3766 set(handles. vec_col_bar,'Value',0)% 3 colors r,g,b by default3767 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); 3771 3772 % 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') 3774 3775 colcode1_Callback(hObject, eventdata, handles) 3775 set(handles. colcode2,'String','0.666')3776 set(handles.num_ColCode2,'String','0.666') 3776 3777 colcode2_Callback(hObject, eventdata, handles) 3777 3778 else 3778 set(handles. AutoVecColor,'Value',1)%auto scale between min,max by default3779 set(handles. vec_col_bar,'Value',1)% colormap 'jet' by default3780 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) 3784 3785 set_vec_col_bar(handles) 3785 3786 end … … 3793 3794 % -- Executes on slider movement to set the color code 3794 3795 % 3795 function slider1_Callback(hObject, eventdata, handles)3796 function Slider1_Callback(hObject, eventdata, handles) 3796 3797 %------------------------------------------------------------------ 3797 slider1=get(handles. slider1,'Value');3798 min_val=str2num(get(handles. min_vec,'String'));3799 max_val=str2num(get(handles. max_vec,'String'));3798 slider1=get(handles.Slider1,'Value'); 3799 min_val=str2num(get(handles.num_MinVec,'String')); 3800 max_val=str2num(get(handles.num_MaxVec,'String')); 3800 3801 col=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 needed3803 set(handles. slider2,'Value',col)3804 set(handles. colcode2,'String',num2str(col))3802 set(handles.num_ColCode1,'String',num2str(col)) 3803 if(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)) 3805 3806 end 3806 3807 colcode1_Callback(hObject, eventdata, handles) … … 3809 3810 % Executes on slider movement to set the color code 3810 3811 %---------------------------------------------------------------- 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'));3812 function Slider2_Callback(hObject, eventdata, handles) 3813 slider2=get(handles.Slider2,'Value'); 3814 min_val=str2num(get(handles.num_MinVec,'String')); 3815 max_val=str2num(get(handles.num_MaxVec,'String')); 3815 3816 col=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 needed3818 set(handles. slider1,'Value',col)3819 set(handles. colcode1,'String',num2str(col))3817 set(handles.num_ColCode2,'String',num2str(col)) 3818 if(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)) 3820 3821 end 3821 3822 colcode2_Callback(hObject, eventdata, handles) … … 3824 3825 %execute on return carriage on the edit box corresponding to slider 1 3825 3826 %---------------------------------------------------------------- 3826 function colcode1_Callback(hObject, eventdata, handles)3827 % col=str2num(get(handles. colcode1,'String'));3828 % set(handles. slider1,'Value',col)3827 function num_ColCode1_Callback(hObject, eventdata, handles) 3828 % col=str2num(get(handles.num_ColCode1,'String')); 3829 % set(handles.Slider1,'Value',col) 3829 3830 set_vec_col_bar(handles) 3830 3831 update_plot(handles); … … 3833 3834 %execute on return carriage on the edit box corresponding to slider 2 3834 3835 %---------------------------------------------------------------- 3835 function colcode2_Callback(hObject, eventdata, handles)3836 % col=str2num(get(handles. colcode2,'String'));3837 % set(handles. slider2,'Value',col)3836 function num_ColCode2_Callback(hObject, eventdata, handles) 3837 % col=str2num(get(handles.num_ColCode2,'String')); 3838 % set(handles.Slider2,'Value',col) 3838 3839 % slider2_Callback(hObject, eventdata, handles) 3839 3840 set_vec_col_bar(handles) … … 3842 3843 %update the slider values after displaying vectors 3843 3844 %-------------------------------------------------------- 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) 3849 3850 % set(handles.min_title_vec,'String',num2str(minC)) 3850 % set(handles. max_vec,'String',num2str(maxC))3851 % set(handles.num_MaxVec,'String',num2str(maxC)) 3851 3852 % if auto 3852 % set(handles. colcode1,'String',num2str(colcode1,3))%update display3853 % 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)) 3854 3855 % end 3855 % set(handles. slider1,'Value',colcode1)%update slider with constant display3856 % set(handles. slider2,'Value',colcode2)3856 % set(handles.Slider1,'Value',num_ColCode1)%update slider with constant display 3857 % set(handles.Slider2,'Value',num_ColCode2) 3857 3858 % set_vec_col_bar(handles) 3858 3859 3859 3860 3860 3861 %------------------------------------------------------- 3861 % --- Executes on button press in AutoVecColor.3862 % --- Executes on button press in CheckFixVecColor. 3862 3863 %------------------------------------------------------- 3863 function vec_col_bar_Callback(hObject, eventdata, handles)3864 function VecColBar_Callback(hObject, eventdata, handles) 3864 3865 set_vec_col_bar(handles) 3865 3866 … … 3924 3925 end 3925 3926 3926 set(handles. FixLimits,'Value',0)3927 set(handles. FixLimits,'BackgroundColor',[0.7 0.7 0.7])3927 set(handles.CheckFixLimits,'Value',0) 3928 set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7]) 3928 3929 3929 3930 %delete drawn objects … … 4041 4042 end 4042 4043 end 4043 % set(haxes,'XLimMode','auto')%reset auto mode (after zoom effect)4044 % set(haxes,'XLimMode','auto')%reset auto mode (after CheckZoom effect) 4044 4045 % set(haxes,'YLimMode','auto') 4045 4046 % PlotParam.Auto_xy=1; … … 4053 4054 4054 4055 %------------------------------------------------------------------------ 4055 function MinX_Callback(hObject, eventdata, handles)4056 %------------------------------------------------------------------------ 4057 set(handles. FixLimits,'Value',1) %suppress auto mode4058 set(handles. FixLimits,'BackgroundColor',[1 1 0])4056 function num_MinX_Callback(hObject, eventdata, handles) 4057 %------------------------------------------------------------------------ 4058 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 4059 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 4059 4060 update_plot(handles); 4060 4061 4061 4062 %------------------------------------------------------------------------ 4062 function MaxX_Callback(hObject, eventdata, handles)4063 %------------------------------------------------------------------------ 4064 set(handles. FixLimits,'Value',1) %suppress auto mode4065 set(handles. FixLimits,'BackgroundColor',[1 1 0])4063 function num_MaxX_Callback(hObject, eventdata, handles) 4064 %------------------------------------------------------------------------ 4065 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 4066 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 4066 4067 update_plot(handles); 4067 4068 4068 4069 %------------------------------------------------------------------------ 4069 function MinY_Callback(hObject, eventdata, handles)4070 function num_MinY_Callback(hObject, eventdata, handles) 4070 4071 %------------------------------------------ 4071 set(handles. FixLimits,'Value',1) %suppress auto mode4072 set(handles. FixLimits,'BackgroundColor',[1 1 0])4072 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 4073 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 4073 4074 update_plot(handles); 4074 4075 4075 4076 %------------------------------------------------------------------------ 4076 function MaxY_Callback(hObject, eventdata, handles)4077 %------------------------------------------------------------------------ 4078 set(handles. FixLimits,'Value',1) %suppress auto mode4079 set(handles. FixLimits,'BackgroundColor',[1 1 0])4077 function num_MaxY_Callback(hObject, eventdata, handles) 4078 %------------------------------------------------------------------------ 4079 set(handles.CheckFixLimits,'Value',1) %suppress auto mode 4080 set(handles.CheckFixLimits,'BackgroundColor',[1 1 0]) 4080 4081 update_plot(handles); 4081 4082 4082 4083 %------------------------------------------------------------------------ 4083 function MinA_Callback(hObject, eventdata, handles)4084 function num_MinA_Callback(hObject, eventdata, handles) 4084 4085 %------------------------------------------ 4085 set(handles. FixScal,'Value',1) %suppress auto mode4086 set(handles. FixScal,'BackgroundColor',[1 1 0])4087 MinA=str2double(get(handles. MinA,'String'));4088 MaxA=str2double(get(handles. MaxA,'String'));4086 set(handles.CheckFixScalar,'Value',1) %suppress auto mode 4087 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0]) 4088 MinA=str2double(get(handles.num_MinA,'String')); 4089 MaxA=str2double(get(handles.num_MaxA,'String')); 4089 4090 if MinA>MaxA% switch minA and maxA in case of error 4090 4091 MinA_old=MinA; 4091 4092 MinA=MaxA; 4092 4093 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)); 4095 4096 end 4096 4097 update_plot(handles); 4097 4098 4098 4099 %------------------------------------------------------------------------ 4099 function MaxA_Callback(hObject, eventdata, handles)4100 %------------------------------------------------------------------------ 4101 set(handles. FixScal,'Value',1) %suppress auto mode4102 set(handles. FixScal,'BackgroundColor',[1 1 0])4103 MinA=str2double(get(handles. MinA,'String'));4104 MaxA=str2double(get(handles. MaxA,'String'));4100 function num_MaxA_Callback(hObject, eventdata, handles) 4101 %------------------------------------------------------------------------ 4102 set(handles.CheckFixScalar,'Value',1) %suppress auto mode 4103 set(handles.CheckFixScalar,'BackgroundColor',[1 1 0]) 4104 MinA=str2double(get(handles.num_MinA,'String')); 4105 MaxA=str2double(get(handles.num_MaxA,'String')); 4105 4106 if MinA>MaxA% switch minA and maxA in case of error 4106 4107 MinA_old=MinA; 4107 4108 MinA=MaxA; 4108 4109 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)); 4111 4112 end 4112 4113 update_plot(handles); 4113 4114 4114 4115 %------------------------------------------------------------------------ 4115 function FixScal_Callback(hObject, eventdata, handles)4116 %------------------------------------------------------------------------ 4117 test=get(handles. FixScal,'Value');4116 function CheckFixScalar_Callback(hObject, eventdata, handles) 4117 %------------------------------------------------------------------------ 4118 test=get(handles.CheckFixScalar,'Value'); 4118 4119 if 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]) 4121 else 4122 set(handles.CheckFixScalar,'BackgroundColor',[0.7 0.7 0.7]) 4122 4123 update_plot(handles); 4123 4124 end 4124 4125 4125 4126 %------------------------------------------------------------------- 4126 function BW_Callback(hObject, eventdata, handles)4127 function CheckBW_Callback(hObject, eventdata, handles) 4127 4128 %------------------------------------------------------------------- 4128 4129 update_plot(handles); 4129 4130 4130 4131 %------------------------------------------------------------------- 4131 function Contours_Callback(hObject, eventdata, handles)4132 %------------------------------------------------------------------- 4133 val=get(handles. Contours,'Value');4132 function ListContour_Callback(hObject, eventdata, handles) 4133 %------------------------------------------------------------------- 4134 val=get(handles.ListContour,'Value'); 4134 4135 if val==2 4135 4136 set(handles.interval_txt,'Visible','on') 4136 set(handles. IncrA,'Visible','on')4137 set(handles.num_IncrA,'Visible','on') 4137 4138 else 4138 4139 set(handles.interval_txt,'Visible','off') 4139 set(handles. IncrA,'Visible','off')4140 set(handles.num_IncrA,'Visible','off') 4140 4141 end 4141 4142 update_plot(handles); 4142 4143 4143 4144 %------------------------------------------------------------------- 4144 function IncrA_Callback(hObject, eventdata, handles)4145 function num_IncrA_Callback(hObject, eventdata, handles) 4145 4146 %------------------------------------------------------------------- 4146 4147 update_plot(handles); 4147 4148 4148 4149 %------------------------------------------------------------------- 4149 function HideWarning_Callback(hObject, eventdata, handles)4150 function CheckHideWarning_Callback(hObject, eventdata, handles) 4150 4151 %------------------------------------------------------------------- 4151 4152 update_plot(handles); 4152 4153 4153 4154 %------------------------------------------------------------------- 4154 function HideFalse_Callback(hObject, eventdata, handles)4155 function CheckHideFalse_Callback(hObject, eventdata, handles) 4155 4156 %------------------------------------------------------------------- 4156 4157 update_plot(handles); 4157 4158 4158 4159 %------------------------------------------------------------------- 4159 function VecScale_Callback(hObject, eventdata, handles)4160 %------------------------------------------------------------------- 4161 set(handles. FixVec,'Value',1);4162 set(handles. FixVec,'BackgroundColor',[1 1 0])4160 function num_VecScale_Callback(hObject, eventdata, handles) 4161 %------------------------------------------------------------------- 4162 set(handles.CheckFixVectors,'Value',1); 4163 set(handles.CheckFixVectors,'BackgroundColor',[1 1 0]) 4163 4164 update_plot(handles); 4164 4165 4165 4166 %------------------------------------------------------------------- 4166 function FixVec_Callback(hObject, eventdata, handles)4167 %------------------------------------------------------------------- 4168 test=get(handles. FixVec,'Value');4167 function CheckFixVectors_Callback(hObject, eventdata, handles) 4168 %------------------------------------------------------------------- 4169 test=get(handles.CheckFixVectors,'Value'); 4169 4170 if test 4170 set(handles. FixVec,'BackgroundColor',[1 1 0])4171 set(handles.CheckFixVectors,'BackgroundColor',[1 1 0]) 4171 4172 else 4172 4173 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]) 4176 end 4177 4178 %------------------------------------------------------------------------ 4179 % --- Executes on selection change in CheckDecimate4 (nb_vec/4). 4180 function CheckDecimate4_Callback(hObject, eventdata, handles) 4180 4181 %------------------------------------------------------------------------ 4181 4182 update_plot(handles); 4182 4183 4183 4184 %------------------------------------------------------------------------ 4184 % --- Executes on selection change in color_code menu4185 function color_code_Callback(hObject, eventdata, handles)4185 % --- Executes on selection change in ListColorCode menu 4186 function ListColorCode_Callback(hObject, eventdata, handles) 4186 4187 %------------------------------------------------------------------------ 4187 4188 set_vec_col_bar(handles) … … 4189 4190 4190 4191 %------------------------------------------------------------------------ 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. 4193 function CheckFixVecColor_Callback(hObject, eventdata, handles) 4194 %------------------------------------------------------------------------ 4195 test=get(handles.CheckFixVecColor,'Value'); 4195 4196 if test 4196 set(handles. AutoVecColor,'BackgroundColor',[1 1 0])4197 set(handles.CheckFixVecColor,'BackgroundColor',[1 1 0]) 4197 4198 else 4198 4199 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]) 4202 end 4203 4204 %------------------------------------------------------------------------ 4205 % --- Executes on selection change in num_MaxVec. 4206 function num_MinVec_Callback(hObject, eventdata, handles) 4206 4207 %------------------------------------------------------------------------ 4207 4208 max_vec_Callback(hObject, eventdata, handles) 4208 4209 4209 4210 %------------------------------------------------------------------------ 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. 4212 function num_MaxVec_Callback(hObject, eventdata, handles) 4213 %------------------------------------------------------------------------ 4214 set(handles.CheckFixVecColor,'Value',1) 4214 4215 AutoVecColor_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');4216 min_val=str2num(get(handles.num_MinVec,'String')); 4217 max_val=str2num(get(handles.num_MaxVec,'String')); 4218 slider1=get(handles.Slider1,'Value'); 4219 slider2=get(handles.Slider2,'Value'); 4219 4220 colcode1=min_val+(max_val-min_val)*slider1; 4220 4221 colcode2=min_val+(max_val-min_val)*slider2; 4221 set(handles. colcode1,'String',num2str(colcode1))4222 set(handles. colcode2,'String',num2str(colcode2))4222 set(handles.num_ColCode1,'String',num2str(colcode1)) 4223 set(handles.num_ColCode2,'String',num2str(colcode2)) 4223 4224 update_plot(handles); 4224 4225 … … 4227 4228 function set_vec_col_bar(handles) 4228 4229 %------------------------------------------------------------------------ 4229 %get the image of the color display button ' vec_col_bar' in pixels4230 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 4231 set(handles.VecColBar,'Unit','pixel'); 4232 pos_vert=get(handles.VecColBar,'Position'); 4233 set(handles.VecColBar,'Unit','Normalized'); 4233 4234 width=ceil(pos_vert(3)); 4234 4235 height=ceil(pos_vert(4)); 4235 4236 4236 4237 %get slider indications 4237 list=get(handles. color_code,'String');4238 ichoice=get(handles. color_code,'Value');4238 list=get(handles.ListColorCode,'String'); 4239 ichoice=get(handles.ListColorCode,'Value'); 4239 4240 colcode.ColorCode=list{ichoice}; 4240 colcode.MinC=str2num(get(handles. min_vec,'String'));4241 colcode.MaxC=str2num(get(handles. max_vec,'String'));4241 colcode.MinC=str2num(get(handles.num_MinVec,'String')); 4242 colcode.MaxC=str2num(get(handles.num_MaxVec,'String')); 4242 4243 test3color=strcmp(colcode.ColorCode,'rgb') || strcmp(colcode.ColorCode,'bgr'); 4243 4244 if 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')); 4246 4247 end 4247 4248 colcode.FixedCbounds=0; … … 4256 4257 A(:,:,2)=A2'; 4257 4258 A(:,:,3)=A3'; 4258 set(handles. vec_col_bar,'Cdata',A)4259 set(handles.VecColBar,'Cdata',A) 4259 4260 4260 4261 … … 4265 4266 UvData=get(handles.uvmat,'UserData'); 4266 4267 AxeData=UvData.axes3; 4267 PlotParam=read_plot_param(handles); 4268 %PlotParam=read_plot_param(handles); 4269 PlotParam=read_GUI(handles.uvmat); 4268 4270 [PP,PlotParamOut]= plot_field(AxeData,haxes,PlotParam); 4269 4271 write_plot_param(handles,PlotParamOut); %update the auto plot parameters … … 4283 4285 set(handles.edit_object,'BackgroundColor',[1,1,0]) 4284 4286 %suppress the other options 4285 set(handles. zoom,'Value',0)4287 set(handles.CheckZoom,'Value',0) 4286 4288 zoom_Callback(hObject, eventdata, handles) 4287 4289 hgeometry_calib=findobj(allchild(0),'tag','geometry_calib'); … … 4396 4398 if option==1 ||option==2% lefet mouse selection, peroject the field: 4397 4399 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); 4399 4402 UvData.Object=update_obj(UvData,IndexObj,[]); 4400 4403 set(handles.uvmat,'UserData',UvData) … … 4587 4590 4588 4591 %suppress competing options 4589 set(handles. zoom,'Value',0)4590 set(handles. zoom,'BackgroundColor',[0.7 0.7 0.7])4592 set(handles.CheckZoom,'Value',0) 4593 set(handles.CheckZoom,'BackgroundColor',[0.7 0.7 0.7]) 4591 4594 set(handles.list_object_1,'Value',1) 4592 4595 % initiate display of GUI geometry_calib … … 5028 5031 set(handles.MenuObject,'checked','on') 5029 5032 set(handles.uvmat,'UserData',UvData) 5030 set(handles. zoom,'Value',0)5031 zoom_Callback(handles.uvmat, [], handles)5033 set(handles.CheckZoom,'Value',0) 5034 CheckZoom_Callback(handles.uvmat, [], handles) 5032 5035 set(handles.delete_object,'Visible','on') 5033 5036 set(handles.uvmat_title,'Visible','on') … … 5037 5040 function MenuRuler_Callback(hObject, eventdata, handles) 5038 5041 %------------------------------------------------------------------------ 5039 set(handles. zoom,'Value',0)5040 zoom_Callback(handles.uvmat, [], handles)5042 set(handles.CheckZoom,'Value',0) 5043 CheckZoom_Callback(handles.uvmat, [], handles) 5041 5044 set(handles.MenuRuler,'checked','on') 5042 5045 UvData=get(handles.uvmat,'UserData'); -
trunk/src/view_field.m
r231 r292 100 100 101 101 if isfield(PlotParamOut,'Vectors') 102 set(handles.V ECT_title,'Visible','on')102 set(handles.Vectors,'Visible','on') 103 103 end 104 104 write_plot_param(handles,PlotParamOut);% update the display of the plotting parameters … … 696 696 ProjField=ViewFieldData.axes3; 697 697 %ProjField=get(haxes,'UserData'); 698 PlotParam=read_ plot_param(handles);698 PlotParam=read_GUI(handles.view_field); 699 699 [PlotType,PlotParamOut]= plot_field(ProjField,haxes,PlotParam,1); 700 700 write_plot_param(handles,PlotParamOut); %update the auto plot parameters … … 741 741 742 742 743 744 745 % --- Executes on button press in CheckZoom. 746 function 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. 755 function 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 764 function 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. 774 function 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. 781 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 782 set(hObject,'BackgroundColor','white'); 783 end 784 785 786 787 function 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. 797 function 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 806 function 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 816 function 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. 826 function 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. 836 function 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 845 function 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. 855 function 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. 862 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 863 set(hObject,'BackgroundColor','white'); 864 end 865 866 867 868 function 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. 878 function 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. 885 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 886 set(hObject,'BackgroundColor','white'); 887 end 888 889 890 891 function 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. 901 function 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 910 function 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 920 function 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. 930 function 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 939 function 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. 949 function 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. 959 function 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. 969 function 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. 976 function 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. 986 function 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. 992 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 993 set(hObject,'BackgroundColor',[.9 .9 .9]); 994 end 995 996 997 % --- Executes on slider movement. 998 function 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. 1008 function 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. 1014 if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 1015 set(hObject,'BackgroundColor',[.9 .9 .9]); 1016 end 1017 1018 1019 1020 function 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. 1030 function 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. 1037 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 1038 set(hObject,'BackgroundColor','white'); 1039 end 1040 1041 1042 1043 function 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. 1053 function 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. 1060 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 1061 set(hObject,'BackgroundColor','white'); 1062 end 1063 1064 1065 % --- Executes on button press in checkbox52. 1066 function 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 1075 function 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. 1085 function 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. 1092 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 1093 set(hObject,'BackgroundColor','white'); 1094 end 1095 1096 1097 % --- Executes on button press in CheckDecimate4. 1098 function 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. 1107 function 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 1116 function 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. 1126 function 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. 1133 if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor')) 1134 set(hObject,'BackgroundColor','white'); 1135 end 1136 1137 1138 % --- Executes on button press in CheckHideWarnin. 1139 function 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 4 4 if isfield(PlotParam,'FixEqual') 5 5 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]) 8 8 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]) 11 11 end 12 12 end 13 13 if 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)); 18 18 else 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',''); 23 23 end 24 24 … … 27 27 set_scal_display(handles,'on') 28 28 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)); 30 30 end 31 31 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)); 33 33 end 34 34 35 35 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)) 37 37 end 38 38 else … … 44 44 set_vect_display(handles,'on') 45 45 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)) 47 47 end 48 48 if isfield(PlotParam.Vectors,'MinC')&& isfield(PlotParam.Vectors,'MaxC') … … 87 87 function set_scal_display(handles,state) 88 88 %------------------------------------------------------------------ 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) 89 set(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) 104 102 105 103 %--------------------------------------------- … … 107 105 function set_vect_display(handles,state) 108 106 %------------------------------------------------------------------ 109 set(handles. frame_vect,'Visible',state)107 set(handles.Vectors,'Visible',state) 110 108 % 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) 117 134 % 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.