Changeset 931 for trunk/src/series
- Timestamp:
- Mar 13, 2016, 6:29:07 PM (9 years ago)
- Location:
- trunk/src/series
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/extract_multitif.m
r930 r931 142 142 ImagesPerLevel=100;%100; 143 143 count=0; 144 %count= 933;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP08:67->_11_1145 %count=1934%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP07: 144 %count=316;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP08: 4684 images -> start at 316 start 67->_11_1 145 %count=1934%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP07: 3066 images 146 146 %% loop on the files 147 147 for ifile=1:numel(ListFile) … … 156 156 for iframe=1:NbFrames 157 157 A=imread(ImageName,iframe); 158 count=count+1; 158 159 159 if isequal(ImagesPerLevel,1)% mode series 160 160 161 OutputFile=fullfile(OutputDir,['img_' num2str(count ) '.png']);161 OutputFile=fullfile(OutputDir,['img_' num2str(count+1) '.png']); 162 162 else % mode multilevel or volume (indices i and j) 163 163 i_index=fix(count/ImagesPerLevel)+1; … … 166 166 end 167 167 imwrite(A,OutputFile,'BitDepth',16) 168 count=count+1; 168 169 end 169 170 end -
trunk/src/series/extract_rdvision.m
r930 r931 4 4 %------------------------------------------------------------------------ 5 5 % 6 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%% 6 %%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS % 7 %%%%%%%%%%%%%%%%%%%%%%%%%% 7 8 % 8 9 %OUTPUT … … 243 244 244 245 246 245 247 %% reading the .sqb file 246 248 m = memmapfile(filename_sqb,'Format', { 'uint32' [1 1] 'offset'; ... … … 286 288 checkpreserve=1;% will not erase the initial files, possibility of error 287 289 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 288 297 if nbfield2>1 289 298 NomTypeNew='_1_1'; … … 301 310 FileDir=SeqData.sequencename; 302 311 FileDir=regexprep(FileDir,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180' 303 for i1=1:n pi-1304 for j1=1:n pj-1312 for i1=1:numel(timestamp)/nbfield2 313 for j1=1:nbfield2 305 314 OutputFile=fullfile_uvmat(RootPath,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode 315 try 306 316 A=imread(OutputFile);% check image reading (stop if error) 317 catch ME 318 disp(['checking ' OutputFile]) 319 disp(ME.message) 320 end 307 321 end 308 322 end … … 378 392 OutputFile=fullfile_uvmat(PathDir,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode 379 393 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 381 395 fid=0; 382 396 else
Note: See TracChangeset
for help on using the changeset viewer.