Changeset 928 for trunk/src/series


Ignore:
Timestamp:
Mar 5, 2016, 5:57:11 PM (8 years ago)
Author:
sommeria
Message:

corrections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/extract_rdvision.m

    r924 r928  
    6464    ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    6565    ParamOut.WholeIndexRange='on';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
    66     ParamOut.NbSlice='one'; ...%nbre of slices, 'one' prevents splitting in several processes, ('off' by default)
     66    ParamOut.NbSlice=1; ...%nbre of slices, 1 prevents splitting in several processes, ('off' by default)
    6767    ParamOut.VelType='off';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    6868    ParamOut.FieldName='off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     
    184184checkpreserve=0;% if =1, will npreserve the original images, else it erases them at the end
    185185for iview=1:size(Param.InputTable,1)
    186     for iview_xml=1:size(Param.InputTable,1)% loojk for the xml files in the different data directories
    187     filexml=[fullfile(RootPath,Param.InputTable{iview_xml,2},Param.InputTable{iview,3}) '.xml'];%new convention: xml at the level of the image folder
    188     if exist(filexml,'file')
    189         break
    190     end
    191     end 
     186    for iview_xml=1:size(Param.InputTable,1)% look for the xml files in the different data directories
     187        filexml=[fullfile(RootPath,Param.InputTable{iview_xml,2},Param.InputTable{iview,3}) '.xml'];%new convention: xml at the level of the image folder
     188        if exist(filexml,'file')
     189            break
     190        end
     191    end
    192192    if ~exist(filexml,'file')
    193193        disp_uvmat('ERROR',[filexml ' missing'],checkrun)
     
    195195    end
    196196    [XmlData,errormsg]=imadoc2struct(filexml);
    197    
    198     newxml=[fullfile(RootPath,Param.InputTable{iview,3}) '.xml']
     197    newxml=fullfile(RootPath,Param.InputTable{iview,3});
     198    newxml=regexprep(newxml,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180'
     199    newxml=[newxml '.xml'];
    199200   
    200201    [success,errormsg] = copyfile(filexml,newxml); %copy the xml file in the upper folder
     
    306307        end
    307308    end
    308    
    309     % check images
    310    
    311 %     delete(fullfile(RootPath,'Running.xml'))%delete the  xml file to indicate that processing is finished
    312 %     if ~checkpreserve
    313 %         for ibin=1:numel(BinList)
    314 %             delete(BinList{ibin})
    315 %         end
    316 %         rmdir(fullfile(RootPath,Param.InputTable{iview,2}))
    317 %     end
    318 end
     309end
     310
     311%% remove binary files if transfer OK
     312    if ~checkpreserve
     313        for ibin=1:numel(BinList)
     314            delete(BinList{ibin})
     315        end
     316        rmdir(fullfile(RootPath,Param.InputTable{iview,2}))
     317    end
    319318delete(fullfile(RootPath,'Running.xml'))%delete the  xml file to indicate that processing is finished
    320319
     
    352351BitDepth=8*SeqData.bytesperpixel;%needed to write images (8 or 16 bits)
    353352binrepertoire=fullfile(PathDir,SeqData.binrepertoire);
    354 OutputDir=fullfile(PathDir,SeqData.sequencename);
     353FileDir=SeqData.sequencename;
     354FileDir=regexprep(FileDir,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180'
     355OutputDir=fullfile(PathDir,FileDir);
    355356if ~exist(OutputDir,'dir')
    356357    %     errormsg=[OutputDir ' already exist, delete it first'];
     
    371372    end
    372373    i1=floor((ii-1)/nbfield2)+1;
    373     OutputFile=fullfile_uvmat(PathDir,SeqData.sequencename,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode
     374    OutputFile=fullfile_uvmat(PathDir,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode
    374375    fname=fullfile(binrepertoire,sprintf('%s%.5d.bin',SeqData.binfile,SqbData(ii).file_idx));
    375376    if exist(OutputFile,'file')
Note: See TracChangeset for help on using the changeset viewer.