- Timestamp:
- Mar 1, 2014, 10:46:51 AM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/keyboard_callback.m
r713 r726 50 50 uvmat('runmin_Callback',hObject,eventdata,handleshaxes) 51 51 otherwise 52 if ischar(get(gco,'Tag')) 52 53 switch get(gco,'tag')% tag of the current edit box 53 54 case {'RootPath', 'SubDir','RootFile','FileExt','RootPath_1', 'SubDir_1','RootFile_1','FileExt_1'} 54 set(handleshaxes.InputFileREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (int yroduce the whole series)55 set(handleshaxes.InputFileREFRESH,'BackgroundColor',[1 0 1])%indicat that REFRESH must be activated (introduce the whole series) 55 56 case 'num_IndexIncrement'% no action 56 57 otherwise 58 if isfield(handleshaxes,'REFRESH') 57 59 set(handleshaxes.REFRESH,'BackgroundColor',[1 0 1])%indicat that run0 must be activated 60 elseif strcmp(get(gco,'Type'),'uicontrol') 61 set(gco,'BackgroundColor',[1 0 1])%indicate that the edition must be validated by carriage return 62 end 63 end 58 64 end 59 65 end -
trunk/src/msgbox_uvmat.m
r713 r726 62 62 set(handles.Cancel,'Position',[300 2 60 30]) 63 63 set(handles.Cancel,'FontSize',15) 64 % set(hObject,'WindowKeyPressFcn',{'@keyboard_callback',handles})%set keyboard action function64 % set(hObject,'WindowKeyPressFcn',{'keyboard_callback',handles})%set keyboard action function 65 65 66 66 % Update handles structure … … 280 280 end 281 281 282 %'keyboard_callback:' function activated when a key is pressed on the keyboard 283 %----------------------------------- 284 function keyboard_callback(hObject,eventdata,handleshaxes) 285 cur_axes=get(hObject,'CurrentAxes');%current plotting axes of the figure with handle hObject 286 xx=double(get(hObject,'CurrentCharacter')) %get the keyboard character 287 288 289 282 283 284 -
trunk/src/uvmat.m
r717 r726 2055 2055 %% initialisation 2056 2056 pointer=get(handles.uvmat,'Pointer'); 2057 if strcmp(pointer,'watch')% reinitialise the mouse if stuck to 'watch' 2058 set(handles.CheckZoom,'Value',0) 2059 pointer='arrow'; 2060 end 2057 2061 set(handles.uvmat,'Pointer','watch') 2058 2062 drawnow … … 3133 3137 GetFieldData=get_field(FileName,ParamIn);% inport field names from the GUI get_field 3134 3138 FieldList={}; 3135 VecColorList={ };3139 VecColorList={''}; 3136 3140 switch GetFieldData.FieldOption 3137 3141 case 'vectors' -
trunk/src/view_field.m
r717 r726 119 119 %% reset position of text_display and TableDisplay 120 120 % reset position of text_display 121 set(handles.text_display,'Units','pixels'); 121 122 pos_1=get(handles.text_display,'Position');% [lower x lower y width height] for text_display 122 123 pos_1(1)=size_fig(3)-pos_1(3); % set text display to the right of the fig … … 401 402 runpm(hObject,eventdata,handles,increment) 402 403 403 % %-------------------------------------------------------------------404 % %Executes on button press in runmin: make one step backward and call405 % %run0. The step backward is along the fields series 1 or 2 depending on406 % %the scan_i and scan_j check box (exclusive each other)407 % %-------------------------------------------------------------------408 % function RunMovie_Callback(hObject, eventdata, handles)409 % %------------------------------------------------------------------410 % set(handles.RunMovie,'BackgroundColor',[1 1 0])%paint the command button in yellow411 % drawnow412 % increment=str2num(get(handles.increment_scan,'String')); %get the field increment d413 % set(handles.STOP,'Visible','on')414 % set(handles.speed,'Visible','on')415 % set(handles.speed_txt,'Visible','on')416 % set(handles.RunMovie,'BusyAction','queue')417 % testavi=0;418 % UvData=get(handles.view_field,'UserData');419 %420 % while get(handles.speed,'Value')~=0 & isequal(get(handles.RunMovie,'BusyAction'),'queue') % enable STOP command421 % runpm(hObject,eventdata,handles,increment)422 % pause(1.02-get(handles.speed,'Value'))% wait for next image423 % end424 % if isfield(UvData,'aviobj') && ~isempty( UvData.aviobj),425 % UvData.aviobj=close(UvData.aviobj);426 % set(handles.view_field,'UserData',UvData);427 % end428 % set(handles.RunMovie,'BackgroundColor',[1 0 0])%paint the command buttonback to red429 430 404 %------------------------------------------------------------------------ 431 405 % --- translate coordinate to matrix index … … 449 423 %------------------------------------------------------------------------ 450 424 function CheckZoomFig_Callback(hObject, eventdata, handles) 451 452 425 if get(handles.CheckZoomFig,'Value') 453 426 set(handles.CheckZoom,'value',0) 454 427 end 455 428 456 %------------------------------------------------------------------- 429 %------------------------------------------------------------------------ 457 430 % --- Executes on button press in 'FixLimits'. 458 %------------------------------------------------------------------- 431 %------------------------------------------------------------------------ 459 432 function CheckFixLimits_Callback(hObject, eventdata, handles) 460 433 test=get(handles.CheckFixLimits,'Value'); 461 % if test462 % set(handles.CheckFixLimits,'BackgroundColor',[1 1 0])463 % else464 % set(handles.CheckFixLimits,'BackgroundColor',[0.7 0.7 0.7])465 % end466 434 update_plot(handles) 467 435 468 %-------------------------------------------------------------------436 %------------------------------------------------------------------------ 469 437 % --- Executes on button press in CheckFixAspectRatio. 438 %------------------------------------------------------------------------ 470 439 function CheckFixAspectRatio_Callback(hObject, eventdata, handles) 471 %-------------------------------------------------------------------472 440 if get(handles.CheckFixAspectRatio,'Value') 473 441 update_plot(handles); … … 476 444 end 477 445 478 %------------------------------------------------------------------- 446 %------------------------------------------------------------------------ 479 447 function num_AspectRatio_Callback(hObject, eventdata, handles) 480 %------------------------------------------------------------------- 448 %------------------------------------------------------------------------ 481 449 set(handles.CheckFixAspectRatio,'Value',1)% select the fixed aspect ratio button 482 450 update_plot(handles); 483 484 %-------------------------------------------------------------------485 486 % %-------------------------------------------------------------------487 % %----Executes on button press in 'record': records the current flags of manual correction.488 % %-------------------------------------------------------------------489 % function record_Callback(hObject, eventdata, handles)490 % % [filebase,num_i1,num_j1,num_i2,num_j2,Ext,NomType,SubDir]=read_input_file(handles);491 % filename=read_file_boxes(handles);492 % AxeData=get(gca,'UserData');493 % [erread,message]=fileattrib(filename);494 % if ~isempty(message) && ~isequal(message.UserWrite,1)495 % msgbox_view_field('ERROR',['no writting access to ' filename])496 % return497 % end498 % test_civ2=isequal(get(handles.civ2,'BackgroundColor'),[1 1 0]);499 % test_civ1=isequal(get(handles.civ1,'BackgroundColor'),[1 1 0]);500 % if ~test_civ2 && ~test_civ1501 % msgbox_view_field('ERROR','manual correction only possible for CIV1 or CIV2 velocity fields')502 % end503 % if test_civ2504 % nbname='nb_vectors2';505 % flagname='vec2_FixFlag';506 % attrname='fix2';507 % end508 % if test_civ1509 % nbname='nb_vectors';510 % flagname='vec_FixFlag';511 % attrname='fix';512 % end513 % %write fix flags in the netcdf file514 % hhh=which('netcdf.open');% look for built-in matlab netcdf library515 % if ~isequal(hhh,'')% case of new builtin Matlab netcdf library516 % nc=netcdf.open(filename,'NC_WRITE');517 % netcdf.reDef(nc)518 % netcdf.putAtt(nc,netcdf.getConstant('NC_GLOBAL'),attrname,1)519 % dimid = netcdf.inqDimID(nc,nbname);520 % try521 % varid = netcdf.inqVarID(nc,flagname);% look for already existing fixflag variable522 % catch523 % varid=netcdf.defVar(nc,flagname,'double',dimid);%create fixflag variable if it does not exist524 % end525 % netcdf.endDef(nc)526 % netcdf.putVar(nc,varid,AxeData.FF);527 % netcdf.close(nc)528 % else %old netcdf library529 % netcdf_toolbox(filename,AxeData,attrname,nbname,flagname)530 % end531 %532 % function netcdf_toolbox(filename,AxeData,attrname,nbname,flagname)533 % nc=netcdf(filename,'write'); %open netcdf file534 % result=redef(nc);535 % eval(['nc.' attrname '=1;']);536 % theDim=nc(nbname) ;% get the number of velocity vectors537 % nb_vectors=size(theDim);538 % var_FixFlag=ncvar(flagname,nc);% var_FixFlag will be written as the netcdf variable vec_FixFlag539 % var_FixFlag(1:nb_vectors)=AxeData.FF;%540 % fin=close(nc);541 542 451 543 452 %------------------------------------------------------------------- … … 855 764 [PP,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam); 856 765 errormsg=fill_GUI(PlotParamOut,handles.view_field); 857 if ~isempty(errormsg) 858 msgbox_uvmat('ERROR',errormsg) 859 return 860 end 861 %write_plot_param(handles,PlotParamOut); %update the auto plot parameters 766 if ~isempty(errormsg) 767 msgbox_uvmat('ERROR',errormsg) 768 return 769 end 770 hedit=findobj(handles.view_field,'Style','edit'); 771 set(hedit,'BackgroundColor',[1 1 1]) 862 772 863 773 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.