Changeset 672 for trunk/src/find_imadoc.m
- Timestamp:
- Aug 6, 2013, 3:47:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_imadoc.m
r507 r672 10 10 % RootPath,SubDir,RootFile,FileExt, as given from the input file name by fileparts_uvmat 11 11 function XmlFileName=find_imadoc(RootPath,SubDir,RootFile,FileExt) 12 SubDirBase=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.' 13 XmlFileName=[fullfile(RootPath,SubDirBase) '.xml'];%new convention: xml at the level of the image folder 12 SubDirBase=SubDir; 13 XmlFileName=fullfile(RootPath,[SubDir '.xml']); 14 if ~exist (XmlFileName,'file') 15 dotchar=regexp(SubDir,'\.'); 16 for idot=1:numel(dotchar) 17 XmlFileName=fullfile(RootPath,[SubDir(1:dotchar(end-idot+1)) '.xml']); 18 if exist(XmlFileName,'file') 19 SubDirBase=fullfile(RootPath,SubDir(1:dotchar(end-idot+1))); 20 break 21 end 22 end 23 end 24 % SubDirBase=regexprep(SubDir,'\..*','');%take the root part of SubDir, before the first dot '.' 25 % XmlFileName=[fullfile(RootPath,SubDirBase) '.xml'];%new convention: xml at the level of the image folder 14 26 if ~exist(XmlFileName,'file') 15 27 XmlFileName=[fullfile(RootPath,SubDirBase,RootFile) '.xml']; % old convention: xml inside the image folder, case of images or new civ files
Note: See TracChangeset
for help on using the changeset viewer.