Changeset 427
- Timestamp:
- May 17, 2012, 11:33:21 PM (12 years ago)
- Location:
- trunk/src
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r426 r427 4152 4152 MaskName_string='';%default 4153 4153 MaxVel_string='';%default 4154 if ~isempty(Param.(fixname).M axVel)4155 MaxVel_string=[' -threshV ' num2str(Param.(fixname).M axVel)];4154 if ~isempty(Param.(fixname).MinVel) 4155 MaxVel_string=[' -threshV ' num2str(Param.(fixname).MinVel)]; 4156 4156 end 4157 4157 if isunix … … 4493 4493 case 'CivX' 4494 4494 set(handles.num_MaxDiff,'Visible','off') 4495 set(handles.num_MaxVel,'Visible','off') 4496 set(handles.title_MaxVel,'Visible','off') 4495 4497 set(handles.num_Nx,'Visible','on') 4496 4498 set(handles.num_Ny,'Visible','on') … … 4506 4508 case 'Matlab' 4507 4509 set(handles.num_MaxDiff,'Visible','on') 4510 set(handles.num_MaxVel,'Visible','on') 4511 set(handles.title_MaxVel,'Visible','on') 4508 4512 set(handles.title_MaxDiff,'Visible','on') 4509 4513 set(handles.num_Nx,'Visible','off') -
trunk/src/fill_GUI.m
r380 r427 23 23 if strcmp(get(hh,'Type'),'uitable') 24 24 set(hh,'Visible','on') 25 if ischar(input_data) 26 input_data={input_data}% transform string to a single cell if needed 27 end 25 28 set(hh,'Data',input_data) 26 29 check_done=1; -
trunk/src/griddata_uvmat.m
r399 r427 3 3 function ZI = griddata_uvmat(X,Y,Z,XI,YI) 4 4 % if ~exist('rho','var')|| isequal(rho,0) 5 txt=ver('MATLAB'); 6 Release=txt.Release; 7 relnumb=str2num(Release(3:4)); 8 if relnumb >= 20 9 ZI=griddata(double(X),double(Y),double(Z),double(XI),double(YI),'linear',{'QJ'}); 10 elseif relnumb >=14 11 ZI=griddata(X,Y,Z,XI,YI,'linear',{'QJ'}); 12 else 13 ZI=griddata(X,Y,Z,XI,YI,'linear'); 14 end 5 ZI=griddata(X,Y,Z,XI,YI,'linear'); 6 % txt=ver('MATLAB'); 7 % Release=txt.Release; 8 % relnumb=str2num(Release(3:4)); 9 % if relnumb >= 20 10 % ZI=griddata(double(X),double(Y),double(Z),double(XI),double(YI),'linear',{'QJ'}); 11 % elseif relnumb >=14 12 % ZI=griddata(X,Y,Z,XI,YI,'linear',{'QJ'}); 13 % else 14 % ZI=griddata(X,Y,Z,XI,YI,'linear'); 15 % end 15 16 % else %smooth with thin plate spline 16 17 % [ZI,Z_diff]=patch_uvmat(X,Y,Z,XI,YI,rho); -
trunk/src/mouse_down.m
r425 r427 333 333 vers=0;% index of the name 334 334 detectname=1; 335 while detectname==1335 while ~isempty(detectname) 336 336 detectname=find(strcmp(ObjectNameNew,ListObject),1);%test the existence of the proposed name in the list 337 337 if detectname% if the object name already exists … … 348 348 ObjectName=ObjectNameNew; 349 349 set(sethandles.Name,'String',ObjectName)% display the default name in set_object 350 % IndexObj=numel(ListObject)+1;% append an object to the list in uvmat351 350 set(hhuvmat.ListObject,'String',[ListObject;{ObjectName}]);%complement the object list 352 351 set(hhuvmat.ListObject_1,'String',[ListObject;{ObjectName}]);%complement the object list 353 %set(hhuvmat.ListObject,'Value',[IndexObj_old(1) IndexObj])354 352 set(hhuvmat.ListObject,'Value',IndexObj) 355 353 set(hhuvmat.ViewObject,'Value',1) 356 % if isempty(object_name)357 % list_str{IndexObj}=[num2str(IndexObj) '-' ObjectData.Type];358 % set(sethandles.Name,'String',list_str{IndexObj})359 % else360 % list_str{IndexObj}=object_name;361 % end362 % set(hhuvmat.ListObject,'String',list_str)363 354 UvData.Object{IndexObj}.DisplayHandle_view_field=AxeData.CurrentObject; 364 355 set(huvmat,'UserData',UvData) -
trunk/src/read_GUI.m
r395 r427 55 55 value=get(hchild(ichild),'Value'); 56 56 if ~isempty(listinput) 57 if numel(value)==1% single selection 57 58 input=listinput{value}; 59 else % multiple selection 60 input=listinput(value); 61 end 58 62 else 59 63 check_input=0; -
trunk/src/series.m
r421 r427 2090 2090 '*.xml', '.xml files '; ... 2091 2091 '*.mat', '.mat matlab files '}, ... 2092 'Pick an xml object file (or use uvmat to create it)',defaultname {1});2092 'Pick an xml object file (or use uvmat to create it)',defaultname); 2093 2093 fileinput=[PathName FileName];%complete file name 2094 2094 sizf=size(fileinput); 2095 2095 if (~ischar(fileinput)||~isequal(sizf(1),1)),return;end 2096 2096 %read the file 2097 t=xmltree(fileinput); 2098 data=convert(t); 2097 data=xml2struct(fileinput); 2098 % t=xmltree(fileinput); 2099 % data=convert(t); 2099 2100 if ~isfield(data,'Style') 2100 2101 data.Style='points'; -
trunk/src/series/check_data_files.m
r377 r427 158 158 set(hfig,'Position',pos) 159 159 end 160 set(hfig,'name',['view= ' num2str(iview)]) 161 160 set(hfig,'name',['check_data_files:view= ' num2str(iview)]) 161 set(hfig,'MenuBar','none')% suppress the menu bar 162 set(hfig,'NumberTitle','off')%suppress the fig number in the title 162 163 h=uicontrol('Style','listbox', 'Position', [20 20 500 300], 'String', Tabchar, 'Callback', {'open_uvmat'}); 163 164 hh=uicontrol('Style','listbox', 'Position', [20 340 500 40], 'String', message); -
trunk/src/series/merge_proj.m
r422 r427 1 2 1 3 2 4 … … 157 159 msgbox_uvmat('WARNING',['times of series differ by more than ' num2str(diff_time)]) 158 160 end 161 time=sqeeze(mean(time,1)); 159 162 end 160 163 % if size(time,2) < i2_series{1}(end) || size(time,3) < j2_series{1}(end)% ime array absent or too short in ImaDoc xml file' … … 364 367 time_i=sum(timeread)/nbtime; 365 368 else 366 time_i=i1;367 %time_i=(time(iview,i1,j1)+time(iview,i2,j2))/2;TODO: upgrade369 % time_i=i1; 370 time_i=(time(i1,j1)+time(i2,j2))/2; %TODO: upgrade 368 371 end 369 372 -
trunk/src/set_object.m
r424 r427 153 153 % else 154 154 % enable the PLOT (REFRESH) button by default 155 %defaul settings 156 set(get(handles.set_object,'children'),'enable','on') 155 157 set(handles.PLOT,'enable','off') 156 158 % end … … 444 446 ObjectNameNew=ObjectName; 445 447 vers=0;% index of the name 446 while detectname==1448 while ~isempty(detectname) 447 449 detectname=find(strcmp(ObjectNameNew,ListObject),1);%test the existence of the proposed name in the list 448 450 if detectname% if the object name already exists 449 indstr=regexp(ObjectNameNew,'\D'); 451 indstr=regexp(ObjectNameNew,'\D');%indices of non number characters 450 452 if indstr(end)<length(ObjectNameNew) %object name ends by a number 451 453 vers=str2double(ObjectNameNew(indstr(end)+1:end))+1; … … 463 465 set(hhuvmat.ListObject_1,'String',[ListObject;{ObjectName}]);%complement the object list 464 466 set(hhuvmat.ListObject,'Value',IndexObj(2)) 467 set(hhuvmat.ViewObject,'Value',1)% indicate that the currently selected objected is viewed on set_object 465 468 UvData.Object{IndexObj(2)}=[];%initiate a new object (empty yet) 466 469 end … … 529 532 set(hhuvmat.edit_object,'Value',1) % set uvmat to object edit mode to allow further object update 530 533 set(hhuvmat.edit_object,'BackgroundColor',[1 1 0]);% paint the edit text in yellow 534 set(hhuvmat.ViewField,'Value',1) 531 535 532 536 %------------------------------------------------------------------------ -
trunk/src/uvmat.m
r426 r427 1625 1625 end 1626 1626 CheckFixPair=get(handles.CheckFixPair,'Value')||(isempty(i2)&&isempty(j2)); 1627 1628 % the pair i1-i2 or j1-j2 is imposed (check box CheckFixPair selected) 1627 1629 if CheckFixPair 1628 1630 if get(handles.scan_i,'Value')==1% case of scanning along index i … … 1641 1643 end 1642 1644 end 1645 1646 % the pair i1-i2 or j1-j2 is free (check box CheckFixPair not selected): 1647 % the list of existing indices recorded in UvData is used 1643 1648 else 1644 1649 UvData=get(handles.uvmat,'UserData'); 1645 1650 ref_i=i1; 1646 1651 if ~isempty(i2) 1647 ref_i=floor((i1+i2)/2); 1652 ref_i=floor((i1+i2)/2);% current reference index i 1648 1653 end 1649 1654 ref_j=1; … … 1651 1656 ref_j=j1; 1652 1657 if ~isempty(j2) 1653 ref_j=floor((j1+j2)/2); 1658 ref_j=floor((j1+j2)/2);% current reference index j 1654 1659 end 1655 1660 end 1656 1661 if ~isempty(increment) 1657 1662 if get(handles.scan_i,'Value')==1% case of scanning along index i 1658 ref_i=ref_i+increment; 1663 ref_i=ref_i+increment;% increment the current reference index i 1659 1664 else % case of scanning along index j (burst numbers) 1660 ref_j=ref_j+increment; 1665 ref_j=ref_j+increment;% increment the current reference index j if scan_j option is used 1661 1666 end 1662 1667 else % free increment … … 1690 1695 return 1691 1696 end 1692 if get(handles.scan_i,'Value')==1% case of scanning along index i 1693 i1_subseries=UvData.i1_series{1}(ref_i+1,ref_j+1,:); 1694 else 1695 i1_subseries=UvData.i1_series{1}(ref_i+1,ref_j+1,:); 1696 end 1697 i1_subseries=UvData.i1_series{1}(ref_i+1,ref_j+1,:); 1697 1698 i1_subseries=i1_subseries(i1_subseries>0); 1698 1699 if isempty(i1_subseries) 1699 1700 errormsg='no next file'; 1700 1701 return 1701 end 1702 i1=i1_subseries(end); 1702 else 1703 i1=i1_subseries(end); 1704 end 1703 1705 if ~isempty(UvData.i2_series{1}) 1704 if get(handles.scan_i,'Value')==1% case of scanning along index i 1705 i2_subseries=UvData.i2_series{1}(ref_i+1,ref_j+1,:); 1706 else 1707 i2_subseries=UvData.i2_series{1}(ref_i+1,ref_j+1,:); 1708 end 1706 i2_subseries=UvData.i2_series{1}(ref_i+1,ref_j+1,:); 1709 1707 i2_subseries=i2_subseries(i2_subseries>0); 1710 1708 i2=i2_subseries(end); 1711 1709 end 1712 1710 if ~isempty(UvData.j1_series{1}) 1713 if get(handles.scan_i,'Value')==1% case of scanning along index i 1714 j1_subseries=UvData.j1_series{1}(ref_i+1,ref_j+1,:); 1715 else 1716 j1_subseries=UvData.j1_series{1}(ref_i+1,ref_j+1,:); 1717 end 1711 j1_subseries=UvData.j1_series{1}(ref_i+1,ref_j+1,:); 1718 1712 j1_subseries=j1_subseries(j1_subseries>0); 1719 1713 j1=j1_subseries(end); 1720 1714 end 1721 1715 if ~isempty(UvData.j2_series{1}) 1722 if get(handles.scan_i,'Value')==1% case of scanning along index i 1723 j2_subseries=UvData.j2_series{1}(ref_i+1,ref_j+1,:); 1724 else 1725 j2_subseries=UvData.j2_series{1}(ref_i+1,ref_j+1,:); 1726 end 1716 j2_subseries=UvData.j2_series{1}(ref_i+1,ref_j+1,:); 1727 1717 j2_subseries=j2_subseries(j2_subseries>0); 1728 1718 j2=j2_subseries(end); 1729 end 1730 1719 end 1720 % case of a second file series 1721 if numel(UvData.i1_series)>=2 1722 i1_subseries=UvData.i1_series{2}(ref_i+1,ref_j+1,:); 1723 i1_subseries=i1_subseries(i1_subseries>0); 1724 i1_1=i1_subseries(end); 1725 if ~isempty(UvData.i2_series{2}) 1726 i2_subseries=UvData.i2_series{2}(ref_i+1,ref_j+1,:); 1727 i2_subseries=i2_subseries(i2_subseries>0); 1728 i2_1=i2_subseries(end); 1729 end 1730 if ~isempty(UvData.j1_series{2}) 1731 j1_subseries=UvData.j1_series{2}(ref_i+1,ref_j+1,:); 1732 j1_subseries=j1_subseries(j1_subseries>0); 1733 j1_1=j1_subseries(end); 1734 end 1735 if ~isempty(UvData.j2_series{2}) 1736 j2_subseries=UvData.j2_series{2}(ref_i+1,ref_j+1,:); 1737 j2_subseries=j2_subseries(j2_subseries>0); 1738 j2_1=j2_subseries(end); 1739 end 1740 end 1731 1741 end 1732 1742 filename=fullfile_uvmat(InputFile.RootPath,InputFile.SubDir,InputFile.RootFile,FileExt,NomType,i1,i2,j1,j2); … … 2104 2114 if test_keepdata_1 2105 2115 Field{2}=UvData.Field_1;% keep the stored field 2116 ParamOut_1=UvData.ParamOut_1; 2106 2117 else 2107 2118 ParamIn_1.FieldName=FieldName_1; … … 2365 2376 [UvData.Field,errormsg]=sub_field(Field{1},Field{2}); 2366 2377 UvData.Field_1=Field{2}; %store the second field for possible use at next RUN 2378 UvData.ParamOut_1=ParamOut_1; 2367 2379 else 2368 2380 UvData.Field=Field{1}; … … 3957 3969 ProjData= proj_field(UvData.Field,ObjectData);%project the current interface field on UvData.Object{IndexObj(1)} 3958 3970 plot_field(ProjData,handles.axes3,read_GUI(handles.uvmat));%read plotting parameters on the uvmat interfacPlotHandles); 3959 Object_out=update_obj(UvData,get(handles.ListObject_1,'Value'),[]) 3971 Object_out=update_obj(UvData,get(handles.ListObject_1,'Value'),[]); 3960 3972 3961 3973 %% display the object parameters if the GUI set_object is already opened 3962 % hset_object=findobj(allchild(0),'tag','set_object');3963 %if ~isempty(hset_object)3964 3974 if ~get(handles.ViewObject,'Value') 3965 % delete(hset_object)% delete to refesh the content3966 3975 ZBounds=0; % default 3967 3976 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax') … … 3979 3988 %------------------------------------------------------------------------ 3980 3989 % --- Executes on selection change in ListObject. 3981 3982 3990 function ListObject_Callback(hObject, eventdata, handles) 3983 3991 %------------------------------------------------------------------------ … … 3990 3998 hset_object=findobj(allchild(0),'tag','set_object'); 3991 3999 if ~isempty(hset_object) 3992 % delete(hset_object)% delete to refesh the content3993 4000 ZBounds=0; % default 3994 4001 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax') … … 4073 4080 end 4074 4081 4075 %------------------------------------------------------------------------4076 % --- Executes on button press in ViewObject.4077 function ViewObject_Callback(hObject, eventdata, handles)4078 %------------------------------------------------------------------------4079 check_view=get(handles.ViewObject,'Value');4080 4081 if check_view %activate set_object4082 IndexObj=get(handles.ListObject,'Value');4083 list_object=get(handles.ListObject,'String');4084 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface4085 UvData.Object{IndexObj}.Name=list_object{IndexObj};4086 if numel(UvData.Object)<IndexObj;% error in UvData4087 msgbox_uvmat('ERROR','invalid object list')4088 return4089 end4090 ZBounds=0; % default4091 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax')4092 ZBounds(1)=UvData.Field.ZMin; %minimum for the Z slider4093 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider4094 end4095 % set(handles.ListObject_1,'Value',IndexObj);%restore ListObject selection after set_object deletion4096 data=UvData.Object{IndexObj};4097 if ~isfield(data,'Type')% default plane4098 data.Type='plane';4099 end4100 if isfield(UvData,'Field')4101 Field=UvData.Field;4102 if isfield(UvData.Field,'Mesh')&&~isempty(UvData.Field.Mesh)4103 data.RangeX=[UvData.Field.XMin UvData.Field.XMax];4104 if strcmp(data.Type,'line')||strcmp(data.Type,'polyline')4105 data.RangeY=UvData.Field.Mesh;4106 else4107 data.RangeY=[UvData.Field.YMin UvData.Field.YMax];4108 end4109 data.DX=UvData.Field.Mesh;4110 data.DY=UvData.Field.Mesh;4111 end4112 if isfield(Field,'NbDim')&& isequal(Field.NbDim,3)4113 data.Coord=[0 0 0]; %default4114 end4115 if isfield(Field,'CoordUnit')4116 data.CoordUnit=Field.CoordUnit;4117 end4118 end4119 hset_object=set_object(data,[],ZBounds);4120 hhset_object=guidata(hset_object);4121 if get(handles.edit_object,'Value')% edit mode4122 set(hhset_object.PLOT,'Enable','on')4123 set(get(hset_object,'children'),'enable','on')4124 else4125 set(hhset_object.PLOT,'Enable','off')4126 set(get(hset_object,'children'),'enable','off')4127 end4128 else4129 hset_object=findobj(allchild(0),'tag','set_object');4130 if ~isempty(hset_object)4131 delete(hset_object)% delete existing version of set_object4132 end4133 end4134 4135 4082 %------------------------------------------------------------------- 4136 4083 % --- Executes on selection change in edit_object. … … 4169 4116 end 4170 4117 4118 4119 %------------------------------------------------------------------------ 4120 % --- Executes on button press in ViewObject. 4121 function ViewObject_Callback(hObject, eventdata, handles) 4122 %------------------------------------------------------------------------ 4123 check_view=get(handles.ViewObject,'Value'); 4124 4125 if check_view %activate set_object 4126 IndexObj=get(handles.ListObject,'Value'); 4127 list_object=get(handles.ListObject,'String'); 4128 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 4129 UvData.Object{IndexObj}.Name=list_object{IndexObj}; 4130 if numel(UvData.Object)<IndexObj;% error in UvData 4131 msgbox_uvmat('ERROR','invalid object list') 4132 return 4133 end 4134 ZBounds=0; % default 4135 if isfield(UvData.Field,'ZMin') && isfield(UvData.Field,'ZMax') 4136 ZBounds(1)=UvData.Field.ZMin; %minimum for the Z slider 4137 ZBounds(2)=UvData.Field.ZMax;%maximum for the Z slider 4138 end 4139 % set(handles.ListObject_1,'Value',IndexObj);%restore ListObject selection after set_object deletion 4140 data=UvData.Object{IndexObj}; 4141 if ~isfield(data,'Type')% default plane 4142 data.Type='plane'; 4143 end 4144 if isfield(UvData,'Field') 4145 Field=UvData.Field; 4146 if isfield(UvData.Field,'Mesh')&&~isempty(UvData.Field.Mesh) 4147 data.RangeX=[UvData.Field.XMin UvData.Field.XMax]; 4148 if strcmp(data.Type,'line')||strcmp(data.Type,'polyline') 4149 data.RangeY=UvData.Field.Mesh; 4150 else 4151 data.RangeY=[UvData.Field.YMin UvData.Field.YMax]; 4152 end 4153 data.DX=UvData.Field.Mesh; 4154 data.DY=UvData.Field.Mesh; 4155 end 4156 if isfield(Field,'NbDim')&& isequal(Field.NbDim,3) 4157 data.Coord=[0 0 0]; %default 4158 end 4159 if isfield(Field,'CoordUnit') 4160 data.CoordUnit=Field.CoordUnit; 4161 end 4162 end 4163 hset_object=set_object(data,[],ZBounds); 4164 hhset_object=guidata(hset_object); 4165 if get(handles.edit_object,'Value')% edit mode 4166 set(hhset_object.PLOT,'Enable','on') 4167 set(get(hset_object,'children'),'enable','on') 4168 else 4169 set(hhset_object.PLOT,'Enable','off') 4170 set(get(hset_object,'children'),'enable','inactive')% deactivate the GUI except SAVE 4171 set(hhset_object.SAVE,'Enable','on') 4172 end 4173 else 4174 hset_object=findobj(allchild(0),'tag','set_object'); 4175 if ~isempty(hset_object) 4176 delete(hset_object)% delete existing version of set_object 4177 end 4178 end 4179 4180 4171 4181 %------------------------------------------------------------------------ 4172 4182 % --- Executes on button press in ViewField. … … 4176 4186 4177 4187 if check_view 4178 % set(handles.ViewObject,'Value',0)% unselect ViewObject_14179 4188 IndexObj=get(handles.ListObject,'Value'); 4180 4189 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface … … 4194 4203 list_object=get(handles.ListObject,'String'); 4195 4204 UvData.Object{IndexObj(end)}.Name=list_object{IndexObj(end)}; 4196 % hset_object=set_object(UvData.Object{IndexObj(end)},[],ZBounds);4197 % hhset_object=guidata(hset_object);4198 % if get(handles.edit_object,'Value')% edit mode4199 % set(hhset_object.PLOT,'Enable','on')4200 % set(get(hset_object,'children'),'enable','on')4201 % else4202 % set(hhset_object.PLOT,'Enable','off')4203 % set(get(hset_object,'children'),'enable','inactive')4204 % end4205 4205 4206 4206 %% show the second plot (on view_field) … … 4226 4226 IndexObj=get(handles.ListObject,'Value'); 4227 4227 IndexObj_1=get(handles.ListObject_1,'Value'); 4228 4229 4228 if IndexObj>1 && ~isequal(IndexObj,IndexObj_1) 4230 4229 delete_object(IndexObj) … … 4513 4512 %read the file 4514 4513 data=xml2struct(fileinput); 4515 data.enable_plot=1; 4516 [tild,data.Name]=fileparts(FileName); 4517 hset_object=findobj(allchild(0),'tag','set_object'); 4518 if ~isempty(hset_object) 4519 delete(hset_object)% delete existing version of set_object 4520 end 4521 set_object(data);% call the set_object interface 4514 % data.enable_plot=1; 4515 [tild,data.Name]=fileparts(FileName);% object name set as file name 4516 % hset_object=findobj(allchild(0),'tag','set_object'); 4517 % if ~isempty(hset_object) 4518 % delete(hset_object)% delete existing version of set_object 4519 % end 4520 hset_object=set_object(data);% call the set_object interface 4521 set(get(hset_object,'children'),'enable','on')% enable edit action on elements on GUI set_object 4522 4522 set(handles.edit_object,'Value',0); %suppress the object edit mode 4523 4523 set(handles.edit_object,'BackgroundColor',[0.7,0.7,0.7]) 4524 %set(handles.MenuObject,'checked','on')4525 4524 set(handles.delete_object,'Visible','on') 4526 4525
Note: See TracChangeset
for help on using the changeset viewer.