Changeset 991 for trunk/src/series
- Timestamp:
- Feb 2, 2017, 1:25:44 PM (8 years ago)
- Location:
- trunk/src/series
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series/extract_multitif_parallel.m
r977 r991 59 59 %======================================================================= 60 60 61 function ParamOut= ima2netcdf(Param)61 function ParamOut=extract_multitif_parallel(Param) 62 62 63 63 %%%%%%%%%%%%%%%%% INPUT PREPARATION MODE (no RUN) %%%%%%%%%%%%%%%%% … … 143 143 XmlInput=imadoc2struct(XmlInputFile,'Camera'); 144 144 145 %% create the xml file of PCO camera 146 XmlInput.Camera.CameraName='PCO'; 147 t=struct2xml(XmlInput.Camera); 148 t=set(t,1,'name','ImaDoc'); 149 save(t,fullfile(Param.InputTable{1,1},[Param.InputTable{1,2} '.xml'])) 150 145 151 %% Main loop 146 152 -
trunk/src/series/extract_rdvision.m
r982 r991 64 64 if isstruct(Param) && isequal(Param.Action.RUN,0) 65 65 ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 66 ParamOut.WholeIndexRange='on';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)67 ParamOut.NbSlice=1; ...%nbre of slices, 1 prevents splitting in several processes, ('off' by default)68 ParamOut.VelType='off';...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default)69 ParamOut.FieldName='off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)70 ParamOut.FieldTransform = 'off';...%can use a transform function71 ParamOut.ProjObject='off';...%can use projection object(option 'off'/'on',72 ParamOut.Mask='off';...%can use mask option (option 'off'/'on', 'off' by default)73 ParamOut.OutputDirExt='.extract';%set the output dir extension66 ParamOut.WholeIndexRange='on';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 67 ParamOut.NbSlice=1; ...%nbre of slices, 1 prevents splitting in several processes, ('off' by default) 68 ParamOut.VelType='off';...% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 69 ParamOut.FieldName='off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) 70 ParamOut.FieldTransform = 'off';...%can use a transform function 71 ParamOut.ProjObject='off';...%can use projection object(option 'off'/'on', 72 ParamOut.Mask='off';...%can use mask option (option 'off'/'on', 'off' by default) 73 ParamOut.OutputDirExt='.extract';%set the output dir extension 74 74 ParamOut.OutputSubDirMode='one'; %output folder given by the folder name of the first input line 75 75 % detect the set of image folder 76 76 RootPath=Param.InputTable{1,1}; 77 ListStruct=dir(RootPath); 77 ListStruct=dir(RootPath); 78 78 ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray 79 79 check_bad=strcmp('.',ListCells(1,:))|strcmp('..',ListCells(1,:));%detect the dir '.' to exclude it 80 80 check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files 81 81 ListDir=ListCells(1,find(check_dir & ~check_bad)); 82 % InputTable=cell(numel(ListDir),5);83 % InputTable(:,2)=ListDir';82 % InputTable=cell(numel(ListDir),5); 83 % InputTable(:,2)=ListDir'; 84 84 isel=0; 85 85 InputTable=Param.InputTable; … … 90 90 seq_index=find(~cellfun('isempty',detect_seq),1); 91 91 if ~isempty(seq_index) 92 % msgbox_uvmat('ERROR',['not seq file in ' ListDir{ilist} ': please check the input folders'])93 % else94 isel=isel+1;95 InputTable{isel,1}=RootPath;96 InputTable{isel,2}=ListDir{ilist};92 % msgbox_uvmat('ERROR',['not seq file in ' ListDir{ilist} ': please check the input folders']) 93 % else 94 isel=isel+1; 95 InputTable{isel,1}=RootPath; 96 InputTable{isel,2}=ListDir{ilist}; 97 97 RootFile=regexprep(ListCellSub{1,seq_index},'.seq$',''); 98 98 InputTable{isel,3}=RootFile; 99 InputTable{isel,4}='*';100 InputTable{isel,5}='.seq';101 end99 InputTable{isel,4}='*'; 100 InputTable{isel,5}='.seq'; 101 end 102 102 end 103 103 hseries=findobj(allchild(0),'Tag','series');% find the parent GUI 'series' … … 105 105 set(hhseries.InputTable,'Data',InputTable) 106 106 ParamOut.ActionInput.LogPath=RootPath;% indicate the path for the output info: 0_LOG .... 107 return107 return 108 108 end 109 109 … … 239 239 SeqData.binrepertoire=regexprep(s.sequenceSettings.bindirectory,'\\$','');%tranform Windows notation to Linux 240 240 SeqData.binrepertoire=regexprep(SeqData.binrepertoire,'\','/'); 241 [tild, binrepertoire,DirExt]=fileparts(SeqData.binrepertoire);242 SeqData.binrepertoire=[SeqData.binrepertoire DirExt];241 [tild,SeqData.binrepertoire,DirExt]=fileparts(SeqData.binrepertoire); 242 %SeqData.binrepertoire=[SeqData.binrepertoire DirExt]; 243 243 end 244 244 … … 253 253 254 254 %%%%%%%BRICOLAGE in case of unreadable .sqb file: remplace lecture du fichier 255 % ind=[111 114:211];%indices of bin files 256 % w=1024;%w=width of images in pixels 257 % h=1024;%h=height of images in pixels 258 % bpp=2;% nbre of bytes per pixel 259 % lengthimage=w*h*bpp;% lengthof an image record on the binary file 260 % nbimages=32; %nbre of images of each camera in a bin file 261 % for ii=1:32*numel(ind) 262 % data(ii).offset=mod(ii-1,32)*2*lengthimage+lengthimage;%Dalsa_2 263 % %data(ii).offset=mod(ii-1,32)*2*lengthimage;%Dalsa_1 264 % data(ii).file_idx=ind(ceil(ii/32)); 265 % data(ii).timestamp=0.2*(ii-1); 266 % end 267 % m.Data=data; 255 % ind=[8356 8356:8672];%indices of bin files 256 % w=2432;%w=width of images in pixels 257 % h=864;%h=height of images in pixels 258 % bpp=2;% nbre of bytes per pixel 259 % lengthimage=w*h*bpp;% lengthof an image record on the binary file 260 % nbimages=15; %nbre of images of each camera in a bin file 261 % for ii=1:15*numel(ind) 262 % %data(ii).offset=mod(ii-1,32)*2*lengthimage+lengthimage;%Dalsa_2 263 % %data(ii).offset=mod(ii-1,32)*2*lengthimage;%Dalsa_1 264 % %data(ii).file_idx=ind(ceil(ii/32)); 265 % data(ii).file_idx=ind(ceil(ii/15)); 266 % data(ii).timestamp=0.005*(ii-1); 267 % end 268 % m.Data=data; 268 269 %%%%%%% 269 270 timestamp=zeros(1,numel(m.Data)); … … 281 282 if ~isempty(errormsg) 282 283 disp(errormsg) 284 return 285 end 286 if ~isequal(size(XmlData.Time(2:end,2:end)),size(reshape(timestamp(1:end),nbfield2,[])')) 287 disp(['size of record ' num2str(size(XmlData.Time(2:end,2:end))) ' does not fit with timestamp size ' num2str(size(reshape(timestamp(1:end),nbfield2,[])'))]) 283 288 return 284 289 end … … 327 332 for iview=1:size(Param.InputTable,1) 328 333 fullfile(RootPath,Param.InputTable{iview,2}) 329 330 [SUCCESS,MESSAGE]=rmdir( fullfile(RootPath,Param.InputTable{iview,2}),'s')334 source_dir=fullfile(RootPath,Param.InputTable{iview,2}); 335 [SUCCESS,MESSAGE]=rmdir(source_dir,'s') 331 336 end 332 337 end … … 368 373 classname=['*' classname]; 369 374 BitDepth=8*SeqData.bytesperpixel;%needed to write images (8 or 16 bits) 375 %%%% 376 % SeqData.binrepertoire='2017-01-26T11.59.57'; 377 %SeqData.binrepertoire='2017-01-26T16.57.27'; 378 %SeqData.binrepertoire='2017-01-26T19.28.05'; 379 %SeqData.binrepertoire='2017-01-27T09.51.34'; 380 %SeqData.binrepertoire='2017-01-27T14.21.47' 381 %%%% 370 382 binrepertoire=fullfile(PathDir,SeqData.binrepertoire); 371 383 FileDir=SeqData.sequencename;
Note: See TracChangeset
for help on using the changeset viewer.