Changeset 991 for trunk/src/series


Ignore:
Timestamp:
Feb 2, 2017, 1:25:44 PM (7 years ago)
Author:
sommeria
Message:

various

Location:
trunk/src/series
Files:
2 edited

Legend:

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

    r977 r991  
    5959%=======================================================================
    6060
    61 function ParamOut=ima2netcdf(Param)
     61function ParamOut=extract_multitif_parallel(Param)
    6262
    6363%%%%%%%%%%%%%%%%%    INPUT PREPARATION MODE (no RUN)    %%%%%%%%%%%%%%%%%
     
    143143XmlInput=imadoc2struct(XmlInputFile,'Camera');
    144144
     145%% create the xml file of PCO camera
     146XmlInput.Camera.CameraName='PCO';
     147t=struct2xml(XmlInput.Camera);
     148t=set(t,1,'name','ImaDoc');
     149save(t,fullfile(Param.InputTable{1,1},[Param.InputTable{1,2} '.xml']))
     150
    145151%% Main loop
    146152
  • trunk/src/series/extract_rdvision.m

    r982 r991  
    6464if isstruct(Param) && isequal(Param.Action.RUN,0)
    6565    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 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
     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 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
    7474    ParamOut.OutputSubDirMode='one'; %output folder given by the folder name of the first input line
    75      % detect the set of image folder
     75    % detect the set of image folder
    7676    RootPath=Param.InputTable{1,1};
    77     ListStruct=dir(RootPath);   
     77    ListStruct=dir(RootPath);
    7878    ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
    7979    check_bad=strcmp('.',ListCells(1,:))|strcmp('..',ListCells(1,:));%detect the dir '.' to exclude it
    8080    check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
    8181    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';
    8484    isel=0;
    8585    InputTable=Param.InputTable;
     
    9090        seq_index=find(~cellfun('isempty',detect_seq),1);
    9191        if ~isempty(seq_index)
    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};
     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};
    9797            RootFile=regexprep(ListCellSub{1,seq_index},'.seq$','');
    9898            InputTable{isel,3}=RootFile;
    99         InputTable{isel,4}='*';
    100         InputTable{isel,5}='.seq';
    101     end
     99            InputTable{isel,4}='*';
     100            InputTable{isel,5}='.seq';
     101        end
    102102    end
    103103    hseries=findobj(allchild(0),'Tag','series');% find the parent GUI 'series'
     
    105105    set(hhseries.InputTable,'Data',InputTable)
    106106    ParamOut.ActionInput.LogPath=RootPath;% indicate the path for the output info: 0_LOG ....
    107 return
     107    return
    108108end
    109109
     
    239239        SeqData.binrepertoire=regexprep(s.sequenceSettings.bindirectory,'\\$','');%tranform Windows notation to Linux
    240240        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];
    243243    end
    244244   
     
    253253   
    254254    %%%%%%%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;
    268269    %%%%%%%
    269270    timestamp=zeros(1,numel(m.Data));
     
    281282    if ~isempty(errormsg)
    282283        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,[])'))])
    283288        return
    284289    end
     
    327332        for iview=1:size(Param.InputTable,1)
    328333         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')
    331336        end
    332337    end
     
    368373classname=['*' classname];
    369374BitDepth=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%%%%
    370382binrepertoire=fullfile(PathDir,SeqData.binrepertoire);
    371383FileDir=SeqData.sequencename;
Note: See TracChangeset for help on using the changeset viewer.