Changeset 993 for trunk/src


Ignore:
Timestamp:
Feb 6, 2017, 11:29:01 AM (7 years ago)
Author:
sommeria
Message:

various updates

Location:
trunk/src
Files:
1 added
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/create_grid.m

    r977 r993  
    3030function varargout = create_grid(varargin)
    3131
    32 % Last Modified by GUIDE v2.5 16-Dec-2010 00:17:20
     32% Last Modified by GUIDE v2.5 02-Feb-2017 17:09:08
    3333
    3434% Begin initialization code - DO NOT EDIT
     
    169169    varargout{2}=T;
    170170    varargout{3}=get(handles.white,'Value');
     171    varargout{4}=0;
     172    if get(handles.CheckDots,'Value')
     173    varargout{4}=str2num(get(handles.FilterWindow,'String'));
     174    end
    171175end
    172176
     
    220224end   
    221225
    222 
    223226% --- Executes on button press in white.
    224227function white_Callback(hObject, eventdata, handles)
     
    229232    set(handles.black,'Value',1)
    230233end
    231 % hObject    handle to white (see GCBO)
    232 % eventdata  reserved - to be defined in a future version of MATLAB
    233 % handles    structure with handles and user data (see GUIDATA)
    234 
    235 % Hint: get(hObject,'Value') returns toggle state of white
    236234
    237235
     
    245243end
    246244
     245% --- Executes on button press in CheckDots.
     246function CheckDots_Callback(hObject, eventdata, handles)
     247val=get(handles.CheckDots,'Value');
     248if val
     249    set(handles.FilterWindow,'Visible','on')
     250    set(handles.FilterWindow_txt,'Visible','on')
     251else
     252    set(handles.FilterWindow,'Visible','off')
     253     set(handles.FilterWindow_txt,'Visible','off')
     254end
     255
  • trunk/src/geometry_calib.m

    r977 r993  
    856856    grid_input=CalibData.grid;%retrieve the previously used grid
    857857end
    858 [T,CalibData.grid,CalibData.grid.CheckWhite]=create_grid(grid_input,'detect_grid');%display the GUI create_grid, read the set of phys coordinates T
     858[T,CalibData.grid,CalibData.grid.CheckWhite,CalibData.grid.FilterWindow]=create_grid(grid_input,'detect_grid');%display the GUI create_grid, read the set of phys coordinates T
    859859set(handles.geometry_calib,'UserData',CalibData)%store the phys grid parameters for later use
    860860X=[CalibData.grid.x_0 CalibData.grid.x_1 CalibData.grid.x_0 CalibData.grid.x_1]';%corner absissa in the phys coordinates (cm)
     
    907907    Amod=-double(Amod);%case of black grid markers: will look for image minima
    908908end
     909
     910%%%%%%filterfor i;proved detection of dots
     911if ~isequal(CalibData.grid.FilterWindow,0)
     912    %definition of the cos shape matrix filter
     913    FilterBoxSize_x=CalibData.grid.FilterWindow;
     914    FilterBoxSize_y=CalibData.grid.FilterWindow;
     915    ix=1/2-FilterBoxSize_x/2:-1/2+FilterBoxSize_x/2;%
     916    iy=1/2-FilterBoxSize_y/2:-1/2+FilterBoxSize_y/2;%
     917    %del=np/3;
     918    %fct=exp(-(ix/del).^2);
     919    fct2_x=cos(ix/((FilterBoxSize_x-1)/2)*pi/2);
     920    fct2_y=cos(iy/((FilterBoxSize_y-1)/2)*pi/2);
     921    %Mfiltre=(ones(5,5)/5^2);
     922    Mfiltre=fct2_y'*fct2_x;
     923    Mfiltre=Mfiltre/(sum(sum(Mfiltre)));%normalize filter
     924   
     925    if ndims(Amod)==3
     926        Amod=filter2(Mfiltre,sum(Amod,3));%filter the input image, after summation on the color component (for color images)
     927    else
     928        Amod=filter2(Mfiltre,Amod);
     929    end
     930end
     931%%%%%%%%%%%%%%
     932
    909933
    910934%% detection of local image extrema in each direction
  • trunk/src/get_file_info.m

    r991 r993  
    146146end
    147147switch FileInfo.FileType
    148     case {'image','multimage','mmreader','video','netcdf','civdata'}
     148    case {'image','multimage','mmreader','cine_phantom','video','netcdf','civdata'}
    149149        FileInfo.FileIndexing='on'; % allow to detect file index for scanning series
    150150end
  • trunk/src/readCineHeader.m

    r979 r993  
    1 function [CineFileHeader, BitmapInfoHeader, CameraSetup, imageLocations,  annotationSize] = readCineHeader(filePath)
     1function [CineFileHeader, BitmapInfoHeader, CameraSetup, TimeOnlyBlock, ExposureOnlyBlock, TimeCodeBlock, imageLocations,  annotationSize] = readCineHeader(filePath)
    22
    33fid = fopen(filePath);
     
    2828BitmapInfoHeader.biClrUsed = fread(fid, 1, 'uint32');
    2929BitmapInfoHeader.biClrImportant = fread(fid, 1, 'uint32');
     30
     31fseek(fid, hex2dec('00E2'), 'bof');
     32CameraSetup.Length = fread(fid, 1, 'uint16');
     33
     34fseek(fid, hex2dec('0370'), 'bof');
     35CameraSetup.FirmwareVersion = fread(fid, 1, 'uint32');
     36
     37fseek(fid, hex2dec('0374'), 'bof');
     38CameraSetup.SoftwareVersion = fread(fid, 1, 'uint32');
    3039
    3140fseek(fid, hex2dec('0354'), 'bof');
     
    6069
    6170
     71%% Tagged Information Blocks
     72% AnalogDigitalSignals (ADS) -> not contained in MIRO cine-files
     73% ImageTimeTaggedBlock (ITTB) -> not contained in MIRO cine-files
     74
     75% TimeOnlyBlock (TOB) -> Type should be 1002
     76PositionTOB = CineFileHeader.OffSetup + CameraSetup.Length;
     77fseek(fid, PositionTOB , 'bof');
     78TimeOnlyBlock.Length = fread(fid, 1, 'uint32');
     79TimeOnlyBlock.Type = fread(fid, 1, 'uint16');
     80TimeOnlyBlock.Reserved = fread(fid, 1, 'uint16');
     81TimeOnlyBlock.Data = transpose([1:CineFileHeader.ImageCount ; fread(fid,[2,CineFileHeader.ImageCount], 'uint32')]); % Framenumber combined with Data contained in TOB
     82TimeOnlyBlock.TimestampsDatetime = datetime(TimeOnlyBlock.Data(:,3), 'ConvertFrom', 'posixtime');  % Timestamp as Datetime
     83% TimeOnlyBlock.TimestampsDatestr = datestr(TimeOnlyBlock.TimestampsDatetime);  % Timestamp as String
     84TimeOnlyBlock.TimestampsMillisec = TimeOnlyBlock.Data(:,2)./(2^32);    % Milliseconds of the Timestamp
     85TimeOnlyBlock.ExposureTimeDelays = [0 ; TimeOnlyBlock.TimestampsMillisec(2:end)-TimeOnlyBlock.TimestampsMillisec(1:end-1)]; % Timedifference between two frames. First frame is set to have no timedifference
     86
     87% ExposureOnlyBlock (EOB) -> Type should be 1003
     88PositionEOB = PositionTOB + TimeOnlyBlock.Length;
     89fseek(fid, PositionEOB , 'bof');
     90ExposureOnlyBlock.Length = fread(fid, 1, 'uint32');
     91ExposureOnlyBlock.Type = fread(fid, 1, 'uint16');
     92ExposureOnlyBlock.Reserved = fread(fid, 1, 'uint16');
     93ExposureOnlyBlock.Data = fread(fid,CineFileHeader.ImageCount, 'uint32');
     94ExposureOnlyBlock.ExposureTimesMillisec = ExposureOnlyBlock.Data ./(2^32) .*1000;
     95ExposureOnlyBlock.test1 = fread(fid, 1, 'uint32');
     96ExposureOnlyBlock.test2 = fread(fid, 1, 'uint16');
     97ExposureOnlyBlock.test3 = fread(fid, 1, 'uint16');
     98
     99% RangeDataBlock (RDB) -> not contained in MIRO cine-files
     100% BinSigBlock (BSB) -> not contained in MIRO cine-files
     101% AnaSigBlock (ASB) -> not contained in MIRO cine-files
     102
     103% TimeCodeBlock (TCB)  -> Type should be 1007
     104PositionTCB = PositionEOB + ExposureOnlyBlock.Length;
     105fseek(fid, PositionTCB , 'bof');
     106TimeCodeBlock.Length = fread(fid, 1, 'uint32');
     107TimeCodeBlock.Type = fread(fid, 1, 'uint16');
     108TimeCodeBlock.Reserved = fread(fid, 1, 'uint16');
     109TimeCodeBlock.Data = fread(fid, 1, 'uint8');
     110
     111
     112%% Image Locations and their Annotations
    62113fseek(fid, CineFileHeader.OffImageOffsets, 'bof');
    63114imageBlockLocations = fread(fid, CineFileHeader.ImageCount, 'int64');
    64 
    65115
    66116fseek(fid, imageBlockLocations(1), 'bof');
    67117annotationSize = fread(fid, 1, 'uint32');
    68118
    69 
    70119imageLocations = imageBlockLocations + annotationSize;
    71120
     121
     122%%
    72123fclose(fid);
  • trunk/src/read_cine_phantom.m

    r991 r993  
    33
    44
    5 [CineFileHeader, BitmapInfoHeader, CameraSetup, imageLocations] = readCineHeader(cineFilePath);
     5% [CineFileHeader, BitmapInfoHeader, CameraSetup, imageLocations] = readCineHeader(cineFilePath);       % old
     6[CineFileHeader, BitmapInfoHeader, CameraSetup, TimeOnlyBlock, ExposureOnlyBlock, TimeCodeBlock, imageLocations] = readCineHeader(cineFilePath);
    67fid = fopen(cineFilePath);
    78lookupTable = lookupTablePackedFun;
     
    2223    fseek(fid, imageLocations( frames(ii) ), 'bof');
    2324    if ~BitmapInfoHeader.biCompression
    24 %         [A,count]=fread(fid, 10000)
    2525        imTemp = fread(fid, [BitmapInfoHeader.biWidth BitmapInfoHeader.biHeight],'uint16');
    2626        imMat(:,:,ii) = imTemp';
    2727    else
    28         imTemp = fread(fid, [BitmapInfoHeader.biWidth BitmapInfoHeader.biHeight], 'ubit10','b');
    29         im = imTemp';
    30         im( im < 1 ) = 1;
    31         im =reshape( interp1( 1:1024, lookupTable, im(:) ), BitmapInfoHeader.biHeight, BitmapInfoHeader.biWidth);
    32         im( im < CameraSetup.BlackLevel ) = CameraSetup.BlackLevel;
    33         im( im > 4064 )=4064;
    34         imMat(:,:,ii) = reshape(interp1( CameraSetup.BlackLevel:4064, linspace(0,4095,4064 - CameraSetup.BlackLevel+1), im(:)),...
    35             BitmapInfoHeader.biHeight, BitmapInfoHeader.biWidth);
    36        
    37         if mod( round(0.01*Nf), ii)
    38             if ~exist('dispStr', 'var')
    39                 dispStr = ' ';
    40                 disp( dispStr )
    41             end
    42             
    43             lenDispStr = length( dispStr );
    44             dispStr = ['Reading is ' num2str( round( 100*ii/Nf ) ) '% complete'];
    45             disp( [char(8)*ones(1,lenDispStr+1) dispStr] )
    46         end
     28    imTemp = fread(fid, [BitmapInfoHeader.biWidth BitmapInfoHeader.biHeight], 'ubit10','b');
     29    im = imTemp';
     30    im( im < 1 ) = 1;
     31    im =reshape( interp1( 1:1024, lookupTable, im(:) ), BitmapInfoHeader.biHeight, BitmapInfoHeader.biWidth);
     32    im( im < CameraSetup.BlackLevel ) = CameraSetup.BlackLevel;
     33    im( im > 4064 )=4064;
     34    imMat(:,:,ii) = reshape(interp1( CameraSetup.BlackLevel:4064, linspace(0,4095,4064 - CameraSetup.BlackLevel+1), im(:)),...
     35        BitmapInfoHeader.biHeight, BitmapInfoHeader.biWidth);
     36   
     37    if mod( round(0.01*Nf), ii)
     38       if ~exist('dispStr', 'var')
     39           dispStr = ' ';
     40           disp( dispStr )
     41       end
     42       
     43     lenDispStr = length( dispStr );
     44     dispStr = ['Reading is ' num2str( round( 100*ii/Nf ) ) '% complete'];
     45     disp( [char(8)*ones(1,lenDispStr+1) dispStr] )
     46    end
    4747    end
    4848end
     
    5151end
    5252
    53 function lookupTable = lookupTablePackedFun()
     53function lookupTable = lookupTablePackedFun() 
    5454% function to transform the compressed 10 bit images back, close to the 12 bit camera images
    5555lookupTable = [ 2,   5,   6,   7,   8,   9,  10,  11,  12,  13,  14,  15,  16,  17,  17,  18,...
  • trunk/src/series/civ2vel_3C.m

    r990 r993  
    358358        end
    359359    end
    360     %remove wrong vector
    361     temp=find(Data{1}.FF==0);
    362     X1=Data{1}.X(temp);
    363     Y1=Data{1}.Y(temp);
    364     U1=Data{1}.U(temp);
    365     V1=Data{1}.V(temp);
    366    
     360    %remove wrong vector 
     361    if isfield(Data{1},'FF')
     362        temp=find(Data{1}.FF==0);
     363        X1=Data{1}.X(temp);
     364        Y1=Data{1}.Y(temp);
     365        U1=Data{1}.U(temp);
     366        V1=Data{1}.V(temp);
     367    else
     368        X1=Data{1}.X;
     369        Y1=Data{1}.Y;
     370        U1=Data{1}.U;
     371        V1=Data{1}.V;
     372    end
    367373    Ua=griddata(X1,Y1,U1,Xa,Ya);
    368374    Va=griddata(X1,Y1,V1,Xa,Ya);
    369    
    370     [Ua,Va,Xa,Ya]=Ud2U(XmlData{1}.GeometryCalib,Xa,Ya,Ua,Va); % convert Xd data to X
     375    [Ua,Va,Xa,Ya]=Ud2U(XmlData{1}.GeometryCalib,Xa,Ya,Ua,Va); % convert Xd data to X
    371376    [A]=get_coeff(XmlData{1}.GeometryCalib,Xa,Ya,XI,YI,ZI); %get coef A~
    372377   
    373     %remove wrong vector
    374     temp=find(Data{2}.FF==0);
    375     X2=Data{2}.X(temp);
    376     Y2=Data{2}.Y(temp);
    377     U2=Data{2}.U(temp);
    378     V2=Data{2}.V(temp);
     378    %remove wrong vector 
     379    if isfield(Data{1},'FF')
     380        temp=find(Data{2}.FF==0);
     381        X2=Data{2}.X(temp);
     382        Y2=Data{2}.Y(temp);
     383        U2=Data{2}.U(temp);
     384        V2=Data{2}.V(temp);
     385    else
     386        X2=Data{2}.X;
     387        Y2=Data{2}.Y;
     388        U2=Data{2}.U;
     389        V2=Data{2}.V;
     390    end
    379391    Ub=griddata(X2,Y2,U2,Xb,Yb);
    380392    Vb=griddata(X2,Y2,V2,Xb,Yb);
    381 
    382     [Ub,Vb,Xb,Yb]=Ud2U(XmlData{2}.GeometryCalib,Xb,Yb,Ub,Vb); % convert Xd data to X
     393    [Ub,Vb,Xb,Yb]=Ud2U(XmlData{2}.GeometryCalib,Xb,Yb,Ub,Vb); % convert Xd data to X
     394   
    383395    [B]=get_coeff(XmlData{2}.GeometryCalib,Xb,Yb,XI,YI,ZI); %get coef B~
    384    
     396    
    385397   
    386398    % System to solve
  • trunk/src/series/civ_series.m

    r981 r993  
    6060    Data.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    6161    Data.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
    62     if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices')&& strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
    63         Data.Desable_j_index='on';% hide the j index in series (set by the pair choice in civ_input)
    64     end
     62    %     if isfield(Data,'ActionInput') && isfield(Data.ActionInput,'PairIndices')&& strcmp(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
     63    %         Data.Desable_j_index='on';% hide the j index in series (set by the pair choice in civ_input)
     64    %     end
    6565    Data.NbSlice='off'; %nbre of slices ('off' by default)
    6666    Data.VelType='off';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     
    7373    Data.OutputFileMode='NbInput_i';% one output file expected per value of i index (used for waitbar)
    7474    Data.CheckOverwriteVisible='on'; % manage the overwrite of existing files (default=1)
     75    if isequal(Data.ActionInput.PairIndices.ListPairMode,'pair j1-j2')
     76        if isfield(Data.ActionInput.PairIndices,'ListPairCiv2')
     77            str_civ=Data.ActionInput.PairIndices.ListPairCiv2;
     78        else
     79            str_civ=Data.ActionInput.PairIndices.ListPairCiv1;
     80        end
     81        r=regexp(str_civ,'^j= (?<num1>[a-z])-(?<num2>[a-z])','names');
     82        if isempty(r)
     83            r=regexp(str_civ,'^j= (?<num1>[A-Z])-(?<num2>[A-Z])','names');
     84            if isempty(r)
     85                r=regexp(str_civ,'^j= (?<num1>\d+)-(?<num2>\d+)','names');
     86            end
     87        end
     88        if ~isempty(r)
     89            Data.j_index_1=stra2num(r.num1);
     90            Data.j_index_2=stra2num(r.num2);
     91        end
     92    end
    7593    return
    7694end
     
    200218        end
    201219        if isempty(i1_series_Civ1)||(~isempty(PairCiv2) && isempty(i1_series_Civ2))
    202             disp_uvmat('ERROR','no image pair fo civ in the input file index range',checkrun)
     220            disp_uvmat('ERROR','no image pair for civ in the input file index range',checkrun)
    203221            return
    204222        end
     
    208226    try
    209227        if Param.ActionInput.CheckCiv1% Civ1 is performed
     228            first_ima=1;
    210229            ImageName_A=fullfile_uvmat(RootPath_A,SubDir_A,RootFile_A,FileExt_A,NomType_A,i1_series_Civ1(1),[],j1_series_Civ1(1));
    211             if ~exist(ImageName_A,'file')
     230            if checkrun
     231                if ~exist(ImageName_A,'file')
    212232                disp_uvmat('ERROR',['first input image ' ImageName_A ' does not exist'],checkrun)
    213233                return
     234                end
     235            else
     236%                 for ifile=1:numel(i1_series_Civ1)
     237%                     if
    214238            end
    215239            [FileInfo_A,VideoObject_A]=get_file_info(ImageName_A);
     
    412436                if ~isempty(ME.message)
    413437                    disp_uvmat('ERROR', ['error reading input image: ' ME.message],checkrun)
    414                     return
     438                    continue
    415439                end
    416440            end
     
    11551179[npy,npx]=size(result_conv);
    11561180result_conv(result_conv<1)=1; %set to 1 correlation values smaller than 1  (=0 by discretisation, to avoid divergence in the log)
    1157 %the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ï¿œ Israel Institute of Technology
     1181%the following 8 lines are copyright (c) 1998, Uri Shavit, Roi Gurka, Alex Liberzon, Technion ??? Israel Institute of Technology
    11581182%http://urapiv.wordpress.com
    11591183peaky = y;
     
    11921216        for j=-1:1
    11931217            %following 15 lines based on
    1194             %H. Nobach ï¿œ M. Honkanen (2005)
     1218            %H. Nobach ??? M. Honkanen (2005)
    11951219            %Two-dimensional Gaussian regression for sub-pixel displacement
    11961220            %estimation in particle image velocimetry or particle position
    11971221            %estimation in particle tracking velocimetry
    1198             %Experiments in Fluids (2005) 38: 511ï¿œ515
     1222            %Experiments in Fluids (2005) 38: 511???515
    11991223            c10(j+2,i+2)=i*log(result_conv(y+j, x+i));
    12001224            c01(j+2,i+2)=j*log(result_conv(y+j, x+i));
  • trunk/src/series/extract_multitif_parallel.m

    r991 r993  
    9595        return
    9696    end
    97     xmlinput=uigetfile_uvmat('pick xml file for timing',fileparts(fileparts(FirstFileName)),'.xml');
    98     [tild,ParamOut.ActionInput.XmlFile]=fileparts(xmlinput);
    99     ParamOut.ActionInput.XmlFile
    100    
     97    ParamOut.ActionInput.XmlFile=uigetfile_uvmat('pick xml file for timing',fileparts(fileparts(FirstFileName)),'.xml'); 
    10198    return
    10299end
     
    140137
    141138%% Timing
    142 XmlInputFile=fullfile(Param.InputTable{1,1},[Param.ActionInput.XmlFile '.xml'])
    143 XmlInput=imadoc2struct(XmlInputFile,'Camera');
    144 
    145 %% create the xml file of PCO camera
     139XmlInputFile=Param.ActionInput.XmlFile;
     140[XmlInput,errormsg]=imadoc2struct(XmlInputFile,'Camera');
     141if ~isempty(errormsg)
     142    disp(['bad xml input file: ' errormsg])
     143    return
     144end
     145ImagesPerLevel=size(XmlInput.Time,2)-1;%100;%use the xmlinformation to get the nbre of j indices
     146
     147%% create the xml file of PCO camera if it does not exist
     148Newxml=fullfile(Param.InputTable{1,1},[Param.InputTable{1,2} '.xml']);
     149if ~exist(Newxml,'file')
    146150XmlInput.Camera.CameraName='PCO';
    147 t=struct2xml(XmlInput.Camera);
     151XmlInput=rmfield(XmlInput,'Time');
     152XmlInput=rmfield(XmlInput,'TimeUnit');
     153t=struct2xml(XmlInput);
    148154t=set(t,1,'name','ImaDoc');
    149 save(t,fullfile(Param.InputTable{1,1},[Param.InputTable{1,2} '.xml']))
     155save(t,Newxml);
     156end
    150157
    151158%% Main loop
    152159
    153 ImagesPerLevel=size(XmlInput.Time,2)-1;%100;
     160
    154161% count=0;
    155162%count=316;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP08: 4684 images -> start at 316 start 67->_11_1
    156163%count=1934%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%CORRECTION EXP07: 3066 images
    157164%% loop on the files
    158 %for ifile=1:numel(ListFile)
    159 %     update_waitbar(WaitbarHandle,ifile/numel(ListFile))
    160 %     if ~isempty(RUNHandle)&& ~strcmp(get(RUNHandle,'BusyAction'),'queue')
    161 %         disp('program stopped by user')
    162 %         break
    163 %     end
    164 %    ImageName=fullfile(DirImages,ListFile{ifile});
    165 %   NbFrames=numel(imfinfo(ImageName));
    166 % loop on the frames within the tiff file
     165% include the first tiff file with no index in the first iteration
    167166if Param.IndexRange.first_i==1% first slice of processing
    168167    firstindex=0;
    169168   count=0;
    170 %     count=3;
    171169else
    172170    firstindex=Param.IndexRange.first_i;
     
    174172    NbFrames=numel(imfinfo(ImageName));
    175173   count=Param.IndexRange.first_i*NbFrames;
    176  %   count=Param.IndexRange.first_i*NbFrames+3;
    177174end
    178175for ifile=firstindex:Param.IndexRange.last_i
    179176    if firstindex==0 && ifile==0% first slice of processing
    180             ImageName=fullfile(Param.InputTable{1,1},Param.InputTable{1,2},'im.tif')
     177        ImageName=fullfile(Param.InputTable{1,1},Param.InputTable{1,2},'im.tif')
    181178    else
    182179        ImageName=fullfile(Param.InputTable{1,1},Param.InputTable{1,2},['im@' num2str(ifile,'%04d') '.tif'])
     
    202199    end
    203200end
    204     %end
    205 
    206 % for ifile=1:numel(ListFile)
    207 %     update_waitbar(WaitbarHandle,ifile/numel(ListFile))
    208 %     if ~isempty(RUNHandle)&& ~strcmp(get(RUNHandle,'BusyAction'),'queue')
    209 %         disp('program stopped by user')
    210 %         break
    211 %     end
    212 %     ImageName=fullfile(DirImages,ListFile{ifile});
    213 %     NbFrames=numel(imfinfo(ImageName));
    214 %     % loop on the frames within the tiff file
    215 %     for iframe=1:NbFrames     
    216 %         A=imread(ImageName,iframe);
    217 %
    218 %         if isequal(ImagesPerLevel,1)% mode series
    219 %             i_index=count+1;
    220 %             OutputFile=fullfile(OutputDir,['img_' num2str(count+1) '.png']);
    221 %         else % indices i and j
    222 %             i_index=fix(count/ImagesPerLevel)+1;
    223 %             j_index=mod(count,ImagesPerLevel)+1;
    224 %             OutputFile=fullfile(OutputDir,['img_' num2str(i_index) '_' num2str(j_index) '.png']);
    225 %         end
    226 %         imwrite(A,OutputFile,'BitDepth',16)
    227 %         count=count+1;
    228 %     end
    229 % end
    230 
    231 %% create the xml file of PCO camera
    232 % XmlInput.Camera.CameraName='PCO';
    233 % t=struct2xml(XmlInput.Camera);
    234 % t=set(t,1,'name','ImaDoc');
    235 % save(t,fullfile(Param.InputTable{1,1},'PCO.xml'))
    236 
    237 %% remove initial files if transfer OK
    238 %     if i_index== (size(XmlInput.Time,1)-1)
    239 %
    240 %         [SUCCESS,MESSAGE]=rmdir(DirImages,'s')
    241 %       
    242 %     end
     201
     202
     203
Note: See TracChangeset for help on using the changeset viewer.