Ignore:
Timestamp:
Mar 13, 2016, 6:29:07 PM (8 years ago)
Author:
sommeria
Message:

various

File:
1 edited

Legend:

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

    r930 r931  
    44%------------------------------------------------------------------------
    55%
    6 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
     6%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %
     7%%%%%%%%%%%%%%%%%%%%%%%%%%
    78%
    89%OUTPUT
     
    243244   
    244245   
     246   
    245247    %% reading the .sqb file
    246248    m = memmapfile(filename_sqb,'Format', { 'uint32' [1 1] 'offset'; ...
     
    286288        checkpreserve=1;% will not erase the initial files, possibility of error
    287289    end
     290   
     291        %% checking consistency with the xml file
     292    if ~isequal(SeqData.nb_frames,numel(timestamp))
     293        disp_uvmat('ERRROR',['inconsistent number of images ' num2str(SeqData.nb_frames) ' with respect to the xml file: ' num2str(numel(timestamp))] ,checkrun);
     294        return
     295    end   
     296   
    288297    if nbfield2>1
    289298        NomTypeNew='_1_1';
     
    301310    FileDir=SeqData.sequencename;
    302311     FileDir=regexprep(FileDir,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180'
    303     for i1=1:npi-1
    304         for j1=1:npj-1
     312    for i1=1:numel(timestamp)/nbfield2
     313        for j1=1:nbfield2
    305314            OutputFile=fullfile_uvmat(RootPath,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode
     315            try
    306316            A=imread(OutputFile);% check image reading (stop if error)
     317            catch ME
     318                disp(['checking ' OutputFile])
     319                disp(ME.message)
     320            end
    307321        end
    308322    end
     
    378392    OutputFile=fullfile_uvmat(PathDir,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode
    379393    fname=fullfile(binrepertoire,sprintf('%s%.5d.bin',SeqData.binfile,SqbData(ii).file_idx));
    380     if exist(OutputFile,'file')
     394    if exist(OutputFile,'file')% do not recreate existing image file
    381395        fid=0;
    382396    else
Note: See TracChangeset for help on using the changeset viewer.