Changeset 1068 for trunk/src/series/extract_multitif.m
- Timestamp:
- Jul 9, 2019, 10:10:18 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/extract_multitif.m
r1061 r1068 73 73 ParamOut.OutputDirExt='.png';%set the output dir extension 74 74 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) 76 77 %% root input file(s) and type 77 78 % check the existence of the first file in the series … … 113 114 end 114 115 115 %% list of input images116 % DirImages=fullfile(Param.InputTable{1,1},Param.InputTable{1,2});117 % ListStruct=dir(DirImages);118 % ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray119 % check_bad=strcmp('.',ListCells(1,:))|strcmp('..',ListCells(1,:));%detect the dir '.' to exclude it120 % check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files121 % ListFile=ListCells(1,find(~check_dir & ~check_bad));122 123 %% check file names124 % 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 % % return132 % % end133 % end134 135 116 %% output directory 136 117 OutputDir=fullfile(Param.InputTable{1,1},[Param.OutputSubDir Param.OutputDirExt]); … … 156 137 end 157 138 158 %% Main loop159 160 161 % count=0;162 %count=316;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP08: 4684 images -> start at 316 start 67->_11_1163 %count=1934%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP07: 3066 images164 139 %% loop on the files 165 140 % include the first tiff file with no index in the first iteration … … 174 149 end 175 150 for ifile=firstindex:Param.IndexRange.last_i 151 tic 176 152 if firstindex==0 && ifile==0% first slice of processing 177 153 ImageName=fullfile(Param.InputTable{1,1},Param.InputTable{1,2},'im.tif') … … 181 157 NbFrames=numel(imfinfo(ImageName)); 182 158 for iframe=1:NbFrames 183 iframe184 159 if isequal(ImagesPerLevel,1)% mode series 185 160 OutputFile=fullfile(OutputDir,['img_' num2str(count+1) '.png']); … … 198 173 count=count+1; 199 174 end 175 tt=toc; 176 disp(['elapsed time (in min.) for the file im@' num2str(ifile,'%04d')]) 177 disp(num2str(tt/60)) 200 178 end 201 179
Note: See TracChangeset
for help on using the changeset viewer.