- Timestamp:
- Mar 10, 2010, 7:43:51 PM (15 years ago)
- Location:
- trunk/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_functions.m
r38 r42 106 106 date_str=datfile.date;%string of the date of last modification 107 107 datnum(i)=0;%default 108 char_code=double(date_str);% code of the date characters109 special_char=(char_code>127); %non standard Ascii character (e.g. date in french)110 if isempty(find(special_char))% standard Ascii character111 datnum(i)=datenum(date_str);108 try 109 datnum(i)=datenum(date_str); 110 catch 111 datnum(i)=0;%in case of error with datenum (e.g. date in french) 112 112 end 113 113 end -
trunk/src/civ_3D.m
r2 r42 158 158 end 159 159 if exist(name_todo,'file')~=2 160 hwarn=warndlg(['no batch distributed processing available, queue file ' name_todo ' absent']);160 msgbox_uvmat('ERROR',['no batch distributed processing available, queue file ' name_todo ' absent']); 161 161 % test_batch=0; % Problems to detect file on linux/nfs filesystems 162 162 end … … 571 571 if isempty(nom_type_read) 572 572 nom_type_ima='_i_j'; 573 warndlg_uvmat('no ImageName defined in ImaDoc/Heading, take _i_j indexing by default','WARNING')573 msgbox_uvmat('WARNING','no ImageName defined in ImaDoc/Heading, take _i_j indexing by default') 574 574 else 575 575 nom_type_ima=nom_type_read; … … 603 603 field_i=field_i+1; 604 604 % imagename_last=imagename; 605 [imagename,idetect]=name_generator(filebase,field_i,1,ext_ima,nom_type_ima); 605 imagename=name_generator(filebase,field_i,1,ext_ima,nom_type_ima); 606 idetect=exist(imagename,'file'); 606 607 if isequal(nom_type_ima,'none') 607 608 idetect=0; %stop if the same image is repeated (if nom_type='none') … … 617 618 while idetect==1 618 619 field_i=field_i-1; 619 [imagename,idetect]=name_generator(filebase,field_i,1,ext_ima,nom_type_ima); 620 imagename=name_generator(filebase,field_i,1,ext_ima,nom_type_ima); 621 idetect=exist(imagename,'file'); 620 622 if isequal(nom_type_ima,'none') 621 623 idetect=0; %stop if the same image is repeted (if nom_type='none') … … 974 976 dirname=fullfile(filepath,subdir_civ1,ext_dir); 975 977 if ~exist(fullfile(filepath,subdir_civ1,ext_dir),'dir') 976 hwarn=warndlg_uvmat(['no civ1 file available: subdirectory ' subdir_civ1 ' does not exist'],'ERROR');978 msgbox_uvmat('ERROR',['no civ1 file available: subdirectory ' subdir_civ1 ' does not exist']); 977 979 set(handles.list_pair_civ1,'String',{}); 978 980 return 979 981 end 980 982 for ipair=1:nbpair 981 [filename,select(ipair)]=name_generator(filebase,ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair),'.nc',nom_type_nc,1,...983 filename=name_generator(filebase,ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair),'.nc',nom_type_nc,1,... 982 984 ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair),subdir_civ1); 985 select(ipair)=exist(filename,'file'); 983 986 end 984 987 if ~exist('select','var') | isequal(select,zeros(size(1:nbpair))) … … 988 991 num_j1=ref_j-floor(browse.incr_pair(2)/2); 989 992 num_j2=ref_j+ceil(browse.incr_pair(2)/2); 990 [filename,select(1)]=name_generator(filebase,num_i1,num_j1,'.nc',nom_type_nc,1,num_i2,num_j2,subdir_civ1); 993 [filename]=name_generator(filebase,num_i1,num_j1,'.nc',nom_type_nc,1,num_i2,num_j2,subdir_civ1); 994 select(1)=exist(filename,'file'); 991 995 testpair=1; 992 996 else 993 997 if isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)') 994 hwarn=warndlg_uvmat(['no civ1 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ1],'ERROR'); 995 set(hwarn,'WindowStyle','modal'); 998 msgbox_uvmat('ERROR',['no civ1 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ1]); 996 999 else 997 hwarn=warndlg_uvmat(['no civ1 file available for the selected reference index i=' num2str(ref_i) ' and subdirectory ' subdir_civ1],'ERROR'); 998 set(hwarn,'WindowStyle','modal'); 1000 msgbox_uvmat('ERROR',['no civ1 file available for the selected reference index i=' num2str(ref_i) ' and subdirectory ' subdir_civ1]); 999 1001 end 1000 1002 set(handles.list_pair_civ1,'String',{''}); … … 1159 1161 end 1160 1162 for ipair=1:nbpair 1161 [filename ,select(ipair)]=name_generator(filebase,ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair),'.nc',nom_type_nc,1,...1163 [filename]=name_generator(filebase,ref_i+displ_num(3,ipair),ref_j+displ_num(1,ipair),'.nc',nom_type_nc,1,... 1162 1164 ref_i+displ_num(4,ipair),ref_j+displ_num(2,ipair),subdir_civ1); 1165 select(ipair)=exist(filename,'file'); 1163 1166 end 1164 1167 if isequal(select,zeros(size(1:nbpair))) … … 1168 1171 num_j1=ref_j-floor(browse.incr_pair(2)/2); 1169 1172 num_j2=ref_j+floor((browse.incr_pair(2)+1)/2); 1170 [filename,select(1)]=name_generator(filebase,num_i1,num_j1,'.nc',nom_type_nc,1,num_i2,num_j2,subdir_civ2); 1173 filename=name_generator(filebase,num_i1,num_j1,'.nc',nom_type_nc,1,num_i2,num_j2,subdir_civ2); 1174 select(1)=exist(filename,'file'); 1171 1175 else 1172 1176 if isequal(mode,'series(Dj)') | isequal(mode,'st_series(Dj)') 1173 errordlg(['no civ2 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ2])1177 msgbox_uvmat('ERROR',['no civ2 file available for the selected reference index j=' num2str(ref_j) ' and subdirectory ' subdir_civ2]) 1174 1178 else 1175 errordlg(['no civ2 file available for the selected reference index i=' num2str(ref_i) ' and subdirectory ' subdir_civ2])1179 msgbox_uvmat('ERROR',['no civ2 file available for the selected reference index i=' num2str(ref_i) ' and subdirectory ' subdir_civ2]) 1176 1180 end 1177 1181 set(handles.list_pair_civ2,'String',{}); … … 1540 1544 end 1541 1545 else 1542 warndlg_uvmat('batch system not available','ERROR')1546 msgbox_uvmat('ERROR','batch system not available') 1543 1547 return 1544 1548 end … … 1570 1574 end 1571 1575 else 1572 warndlg_uvmat('for BATCH option, UBC file names, beginning by \\, are needed','ERROR');1576 msgbox_uvmat('ERROR','for BATCH option, UBC file names, beginning by \\, are needed'); 1573 1577 set(handles.BATCH, 'Enable','On') 1574 1578 set(handles.BATCH,'BackgroundColor',[1 0 0]) … … 1599 1603 [Path_ima,Name]=fileparts(filebase);%Path of the image files (.civ_3D) 1600 1604 if ~exist(Path_ima,'dir') 1601 warndlg_uvmat(['path to images ' Path_ima ' not found'],'ERROR')1605 msgbox_uvmat('ERROR',['path to images ' Path_ima ' not found']) 1602 1606 return 1603 1607 end … … 1630 1634 for ifile=1:nbfield 1631 1635 % for j=1:nbslice 1632 [filename,detect]=name_generator(filebase,num1_civ1(ifile),[],'.nc',...1636 filename=name_generator(filebase,num1_civ1(ifile),[],'.nc',... 1633 1637 nom_type_nc,1,num2_civ1(ifile),[],subdir_civ1);% 1634 if detect==1% if a netcdf file already exists 1638 detect=exist(filename,'file') 1639 if detect% if a netcdf file already exists 1635 1640 subdir_civ1=[subdir_civ1 '.0']; 1636 1641 subdir_civ2=subdir_civ1; … … 1638 1643 end 1639 1644 filecell_nc1(ifile)={filename}; 1640 if detect ==1% if a netcdf file already exists1645 if detect% if a netcdf file already exists 1641 1646 break 1642 1647 end … … 1652 1657 %get image names 1653 1658 for ifile=1:nbfield 1654 [filecell_ima1_civ1{ifile},idetect]=name_generator(filebase, num1_civ1(ifile),[],ext_ima,nom_type_ima);%first image1655 [filecell_ima2_civ1{ifile},idetect_1]=name_generator(filebase, num2_civ1(ifile),[],ext_ima,nom_type_ima); %second image1656 if idetect==01657 warndlg_uvmat([filecell_ima1_civ1{ifile} ' not found'],'ERROR')1659 filecell_ima1_civ1{ifile}=name_generator(filebase, num1_civ1(ifile),[],ext_ima,nom_type_ima);%first image 1660 filecell_ima2_civ1{ifile}=name_generator(filebase, num2_civ1(ifile),[],ext_ima,nom_type_ima); %second image 1661 if ~exist(filecell_ima1_civ1{ifile},'file') 1662 msgbox_uvmat('ERROR',[filecell_ima1_civ1{ifile} ' not found']) 1658 1663 set(handles.BATCH, 'Enable','On') 1659 1664 set(handles.BATCH,'BackgroundColor',[1 0 0]) 1660 1665 cd(currentdir) 1661 1666 return 1662 end 1663 if idetect_1==0,1664 errordlg([filecell_ima2_civ1{ifile} ' not found'])1667 end 1668 if ~exist(filecell_ima2_civ1{ifile},'file') 1669 msgbox_uvmat('ERROR',[filecell_ima2_civ1{ifile} ' not found']) 1665 1670 set(handles.BATCH, 'Enable','On') 1666 1671 set(handles.BATCH,'BackgroundColor',[1 0 0]) … … 1692 1697 waitbar(ifile/nbfield); 1693 1698 Atot=[]; 1694 [filename_A,idetect_cur]=name_generator(filebase,num1_civ1(ifile),1,'.png','_i');%A VOIR 1699 filename_A=name_generator(filebase,num1_civ1(ifile),1,'.png','_i');%A VOIR 1700 idetect_cur=exist(filename_A,'file'); 1695 1701 for j=1:nbslice 1696 1702 if idetect_cur==0 … … 1703 1709 %filecell_ima1_civ1(ifile,j)={filename}; 1704 1710 Atot=[]; 1705 [filename_B,idetect_cur]=name_generator(filebase, num2_civ1(ifile),1,'.png','_i'); 1711 filename_B=name_generator(filebase, num2_civ1(ifile),1,'.png','_i'); 1712 idetect_cur=exist(filename_B,'file'); 1706 1713 for j=1:nbslice 1707 1714 if idetect_cur==0 … … 1742 1749 end 1743 1750 end 1744 1751 'TESTciv3D' 1752 nbfield 1745 1753 for ifile=1:nbfield 1746 1754 i_cmd=0; … … 2176 2184 browse=get(handles.browse_root,'UserData'); 2177 2185 varargin{1}=''; 2178 [image_name,idetect]=name_generator(filebase,1,1,browse.ext_ima,browse.nom_type_ima);%name of an image2179 if idetect==12186 image_name=name_generator(filebase,1,1,browse.ext_ima,browse.nom_type_ima);%name of an image 2187 if exist(image_name,'file') 2180 2188 varargin{1}=image_name; 2181 2189 end 2182 warndlg_uvmat('no mask available, use TOOL menu in the uvmat interface to create it','ERROR')2190 msgbox_uvmat('ERROR','no mask available, use TOOL menu in the uvmat interface to create it') 2183 2191 % makemask(varargin); %open the makemask interface 2184 2192 else -
trunk/src/dataview.m
r17 r42 336 336 set(handles.ListXml,'Value',Value(1)); 337 337 if isequal(Value(1),1) 338 warndlg_uvmat('an xml file needs to be selected','ERROR')338 msgbox_uvmat('ERROR','an xml file needs to be selected') 339 339 return 340 340 else -
trunk/src/editxml.m
r2 r42 311 311 head_element=get(t,1); 312 312 if ~isfield(head_element,'name') | ~isfield(head_element,'attributes') 313 warndlg_uvmat('root element of the .xml file not in correct format','ERROR')313 msgbox_uvmat('ERROR','root element of the .xml file not in correct format') 314 314 end 315 315 head_name=head_element.name; … … 356 356 xs=xmltree(schemapath); 357 357 else 358 warndlg_uvmat(['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the xml file PARAM'],'ERROR')358 msgbox_uvmat('ERROR',['The xml schema for ' CurrentFile ' is unknown, check the schema path set in the xml file PARAM']) 359 359 [FileName, PathName]=uigetfile( ... 360 360 {'*.xsd', '(*.xsd)'; … … 1021 1021 [path,fil,ext]=fileparts(cur_file); 1022 1022 if ~exist(cur_file,'file') 1023 warndlg_uvmat(['non-existent link file' cur_file],'ERROR') % A FAIRE: propose to updtate the .xml file1023 msgbox_uvmat('ERROR',['non-existent link file' cur_file]) % A FAIRE: propose to updtate the .xml file 1024 1024 return 1025 1025 elseif isequal(ext,'.xml') … … 1230 1230 Value=get(hhdataview.ListXml,'Value'); 1231 1231 if isequal(Value,1) 1232 warndlg_uvmat('you need to select the xml files to edit','ERROR')1232 msgbox_uvmat('ERROR','you need to select the xml files to edit') 1233 1233 return 1234 1234 end … … 1257 1257 [success,message]=copyfile(xmlfullname,backupfile);%make backup 1258 1258 if ~isequal(success,1) 1259 warndlg_uvmat(['Error in the backup of ' xmlfullname],'ERROR')1259 msgbox_uvmat('ERROR',['Error in the backup of ' xmlfullname]) 1260 1260 return 1261 1261 end -
trunk/src/geometry_calib.m
r36 r42 598 598 end 599 599 if ~isfield(sparam,'GeometryCalib_exe') 600 warndlg_uvmat(['calibration program <GeometryCalib_exe> undefined in parameter file ' xmlfile],'ERROR')600 msgbox_uvmat('ERROR',['calibration program <GeometryCalib_exe> undefined in parameter file ' xmlfile]) 601 601 return 602 602 end 603 603 Tsai_exe=sparam.GeometryCalib_exe; 604 604 if ~exist(Tsai_exe,'file') 605 warndlg_uvmat(['calibration program ' Tsai_exe ' does not exist'],'ERROR')605 msgbox_uvmat('ERROR',['calibration program ' Tsai_exe ' does not exist']) 606 606 return 607 607 end … … 612 612 eval(['!' Tsai_exe ' -f t.txt > tsaicalib.log']); 613 613 if ~exist('calib.dat','file') 614 warndlg_uvmat('no output from calibration program Tsai_exe: possibly too few points','ERROR')614 msgbox_uvmat('ERROR','no output from calibration program Tsai_exe: possibly too few points') 615 615 end 616 616 calibdat=dlmread('calib.dat'); … … 771 771 YCoord=str2num(coord_str(k(4)+5:end)); 772 772 else 773 warndlg_uvmat('the choice in menu_coord of uvmat must be px or phys ','ERROR')773 msgbox_uvmat('ERROR','the choice in menu_coord of uvmat must be px or phys ') 774 774 end 775 775 huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle … … 874 874 end 875 875 if ~isfield(AxeData,'ZoomAxes') 876 warndlg_uvmat('first draw a window around a grid marker','ERRROR')876 msgbox_uvmat('ERROR','first draw a window around a grid marker') 877 877 return 878 878 end -
trunk/src/plot_field.m
r19 r42 1016 1016 test_lim=0; 1017 1017 if test_vec 1018 Xlim=[min(vec_X) max(vec_X)]; 1019 Ylim=[min(vec_Y) max(vec_Y)]; 1018 'TESTplot' 1019 Xlim=[min(vec_X) max(vec_X)] 1020 Ylim=[min(vec_Y) max(vec_Y)] 1020 1021 test_lim=1; 1021 1022 if test_ima%both background image and vectors coexist, take the wider bound -
trunk/src/proj_field.m
r38 r42 1124 1124 % different cases of projection 1125 1125 if isequal(ObjectData.ProjMode,'projection') 1126 ProjData.ListDimName=[ProjData.ListDimName FieldData.ListDimName(DimIndices(1))];%add the point index to the list of dimensions 1126 %ProjData.ListDimName=[ProjData.ListDimName 1127 %FieldData.ListDimName(DimIndices(1))];%add the point index to 1128 %the list of dimension 1129 ProjData.ListDimName=[ProjData.ListDimName FieldData.VarDimName(VarIndex(1))];%add the point index to the list of dimensions 1127 1130 ProjData.DimValue=[ProjData.DimValue length(coord_X)]; 1128 1131 nbvar=0; … … 1138 1141 if isempty(ivar_Z) || ivar~=ivar_Z 1139 1142 ProjData.ListVarName=[ProjData.ListVarName VarName]; 1140 ProjData.VarDim Index=[ProjData.VarDimIndex DimIndices(1)];1143 ProjData.VarDimName=[ProjData.VarDimName DimCell]; 1141 1144 nbvar=nbvar+1; 1142 1145 if isfield(FieldData,'VarAttribute') & length(FieldData.VarAttribute) >=ivar … … 1226 1229 VarName=FieldData.ListVarName{VarIndex(1)}; 1227 1230 eval(['DimValue=size(FieldData.' VarName ');']) 1228 ListDimName=FieldData.ListDimName(DimIndices); 1231 1232 %ListDimName=FieldData.ListDimName(DimIndices); 1233 ListDimName=FieldData.VarDimName{VarIndex(1)}; 1229 1234 ProjData.ListVarName=[{AYName} {AXName} ProjData.ListVarName]; %TODO: check if it already exists in Projdata (several cells) 1230 1235 ProjData.VarDimName=[{AYName} {AXName} ProjData.VarDimName]; -
trunk/src/struct2xml.m
r19 r42 15 15 16 16 function t=struct2xml(Object,t,root_uid) 17 get(t,root_uid) 17 18 18 if ~exist('t','var') 19 19 t=xmltree; -
trunk/src/uvmat.m
r41 r42 2234 2234 if NbDim==3% 2235 2235 if ~isempty(CellVarIndex) & ~isempty(VarType{imax}.coord_z)%unstructured coordinate z 2236 ZName=UvData. ListVarName{VarType{imax}.coord_z};2236 ZName=UvData.Field.ListVarName{VarType{imax}.coord_z}; 2237 2237 eval(['UvData.ZMax=max(UvData.Field.' ZName ');']) 2238 2238 eval(['UvData.ZMin=min(UvData.Field.' ZName ');'])
Note: See TracChangeset
for help on using the changeset viewer.