Ignore:
Timestamp:
Jul 9, 2019, 10:10:18 AM (5 years ago)
Author:
sommeria
Message:

replicate updated

File:
1 edited

Legend:

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

    r1061 r1068  
    7373    ParamOut.OutputDirExt='.png';%set the output dir extension
    7474    ParamOut.OutputFileMode='NbSlice';% '=NbInput': 1 output file per input file index, '=NbInput_i': 1 file per input file index i, '=NbSlice': 1 file per slice
    75       ParamOut.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
     75    ParamOut.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
     76    ParamOut.CPUTime=7;% expected time for writting one image ( in minute)
    7677    %% root input file(s) and type
    7778    % check the existence of the first file in the series
     
    113114end
    114115
    115 %% list of input images
    116 % DirImages=fullfile(Param.InputTable{1,1},Param.InputTable{1,2});
    117 % ListStruct=dir(DirImages);
    118 % ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
    119 % check_bad=strcmp('.',ListCells(1,:))|strcmp('..',ListCells(1,:));%detect the dir '.' to exclude it
    120 % check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
    121 % ListFile=ListCells(1,find(~check_dir & ~check_bad));
    122 
    123 %% check file names
    124 % RootName=regexprep(ListFile{1},'.tif$','')
    125 % rank(1)=1;
    126 % for ilist=2:numel(ListFile)
    127 %     rank_str=regexprep(ListFile{ilist},'.tif$','');
    128 %     rank(ilist)=regexprep(rank_str,['^' RootName '@'],'');
    129 % %     if ~isequal(str2num(rank),ilist-1)
    130 % %         disp(['error in the list of input file # ' num2str(ilist-1)])
    131 % %         return
    132 % %     end
    133 % end
    134 
    135116%% output directory
    136117OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]);
     
    156137end
    157138
    158 %% Main loop
    159 
    160 
    161 % count=0;
    162 %count=316;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP08: 4684 images -> start at 316 start 67->_11_1
    163 %count=1934%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP07: 3066 images
    164139%% loop on the files
    165140% include the first tiff file with no index in the first iteration
     
    174149end
    175150for ifile=firstindex:Param.IndexRange.last_i
     151    tic
    176152    if firstindex==0 && ifile==0% first slice of processing
    177153        ImageName=fullfile(Param.InputTable{1,1},Param.InputTable{1,2},'im.tif')
     
    181157    NbFrames=numel(imfinfo(ImageName));
    182158    for iframe=1:NbFrames
    183         iframe
    184159        if isequal(ImagesPerLevel,1)% mode series
    185160            OutputFile=fullfile(OutputDir,['img_' num2str(count+1) '.png']);
     
    198173        count=count+1;
    199174    end
     175    tt=toc;
     176    disp(['elapsed time (in min.) for the file im@' num2str(ifile,'%04d')])
     177    disp(num2str(tt/60))
    200178end
    201179
Note: See TracChangeset for help on using the changeset viewer.