- Timestamp:
- Aug 2, 2012, 3:12:48 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/src/mouse_up.m ¶
r483 r511 143 143 else 144 144 hhview_field=guidata(hview_field); 145 [PlotType,PlotParam]=plot_field(ProjData,hhview_field. axes3,read_GUI(hview_field));%update an existing plot in view_field145 [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%update an existing plot in view_field 146 146 write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object 147 147 end 148 148 ViewFieldData=get(hview_field,'UserData'); 149 % ViewFieldData. axes3=ProjData;149 % ViewFieldData.PlotAxes=ProjData; 150 150 haxes=findobj(hview_field,'tag','axes3'); 151 151 if strcmp(get(haxes,'Visible'),'off')%sempty(PlotParam.Coordinates)% case of no plot display (pure text table) … … 160 160 end 161 161 else 162 UvData. axes3=ProjData;163 [PlotType,PlotParam]=plot_field(ProjData,hhuvmat. axes3,read_GUI(hhuvmat));%update an existing field plot162 UvData.PlotAxes=ProjData; 163 [PlotType,PlotParam]=plot_field(ProjData,hhuvmat.PlotAxes,read_GUI(hhuvmat));%update an existing field plot 164 164 write_plot_param(hhuvmat,PlotParam); %update the display of plotting parameters for the current object 165 165 end -
TabularUnified trunk/src/plot_field.m ¶
r501 r511 255 255 if ~isempty(index_2D)|| ~isempty(index_1D) 256 256 FigData=get(hfig,'UserData'); 257 % if strcmp(get(hfig,'tag'),'view_field') 258 % set(hfig,'UserData',[]); % refresh user data in view_field (set by civ/TestCiv ) 259 % end 260 tagaxes=get(haxes,'tag');% tag of the current plot axis 261 if isfield(FigData,tagaxes) 262 FigData.(tagaxes)=Data; 257 if strcmp(get(hfig,'tag'),'view_field')||strcmp(get(hfig,'tag'),'uvmat') 258 FigData.(get(haxes,'tag'))=Data; 263 259 set(hfig,'UserData',FigData) 264 260 end -
TabularUnified trunk/src/series/merge_proj.m ¶
r494 r511 225 225 end 226 226 end 227 if strcmp(Param.ProjObject.ProjMode,'filter') 228 check_tps=1; 229 end 230 if check_tps 231 SubDomain=1500; %default, estimated nbre of vectors in a subdomain used for tps 232 if isfield(Data{iview},'SubDomain') 233 SubDomain=Data{iview}.SubDomain;% 234 end 235 [Data{iview}.SubRange,Data{iview}.NbSites,Data{iview}.Coord_tps,Data{iview}.U_tps,Data{iview}.V_tps,tild,U_smooth,V_smooth,W_smooth,FF] =... 236 filter_tps([Data{iview}.X(Data{iview}.FF==0) Data{iview}.Y(Data{iview}.FF==0)],Data{iview}.U(Data{iview}.FF==0),Data{iview}.V(Data{iview}.FF==0),[],SubDomain,0); 237 nbvar=numel(Data{iview}.ListVarName); 238 Data{iview}.ListVarName=[Data{iview}.ListVarName {'SubRange','NbSites','Coord_tps','U_tps','V_tps'}]; 239 Data{iview}.VarDimName=[Data{iview}.VarDimName {{'nb_coord','nb_bounds','nb_subdomain'},{'nb_subdomain'},... 240 {'nb_tps','nb_coord','nb_subdomain'},{'nb_tps','nb_subdomain'},{'nb_tps','nb_subdomain'}}]; 241 Data{iview}.VarAttribute{nbvar+3}.Role='coord_tps'; 242 Data{iview}.VarAttribute{nbvar+4}.Role='vector_x'; 243 Data{iview}.VarAttribute{nbvar+5}.Role='vector_y'; 244 if isfield(Data{iview},'ListDimName')%cleaning 245 Data{iview}=rmfield(Data{iview},'ListDimName'); 246 end 247 if isfield(Data{iview},'DimValue')%cleaning 248 Data{iview}=rmfield(Data{iview},'DimValue'); 249 end 227 if ~isempty(Param.ProjObject)&& strcmp(Param.ProjObject.ProjMode,'filter')&&~isfield(Data{iview},'Coord_tps') 228 Data{iview}=calc_tps(Data{iview}); 250 229 end 251 230 -
TabularUnified trunk/src/set_object.m ¶
r508 r511 192 192 set(hhuvmat.ListObject,'Value',ObjIndex) 193 193 % draw all object colors in blue (unselected) in uvmat 194 hother=[findobj(hhuvmat. axes3,'Tag','proj_object');findobj(hhuvmat.axes3,'Tag','DeformPoint')];%find all the proj object and deform point representations194 hother=[findobj(hhuvmat.PlotAxes,'Tag','proj_object');findobj(hhuvmat.PlotAxes,'Tag','DeformPoint')];%find all the proj object and deform point representations 195 195 for iobj=1:length(hother) 196 196 if isequal(get(hother(iobj),'Type'),'rectangle')||isequal(get(hother(iobj),'Type'),'patch') … … 475 475 UvData.Object{IndexObj}.DisplayHandle.uvmat=obj_handle; %preserve the object plot handle if valid 476 476 else 477 UvData.Object{IndexObj}.DisplayHandle.uvmat=hhuvmat. axes3; %axes taken as object display handle by defualt477 UvData.Object{IndexObj}.DisplayHandle.uvmat=hhuvmat.PlotAxes; %axes taken as object display handle by defualt 478 478 end 479 479 %set(hhuvmat.edit_object,'Value',1)% set the current object to edit mode … … 496 496 end 497 497 if isequal(IndexObj_1,IndexObj) % if the projection is in uvmat 498 PlotType=plot_field(ProjData,hhuvmat. axes3,read_GUI(get(hhuvmat.axes3,'parent')));%update the current uvmat plot498 PlotType=plot_field(ProjData,hhuvmat.PlotAxes,read_GUI(get(hhuvmat.PlotAxes,'parent')));%update the current uvmat plot 499 499 else % if the projection is in view_field 500 500 hview_field=findobj(allchild(0),'tag','view_field'); … … 503 503 else 504 504 hhview_field=guidata(hview_field); 505 [PlotType,PlotParam]=plot_field(ProjData,hhview_field. axes3,read_GUI(hview_field));%update an existing plot in view_field505 [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%update an existing plot in view_field 506 506 write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object 507 507 end -
TabularUnified trunk/src/uvmat.m ¶
r508 r511 28 28 %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 29 29 % 30 % Information stored on the interface: 31 % 'Strings' of all edit boxes and menus: get(handles.Tag,'String') 32 % 'Values' of all menus and toggle buttons: get(handles.Tag,'Value') 33 % Matlab structure called UvData stored as 'UserData' of the figure uvmat.fig,(can be obtained by right mouse click on the interface). 34 % It contains the following fields: 35 % - Fixed specifiacation of plotting figures and axes (defined bu uvmat_OpeningFcn) 36 % .PosColorbar: [0.8210 0.4710 0.0190 0.4450]; specified position of the colorbar on figures 37 % - Information read in the documentation open of a series (activated by RootPath_Callback) : 38 % .XmlData, with fields: 39 % .Time: matrix of times of the images with index i and j 40 % .GeometryCalib: [1x1 struct] 41 % - Information defined from the interface: 42 % .NewSeries: =1 when the first view of a new field series is displayed, else 0 43 % .FileName:(char string) 44 % .FieldName: (char string) main field selected('image', 'velocity'...) 45 % .CName: (char string)name of the scalar used for vector colors 46 % .MovieObject{1}: movie object representing an input movie 47 % .MovieObject{2}: idem for a second input series (_1) 48 % .FileName_1 : last second input file name (to deal with a constant second input without reading again the file) 49 % .ZMin, .ZMax: range of the z coordinate 50 %..... to complement 51 % - Information on projection objects 52 % .Object: {[1x1 struct]} 53 % .CurrentObjectIndex: index of the projection object .Object currently selected for editing 54 % -Information on the current field (Field{i}) 55 % .Txt : text information to display (e.g. error message) 56 % .NbDim: number of dimensions (=0 by default) 57 % .NbCoord: number of vector components 58 % .CoordType: expresses the type of coordinate ('px' for image, 'sig' for instruments, or 'phys') 59 % .dt: time interval for the corresponding image pair 60 % .Mesh: estimated typical distance between vectors 61 % .ZMax: 62 % .ZMin: 63 % .X, .Y, .Z: set of vector coordinates 64 % .U,.V,.W: corresponding set of vector components 65 % .F: corresponding set of warning flags 66 % .FF: corresponding set of false flags, =0 for good vectors 67 % .C: corresponding values of the scalar used for vector color 68 % (.X, .Y, .Z,.U,.V,.W,.F,.FF,.C are matlab vectors of the same length, 69 % equal to the number of vectors stored in the input open) 70 % .CName: name of the scalar .C 71 % .CType: type of the scalar .C, setting how the scalar is obtained (see 'Scalars' below) 72 % .A image or scalar 73 % .AX: vector of dimension 2 representing the first and last values 74 % of the X coordinates for the image or scalar known on a regular grid, 75 % or vector of dimension .A for a scaler defined on irregular grid. 76 % .AY: same as .AX along the Y direction 77 % .AName: name of the scalar, ='image' for an image 30 % Information stored on the interface:(use 'Export/field in workspace' in 31 % the menu bar of uvmat to retrieve it) 32 % .OpenParam: structure containing parameters defined when uvmat is opened 33 % .PosColorbar: position (1x4 vector)of the colorbar (relative to the fig uvmat) 34 % .PosSetObject: position of set_object 35 % .PosGeometryCalib: size of set_object 36 % .NbBuiltin: nbre of functions always displayed in transform_fct menu 37 % .Object: cell array of structures representing the current projection objects, as produced by 'set_object.m'={[]} by default 38 % .NewSeries: =0/1 flag telling whether a new field series has been opened 39 % .FileName_1: name of the current second field (used to detect a constant field during file scanning) 40 % .FileType: current file type, as defined by the fct get_file_type.m) 41 % .i1_series,.i2_series,.j1_series,.j1_series: series of i1,i2,j1,j2 indices detected in the input dir,set by the fct find_file_series 42 % .MovieObject: current movie object 43 % .TimeUnit: unit for time 44 % .XmlData: cell array of 1 or 2 structures representing the xml files associated with the input fields (containing timing and geometry calibration) 45 % .Field: cell array of 1 or 2 structures representing the current input field(s) 46 % .PlotAxes: field structure representing the current field plotted on the main axes (used for mouse operations) 47 % .HistoAxes: idem for histogram axes 78 48 79 49 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DATA FLOW (for run0_Callback) %%%%%%%%%%%%%%%%%%%%: … … 111 81 % | 112 82 % plot_field.m: plot the projected fields and store them as | 113 % UvData. axes3|83 % UvData.PlotAxes | 114 84 % | 115 85 % AxeData … … 214 184 movegui(hObject,'center') 215 185 UvData.OpenParam.PosColorbar=[0.805 0.022 0.019 0.445]; 216 UvData.OpenParam.SetObjectOrigin=[-0.05 -0.03]; %position for set_object 217 UvData.OpenParam.SetObjectSize=[0.3 0.7]; 218 UvData.OpenParam.CalOrigin=[0.95 -0.03];%position for geometry_calib (TO IMPROVE) 219 UvData.OpenParam.CalSize=[0.28 1]; 220 UvData.axes3=[];%initiate the record of plotted field 221 UvData.axes2=[]; 222 UvData.axes1=[]; 186 UvData.OpenParam.PosSetObject=[-0.05 -0.03 0.3 0.7]; %position for set_object 187 UvData.OpenParam.PosGeometryCalic=[0.95 -0.03 0.28 1 ];%position for geometry_calib (TO IMPROVE) 188 % UvData.OpenParam.CalSize=[0.28 1]; 189 % UvData.PlotAxes=[];%initiate the record of plotted field 190 % UvData.axes2=[]; 191 % UvData.axes1=[]; 223 192 AxeData.LimEditBox=1; %initialise AxeData 224 set(handles. axes3,'UserData',AxeData)193 set(handles.PlotAxes,'UserData',AxeData) 225 194 226 195 %% set functions for the mouse and keyboard … … 231 200 set(hObject,'DeleteFcn',{@closefcn})% 232 201 233 %% refresh projection plane202 %% initialisation 234 203 % set(handles.ListObject,'Value',1)% default: empty projection objectproj_field 235 204 % set(handles.ListObject,'String',{''}) … … 238 207 set(handles.Fields,'Value',1) 239 208 set(handles.Fields,'string',{''}) 209 UvData.Object={[]}; 240 210 241 211 %% TRANSFORM menu: builtin fcts … … 332 302 if testinputfield 333 303 %delete drawn objects 334 hother=findobj(handles. axes3,'Tag','proj_object');%find all the proj objects304 hother=findobj(handles.PlotAxes,'Tag','proj_object');%find all the proj objects 335 305 for iobj=1:length(hother) 336 306 delete_object(hother(iobj)) … … 806 776 UvData=get(handles.uvmat,'UserData');%huvmat=handles of the uvmat interface 807 777 UvData.NewSeries=1; %flag for run0: begin a new series 808 UvData. TestInputFile=1;778 UvData.FileName_1='';% name of the current second field (used to detect a constant field during file scanning) 809 779 UvData.FileType{index}=FileType; 810 780 UvData.i1_series{index}=i1_series; … … 1059 1029 end 1060 1030 if isequal (diff_ref_i,diff_ref_i(1)*ones(size(diff_ref_i))) 1061 set(handles. increment_scan,'String',num2str(diff_ref_i(1)))1031 set(handles.num_IndexIncrement,'String',num2str(diff_ref_i(1))) 1062 1032 end 1063 1033 set(handles.scan_i,'Value',1) … … 1069 1039 end 1070 1040 if isequal (diff_ref_j,diff_ref_j(1)*ones(size(diff_ref_j))) 1071 set(handles. increment_scan,'String',num2str(diff_ref_j(1)))1041 set(handles.num_IndexIncrement,'String',num2str(diff_ref_j(1))) 1072 1042 end 1073 1043 set(handles.scan_j,'Value',1) … … 1395 1365 % uistack(hmask,'top') 1396 1366 else 1397 axes(handles. axes3)1367 axes(handles.PlotAxes) 1398 1368 hold on 1399 1369 size(flagmask) … … 1420 1390 drawnow 1421 1391 %TODO: introduce the option: increment ='*' to move to the next available view 1422 increment=str2num(get(handles. increment_scan,'String')); %get the field increment d1392 increment=str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d 1423 1393 % if isnan(increment) 1424 % set(handles. increment_scan,'String','1')%default value1394 % set(handles.num_IndexIncrement,'String','1')%default value 1425 1395 % increment=1; 1426 1396 % end … … 1439 1409 set(handles.runmin,'BackgroundColor',[1 1 0])%paint the command button in yellow 1440 1410 drawnow 1441 increment=-str2num(get(handles. increment_scan,'String')); %get the field increment d1411 increment=-str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d 1442 1412 % if isnan(increment) 1443 % set(handles. increment_scan,'String','1')%default value1413 % set(handles.num_IndexIncrement,'String','1')%default value 1444 1414 % increment=1; 1445 1415 % end … … 1456 1426 set(handles.Movie,'BackgroundColor',[1 1 0])%paint the command button in yellow 1457 1427 drawnow 1458 increment=str2num(get(handles. increment_scan,'String')); %get the field increment d1428 increment=str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d 1459 1429 % if isnan(increment) 1460 % set(handles. increment_scan,'String','1')%default value1430 % set(handles.num_IndexIncrement,'String','1')%default value 1461 1431 % increment=1; 1462 1432 % end … … 1487 1457 set(handles.MovieBackward,'BackgroundColor',[1 1 0])%paint the command button in yellow 1488 1458 drawnow 1489 increment=-str2num(get(handles. increment_scan,'String')); %get the field increment d1459 increment=-str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d 1490 1460 set(handles.STOP,'Visible','on') 1491 1461 set(handles.speed,'Visible','on') … … 1554 1524 [InputFile.RootPath_1,InputFile.SubDir_1,InputFile.RootFile_1,InputFile.FileIndex_1,InputFile.FileExt_1,InputFile.NomType_1]=read_file_boxes_1(handles); 1555 1525 [tild,tild,tild,i1_1,i2_1,j1_1,j2_1]=fileparts_uvmat(InputFile.FileIndex_1); 1556 % InputFile.NomType_1=get(handles.NomType_1,'String');1557 1526 else 1558 1527 filename_1=[]; … … 1585 1554 end 1586 1555 1587 % the pair i1-i2 or j1-j2 is free (check box CheckFixPair not selected): 1588 % the list of existing indices recorded in UvData is used 1556 % the pair i1-i2 or j1-j2 is free (check box CheckFixPair not selected): the list of existing indices recorded in UvData is used 1589 1557 else 1590 1558 UvData=get(handles.uvmat,'UserData'); … … 1607 1575 end 1608 1576 else % free increment 1609 if isequal(get(handles.runplus,'BackgroundColor'),[1 1 0])% if runplus is activated 1577 runaction=get(gcbo,'tag'); 1578 if strcmp(runaction,'runplus')||strcmp(runaction,'Movie')% if runplus or movie is activated 1610 1579 step=1; 1611 1580 else … … 1629 1598 errormsg='minimum j index reached'; 1630 1599 elseif ref_i+1>size(UvData.i1_series{1},1) 1631 errormsg='maximum i index reached ';1600 errormsg='maximum i index reached (reload the input file to update the index bound)'; 1632 1601 elseif ref_j+1>size(UvData.i1_series{1},2) 1633 errormsg='maximum j index reached'; 1634 end 1635 if ~isempty(errormsg) 1636 return 1637 end 1602 errormsg='maximum j index reached (reload the input file to update the index bound)'; 1603 end 1604 if ~isempty(errormsg),return,end 1638 1605 i1_subseries=UvData.i1_series{1}(ref_i+1,ref_j+1,:); 1639 1606 i1_subseries=i1_subseries(i1_subseries>0); 1640 if isempty(i1_subseries) 1641 errormsg='no next file'; 1642 return 1607 if isempty(i1_subseries)% case of pairs 1608 i1_subseries=UvData.i1_series{1}(ref_i+1,:,:); 1609 end 1610 if isempty(i1_subseries),errormsg='no next frame: set num_IndexIncrement =''*'' to reach the next existing file';return 1643 1611 else 1644 1612 i1=i1_subseries(end); … … 1850 1818 1851 1819 % make movie until movie speed is set to 0 or STOP is activated 1852 hima=findobj(handles. axes3,'Tag','ima');% %handles.axes3=main plotting window (A GENERALISER)1820 hima=findobj(handles.PlotAxes,'Tag','ima');% %handles.PlotAxes =main plotting window (A GENERALISER) 1853 1821 set(handles.STOP,'Visible','on') 1854 1822 set(handles.speed,'Visible','on') … … 2313 2281 %% check whether tps is needed, then calculate tps coefficients if needed 2314 2282 check_proj_tps=0; 2315 if isfield(UvData,'Object')&&(strcmp(UvData.FileType{1},'civdata')||strcmp(UvData.FileType{1},'civx'))2283 if (strcmp(UvData.FileType{1},'civdata')||strcmp(UvData.FileType{1},'civx')) 2316 2284 for iobj=1:numel(UvData.Object) 2317 2285 if isfield(UvData.Object{iobj},'ProjMode')&& strcmp(UvData.Object{iobj}.ProjMode,'filter') … … 2475 2443 end 2476 2444 % default projection plane 2477 if ~isfield(UvData,'Object')||isempty(UvData.Object{1})2445 if isempty(UvData.Object{1}) 2478 2446 UvData.Object{1}.Type='plane';%main plotting plane 2479 2447 UvData.Object{1}.ProjMode='projection';%main plotting plane … … 2538 2506 set(handles.ListObject_1_title,'Visible','off') 2539 2507 set(handles.ListObject_1,'Visible','off') 2540 [PlotType,PlotParamOut]=plot_field(UvData.Field,handles. axes3,read_GUI(handles.uvmat));2508 [PlotType,PlotParamOut]=plot_field(UvData.Field,handles.PlotAxes,read_GUI(handles.uvmat)); 2541 2509 write_plot_param(handles,PlotParamOut) %update the auto plot parameters 2542 2510 … … 2573 2541 haxes(1)=UvData.plotaxes; 2574 2542 else 2575 haxes(1)=handles. axes3;2543 haxes(1)=handles.PlotAxes; 2576 2544 end 2577 2545 PlotParam{1}=read_GUI(handles.uvmat); … … 2593 2561 if ~isempty(view_field_handle) 2594 2562 plot_handles{2}=guidata(view_field_handle); 2595 haxes(2)=plot_handles{2}. axes3;2563 haxes(2)=plot_handles{2}.PlotAxes; 2596 2564 PlotParam{2}=read_GUI(handles.uvmat);%read plotting parameters on the uvmat interface 2597 2565 PosColorbar{2}='*'; %TODO: deal with colorbar position on view_field … … 2732 2700 histo_value=get(handles.histo1_menu,'Value'); 2733 2701 FieldName=histo_menu{histo_value}; 2734 % update_histo(handles. histo_u,handles.uvmat,FieldName)2702 % update_histo(handles.HistoAxes,handles.uvmat,FieldName) 2735 2703 % 2736 2704 % %------------------------------------------------------------------------ … … 2777 2745 Amax=double(max(max(max(FieldHisto))));%max of field value 2778 2746 if isequal(Amin,Amax) 2779 cla(handles. histo_u)2747 cla(handles.HistoAxes) 2780 2748 else 2781 2749 Histo.ListVarName={FieldName,'histo'}; … … 2813 2781 end 2814 2782 end 2815 plot_field(Histo,handles. histo_u);2783 plot_field(Histo,handles.HistoAxes); 2816 2784 hlegend=legend; 2817 2785 if isempty(FieldName_2) … … 2820 2788 set(hlegend,'String',{FieldName;FieldName_2}) 2821 2789 end 2822 % hh=get(handles. histo_u,'children');2790 % hh=get(handles.HistoAxes,'children'); 2823 2791 % get(hh(1)) 2824 2792 % get(hh(2)) … … 2925 2893 end 2926 2894 netcdf.endDef(nc); 2927 netcdf.putVar(nc,varid,UvData. axes3.FF);2895 netcdf.putVar(nc,varid,UvData.PlotAxes.FF); 2928 2896 netcdf.close(nc); 2929 2897 else %old netcdf library … … 3370 3338 [hset_object,UvData.sethandles]=set_object(data,PlotHandles);% call the set_object interface with action on haxes, 3371 3339 % associate the set_object interface handle to the plotting axes 3372 if isfield(UvData.OpenParam,'SetObjectOrigin') 3373 pos_uvmat=get(handles.uvmat,'Position'); 3374 pos_set_object(1:2)=UvData.OpenParam.SetObjectOrigin + pos_uvmat(1:2); 3375 pos_set_object(3:4)=UvData.OpenParam.SetObjectSize .* pos_uvmat(3:4); 3376 set(hset_object,'Position',pos_set_object) 3377 end 3340 set(hset_object,'Position',get(handles.uvmat,'Position')+UvData.OpenParam.PosSetObject) 3378 3341 UvData.MouseAction='create_object'; 3379 3342 else 3380 3343 set(handles.VOLUME,'BackgroundColor',[0 1 0]) 3381 % UvData.MouseAction='none';3382 3344 end 3383 3345 set(handles.uvmat,'UserData',UvData) … … 3973 3935 %------------------------------------------------------------------- 3974 3936 UvData=get(handles.uvmat,'UserData'); 3975 AxeData=UvData. axes3;% retrieve the current plotted data3937 AxeData=UvData.PlotAxes;% retrieve the current plotted data 3976 3938 PlotParam=read_GUI(handles.uvmat); 3977 [tild,PlotParamOut]= plot_field(AxeData,handles. axes3,PlotParam);3939 [tild,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam); 3978 3940 write_plot_param(handles,PlotParamOut); %update the auto plot parameters 3979 3941 … … 3992 3954 %% update the projection plot on uvmat 3993 3955 ProjData= proj_field(UvData.Field,ObjectData);%project the current input field on object ObjectData 3994 plot_field(ProjData,handles. axes3,read_GUI(handles.uvmat));% plot the projected field;3956 plot_field(ProjData,handles.PlotAxes,read_GUI(handles.uvmat));% plot the projected field; 3995 3957 %replot all the objects within the new projected field 3996 3958 for IndexObj=1:numel(list_str) … … 3998 3960 hobject=UvData.Object{IndexObj}.DisplayHandle.uvmat 3999 3961 if isempty(hobject) || ~ishandle(hobject) 4000 hobject=handles. axes33962 hobject=handles.PlotAxes 4001 3963 end 4002 3964 if isequal(IndexObj,get(handles.ListObject,'Value')) … … 4054 4016 hview_field=findobj(allchild(0),'tag','view_field'); 4055 4017 if isempty(hview_field) 4056 hhview_field. axes3=[];4018 hhview_field.PlotAxes=[]; 4057 4019 else 4058 4020 Data=get(hview_field,'UserData'); 4059 4021 hhview_field=guidata(hview_field); 4060 4022 ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on ObjectData 4061 [PlotType,PlotParam]=plot_field(ProjData,hhview_field. axes3,read_GUI(hview_field));%read plotting parameters on the uvmat interfachhview_fiel4023 [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the uvmat interfachhview_fiel 4062 4024 write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object 4063 4025 haxes=findobj(hview_field,'tag','axes3'); … … 4075 4037 4076 4038 %% update the color of the graphic object representation: the selected object in magenta, others in blue 4077 update_object_color(handles. axes3,hhview_field.axes3,UvData.Object{IndexObj}.DisplayHandle.uvmat)4039 update_object_color(handles.PlotAxes,hhview_field.PlotAxes,UvData.Object{IndexObj}.DisplayHandle.uvmat) 4078 4040 4079 4041 %------------------------------------------------------------------------ … … 4254 4216 end 4255 4217 hhview_field=guidata(hview_field); 4256 [PlotType,PlotParam]=plot_field(ProjData,hhview_field. axes3,read_GUI(hview_field));%read plotting parameters on the GUI view_field);4218 [PlotType,PlotParam]=plot_field(ProjData,hhview_field.PlotAxes,read_GUI(hview_field));%read plotting parameters on the GUI view_field); 4257 4219 write_plot_param(hhview_field,PlotParam); %update the display of plotting parameters for the current object 4258 4220 haxes=findobj(hview_field,'tag','axes3'); … … 4310 4272 % huvmat=get(handles.MenuExport,'parent'); 4311 4273 hfig=figure; 4312 copyobj(handles. axes3,hfig);4313 map=colormap(handles. axes3);4274 copyobj(handles.PlotAxes,hfig); 4275 map=colormap(handles.PlotAxes); 4314 4276 colormap(map);%transmit the current colormap to the zoom fig 4315 4277 colorbar … … 4319 4281 answer=msgbox_uvmat('CONFIRMATION','select a figure/axis on which the current uvmat plot will be exported') 4320 4282 if strcmp(answer,'Yes') 4321 hchild=get(handles. axes3,'children');4283 hchild=get(handles.PlotAxes,'children'); 4322 4284 copyobj(hchild,gca); 4323 4285 end … … 4362 4324 %display first view for tests 4363 4325 newfig=figure; 4364 newaxes=copyobj(handles. axes3,newfig);%new plotting axes in the new figure4326 newaxes=copyobj(handles.PlotAxes,newfig);%new plotting axes in the new figure 4365 4327 set(newaxes,'Tag','movieaxes') 4366 4328 nbpix=[512 384]*str2double(answer{3}); 4367 4329 set(gcf,'Position',[1 1 nbpix])% resolution XVGA 4368 4330 set(newaxes,'Position',eval(answer{4})); 4369 map=colormap(handles. axes3);4331 map=colormap(handles.PlotAxes); 4370 4332 colormap(map);%transmit the current colormap to the zoom fig 4371 4333 msgbox_uvmat('INPUT_Y-N',{['adjust figure ' num2str(newfig) ' with its matlab edit menu '] ;... … … 4373 4335 UvData.plotaxes=newaxes;% the axis in the new figure becomes the current main plotting axes 4374 4336 set(huvmat,'UserData',UvData); 4375 increment=str2num(get(handles. increment_scan,'String')); %get the field increment d4337 increment=str2num(get(handles.num_IndexIncrement,'String')); %get the field increment d 4376 4338 set(handles.STOP,'Visible','on') 4377 4339 set(handles.speed,'Visible','on') … … 4403 4365 aviobj=close(aviobj); 4404 4366 UvData=rmfield(UvData,'plotaxes'); 4405 %UvData.Object{1}.plotaxes=handles. axes3;4367 %UvData.Object{1}.plotaxes=handles.PlotAxes; 4406 4368 set(huvmat,'UserData',UvData); 4407 4369 msgbox_uvmat('CONFIRMATION',{['movie ' aviname ' created '];['with ' num2str(imax) ' frames']}) … … 4510 4472 UvData=get(handles.uvmat,'UserData'); 4511 4473 UvData.Object{IndexObj}=[]; %create a new empty object 4512 UvData.Object{IndexObj}.DisplayHandle.uvmat=handles. axes3; % axes for plot_object4474 UvData.Object{IndexObj}.DisplayHandle.uvmat=handles.PlotAxes; % axes for plot_object 4513 4475 UvData.Object{IndexObj}.DisplayHandle.view_field=[]; %no plot handle before plot_field operation 4514 4476 data.Name=data.Type;% default name=type … … 4626 4588 if isfield(UvData.OpenParam,'CalOrigin') 4627 4589 pos_uvmat=get(handles.uvmat,'Position'); 4628 pos_cal(1)=pos_uvmat(1)+UvData.OpenParam. CalOrigin(1)*pos_uvmat(3);4629 pos_cal(2)=pos_uvmat(2)+UvData.OpenParam. CalOrigin(2)*pos_uvmat(4);4630 pos_cal(3:4)=UvData.OpenParam. CalSize.* pos_uvmat(3:4);4590 pos_cal(1)=pos_uvmat(1)+UvData.OpenParam.PosGeometryCalib(1)*pos_uvmat(3); 4591 pos_cal(2)=pos_uvmat(2)+UvData.OpenParam.PosGeometryCalib(2)*pos_uvmat(4); 4592 pos_cal(3:4)=UvData.OpenParam.PosGeometryCalib(3:4).* pos_uvmat(3:4); 4631 4593 end 4632 4594 geometry_calib(FileName,pos_cal);% call the geometry_calib interface … … 4798 4760 end 4799 4761 if isequal(get(handles.scan_i,'Value'),1) 4800 param.incr_i=str2num(get(handles. increment_scan,'String'));4762 param.incr_i=str2num(get(handles.num_IndexIncrement,'String')); 4801 4763 elseif isequal(get(handles.scan_j,'Value'),1) 4802 param.incr_j=str2num(get(handles. increment_scan,'String'));4764 param.incr_j=str2num(get(handles.num_IndexIncrement,'String')); 4803 4765 end 4804 4766 param.list_fields=get(handles.Fields,'String');% list menu fields … … 4844 4806 ProjectDir = uigetdir(fileparts(fileparts(RootPath)), 'select the project source directory'); 4845 4807 datatree_browser(ProjectDir) 4846 4847 4848 -
TabularUnified trunk/src/view_field.m ¶
r432 r511 76 76 set(handles.view_field,'UserData',ViewFieldData);%store the initial fig size in UserData 77 77 AxeData.LimEditBox=1; %initialise AxeData, the parent figure sets plot parameters 78 set(handles. axes3,'UserData',AxeData)78 set(handles.PlotAxes,'UserData',AxeData) 79 79 if exist('Field','var') 80 [PlotType,PlotParamOut]= plot_field(Field,handles. axes3);%,PlotParam,KeepLim,PosColorbar)80 [PlotType,PlotParamOut]= plot_field(Field,handles.PlotAxes);%,PlotParam,KeepLim,PosColorbar) 81 81 set(handles.Coordinates,'Visible','on') 82 82 if isfield(PlotParamOut,'Vectors') … … 149 149 pos(3)=max(1,pos_1(1)-pos(1)-bord(3)); 150 150 pos(4)=max(1,size_fig(4)-bord(4)); 151 set(handles. axes3,'Position',pos)151 set(handles.PlotAxes,'Position',pos) 152 152 153 153 %------------------------------------------------------------------------ … … 157 157 %------------------------------------------------------------------------ 158 158 varargout{1} = handles.output;% the only output argument is the handle to the GUI figure 159 varargout{2} = strcmp(get(handles. axes3,'Visible'),'on');% check active plot axis159 varargout{2} = strcmp(get(handles.PlotAxes,'Visible'),'on');% check active plot axis 160 160 161 161 %------------------------------------------------------------------------ … … 280 280 % uistack(hmask,'top') 281 281 else 282 axes(handles. axes3)282 axes(handles.PlotAxes) 283 283 hold on 284 284 MaskData.maskhandle=image(Mask.AX,Mask.AY,imflag,'Tag','mask','HitTest','off','AlphaData',0.6*flagmask); … … 296 296 UvData=get(huvmat,'UserData'); 297 297 hfig=figure; 298 newaxes=copyobj(handles. axes3,hfig);299 map=colormap(handles. axes3);298 newaxes=copyobj(handles.PlotAxes,hfig); 299 map=colormap(handles.PlotAxes); 300 300 colormap(map);%transmit the current colormap to the zoom fig 301 301 colorbar … … 774 774 AxeData=Data.axes3;% retrieve the current plotted data 775 775 PlotParam=read_GUI(handles.view_field); 776 [PP,PlotParamOut]= plot_field(AxeData,handles. axes3,PlotParam);776 [PP,PlotParamOut]= plot_field(AxeData,handles.PlotAxes,PlotParam); 777 777 write_plot_param(handles,PlotParamOut); %update the auto plot parameters 778 778 … … 798 798 UvData=get(huvmat,'UserData'); 799 799 hfig=figure; 800 newaxes=copyobj(handles. axes3,hfig);801 map=colormap(handles. axes3);800 newaxes=copyobj(handles.PlotAxes,hfig); 801 map=colormap(handles.PlotAxes); 802 802 colormap(map);%transmit the current colormap to the zoom fig 803 803 colorbar -
TabularUnified trunk/src/write_plot_param.m ¶
r429 r511 4 4 if isempty(PlotParam.Coordinates) 5 5 set(handles.Coordinates,'Visible','off') 6 set(handles. axes3,'Visible','off')6 set(handles.PlotAxes,'Visible','off') 7 7 set(handles.text_display,'Visible','off') 8 8 set(handles.TableDisplay,'Visible','on') 9 9 else 10 10 set(handles.Coordinates,'Visible','on') 11 set(handles. axes3,'Visible','on')11 set(handles.PlotAxes,'Visible','on') 12 12 set(handles.text_display,'Visible','on') 13 13 if isfield(handles,'TableDisplay')
Note: See TracChangeset
for help on using the changeset viewer.