Changeset 792
- Timestamp:
- Jul 2, 2014, 10:04:43 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/extract_rdvision.m
r788 r792 52 52 ParamOut.ProjObject='off';...%can use projection object(option 'off'/'on', 53 53 ParamOut.Mask='off';...%can use mask option (option 'off'/'on', 'off' by default) 54 ParamOut.OutputDirExt='.ima';%set the output dir extension 54 ParamOut.OutputSubDir=Param.InputTable{1,3}; 55 ParamOut.OutputDirExt='';%set the output dir extension 55 56 if size(Param.InputTable,1)>1 56 57 msgbox_uvmat('WARNING', 'this function acts only on the first input file line') … … 95 96 FileInfo{1}=get_file_info(filecell{1,1}); 96 97 if ~strcmp(FileInfo{1}.FileType,'rdvision') 97 msgbox_uvmat('ERROR','the input is not from rdvision: a .seq file must be opened')98 msgbox_uvmat('ERROR','the input is not from rdvision: a .seq or .sqb file must be opened') 98 99 return 99 100 end … … 106 107 107 108 SubDirBase=regexprep(SubDir{1},'\..*','');%take the root part of SubDir, before the first dot '.' 108 filexml=[fullfile(RootPath{1}, SubDirBase) '.xml'];%new convention: xml at the level of the image folder109 filexml=[fullfile(RootPath{1},RootFile{1}) '.xml'];%new convention: xml at the level of the image folder 109 110 if ~exist(filexml,'file') 110 filexml=[fullfile(RootPath{1},SubDir{1},RootFile{1}) '.xml']; % old convention: xml inside the image folder 111 if ~exist(filexml,'file') 112 filexml=[fullfile(RootPath{1},SubDir{1},RootFile{1}) '.civ']; % very old convention: .civ file 113 if ~exist(filexml,'file') 114 filexml=''; 115 end 116 end 117 end 118 XmlData=[]; 119 if ~isempty(filexml) 120 [XmlData,error]=imadoc2struct_special(filexml); 121 end 111 msgbox_uvmat('ERROR',[filexml ' missing']) 112 return 113 end 114 [XmlData,error]=imadoc2struct_special(filexml); 122 115 if isfield(XmlData,'Time') 123 116 itime=itime+1; … … 209 202 end 210 203 SubDirBase=regexprep(SubDir{1},'\..*','');%take the root part of SubDir, before the first dot '.' 211 filexml_new=[fullfile(RootPath{1},SubDirBase) '.xml'];212 save(t,filexml _new)204 % filexml_new=[fullfile(RootPath{1},SubDirBase) '.xml']; 205 save(t,filexml) 213 206 end 214 207 … … 220 213 end 221 214 filename=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},'*',1); 222 OutputDir=[ SubDir{1}Param.OutputDirExt];215 OutputDir=[Param.OutputSubDir Param.OutputDirExt]; 223 216 for ifile=1:nbfield 224 217 update_waitbar(WaitbarHandle,ifile/nbfield) … … 241 234 end 242 235 i1=floor((ifile-1+first_label)/nbfield2)+1; 243 OutputFile=fullfile_uvmat(RootPath{1},OutputDir, RootFile{1},'.png',NomTypeNew,i1,[],j1);236 OutputFile=fullfile_uvmat(RootPath{1},OutputDir,'img','.png',NomTypeNew,i1,[],j1); 244 237 try 245 238 imwrite(A,OutputFile,'BitDepth',BitDepth) % case of 16 bit images
Note: See TracChangeset
for help on using the changeset viewer.