Changeset 469 for trunk/src/uvmat.m
- Timestamp:
- Jun 22, 2012, 3:45:06 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r460 r469 906 906 907 907 %% read parameters (time, geometric calibration..) from a documentation file (.xml advised) 908 SubDirBase=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.' 909 filexml=fullfile(RootPath,[SubDirBase '.xml']);% new convention: xml above the image dir 910 DocExt='.xml'; 911 if ~exist(filexml,'file') 912 filexml=fullfile(RootPath,SubDir,[RootFile '.xml']);%old convention: xml within the image directroy 913 if ~exist(filexml,'file') 914 filexml=fullfile(RootPath,SubDir,[RootFile '.civ']); % very old convention: .civ file 915 if exist(filexml,'file') 916 DocExt='.civ'; 917 else 918 filexml=''; 919 end 920 end 921 end 908 XmlFileName=find_imadoc(RootPath,SubDir,RootFile,FileExt); 909 [tild,tild,DocExt]=fileparts(XmlFileName); 922 910 warntext='';%default warning message 923 911 NbSlice=1;%default 924 912 set(handles.RootPath,'BackgroundColor',[1 1 1]) 925 if ~isempty( filexml)913 if ~isempty(XmlFileName) 926 914 set(handles.view_xml,'Visible','on') 927 915 set(handles.view_xml,'BackgroundColor',[1 1 0]) 928 916 set(handles.view_xml,'String','view .xml') 929 917 drawnow 930 [XmlDataRead,warntext]=imadoc2struct( filexml);918 [XmlDataRead,warntext]=imadoc2struct(XmlFileName); 931 919 if ~isempty(warntext) 932 920 msgbox_uvmat('WARNING',warntext) … … 951 939 if ~isempty(hgeometry_calib) 952 940 GUserData=get(hgeometry_calib,'UserData'); 953 if ~(isfield(GUserData,'XmlInputFile') && strcmp(GUserData.XmlInputFile, filexml))941 if ~(isfield(GUserData,'XmlInputFile') && strcmp(GUserData.XmlInputFile,XmlFileName)) 954 942 answer=msgbox_uvmat('INPUT_Y-N','replace the display of geometry_calib with the new input data?'); 955 943 if strcmp(answer,'Yes') 956 geometry_calib( filexml);%diplay the new calibration points and parameters in geometry_calib944 geometry_calib(XmlFileName);%diplay the new calibration points and parameters in geometry_calib 957 945 end 958 946 end
Note: See TracChangeset
for help on using the changeset viewer.