source: trunk/src/series/extract_rdvision.m @ 930

Last change on this file since 930 was 930, checked in by sommeria, 9 years ago

extract functions updated

File size: 20.9 KB
Line 
1%'extract_rdvision': relabel an image series with two indices, and correct errors from the RDvision transfer program
2%------------------------------------------------------------------------
3% function ParamOut=extract_rdvision(Param)
4%------------------------------------------------------------------------
5%
6%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
7%
8%OUTPUT
9% ParamOut: sets options in the GUI series.fig needed for the function
10%
11%INPUT:
12% In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series.
13% In batch mode, Param is the name of the corresponding xml file containing the same information
14% when Param.Action.RUN=0 (as activated when the current Action is selected
15% in series), the function ouput paramOut set the activation of the needed GUI elements
16%
17% Param contains the elements:(use the menu bar command 'export/GUI config' in series to
18% see the current structure Param)
19%    .InputTable: cell of input file names, (several lines for multiple input)
20%                      each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension}
21%    .OutputSubDir: name of the subdirectory for data outputs
22%    .OutputDirExt: directory extension for data outputs
23%    .Action: .ActionName: name of the current activated function
24%             .ActionPath:   path of the current activated function
25%             .ActionExt: fct extension ('.m', Matlab fct, '.sh', compiled   Matlab fct
26%             .RUN =0 for GUI input, =1 for function activation
27%             .RunMode='local','background', 'cluster': type of function  use
28%             
29%    .IndexRange: set the file or frame indices on which the action must be performed
30%    .FieldTransform: .TransformName: name of the selected transform function
31%                     .TransformPath:   path  of the selected transform function
32%    .InputFields: sub structure describing the input fields withfields
33%              .FieldName: name(s) of the field
34%              .VelType: velocity type
35%              .FieldName_1: name of the second field in case of two input series
36%              .VelType_1: velocity type of the second field in case of two input series
37%              .Coord_y: name of y coordinate variable
38%              .Coord_x: name of x coordinate variable
39%    .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object)
40%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
41
42%=======================================================================
43% Copyright 2008-2016, LEGI UMR 5519 / CNRS UGA G-INP, Grenoble, France
44%   http://www.legi.grenoble-inp.fr
45%   Joel.Sommeria - Joel.Sommeria (A) legi.cnrs.fr
46%
47%     This file is part of the toolbox UVMAT.
48%
49%     UVMAT is free software; you can redistribute it and/or modify
50%     it under the terms of the GNU General Public License as published
51%     by the Free Software Foundation; either version 2 of the license,
52%     or (at your option) any later version.
53%
54%     UVMAT is distributed in the hope that it will be useful,
55%     but WITHOUT ANY WARRANTY; without even the implied warranty of
56%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57%     GNU General Public License (see LICENSE.txt) for more details.
58%=======================================================================
59
60function ParamOut=extract_rdvision(Param) %default output=relabel_i_j(Param)
61
62%% set the input elements needed on the GUI series when the action is selected in the menu ActionName
63if isstruct(Param) && isequal(Param.Action.RUN,0)
64    ParamOut.AllowInputSort='off';...% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
65    ParamOut.WholeIndexRange='on';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
66    ParamOut.NbSlice=1; ...%nbre of slices, 1 prevents splitting in several processes, ('off' by default)
67    ParamOut.VelType='off';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
68    ParamOut.FieldName='off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
69    ParamOut.FieldTransform = 'off';...%can use a transform function
70    ParamOut.ProjObject='off';...%can use projection object(option 'off'/'on',
71    ParamOut.Mask='off';...%can use mask option   (option 'off'/'on', 'off' by default)
72     ParamOut.OutputDirExt='.extract';%set the output dir extension
73    ParamOut.OutputSubDirMode='one'; %output folder given by the folder name of the first input line
74     % detect the set of image folder
75    RootPath=Param.InputTable{1,1};
76    ListStruct=dir(RootPath);   
77    ListCells=struct2cell(ListStruct);% transform dir struct to a cell arrray
78    check_bad=strcmp('.',ListCells(1,:))|strcmp('..',ListCells(1,:));%detect the dir '.' to exclude it
79    check_dir=cell2mat(ListCells(4,:));% =1 for directories, =0 for files
80    ListDir=ListCells(1,find(check_dir & ~check_bad));
81%     InputTable=cell(numel(ListDir),5);
82%     InputTable(:,2)=ListDir';
83    isel=0;
84    InputTable=Param.InputTable;
85    for ilist=1:numel(ListDir)
86        ListStructSub=dir(fullfile(RootPath,ListDir{ilist}));
87        ListCellSub=struct2cell(ListStructSub);% transform dir struct to a cell arrray
88        detect_seq=regexp(ListCellSub(1,:),'.seq$');
89        seq_index=find(~cellfun('isempty',detect_seq),1);
90        if ~isempty(seq_index)
91%             msgbox_uvmat('ERROR',['not seq file in ' ListDir{ilist} ': please check the input folders'])
92%         else
93           isel=isel+1;
94           InputTable{isel,1}=RootPath;
95           InputTable{isel,2}=ListDir{ilist};
96            RootFile=regexprep(ListCellSub{1,seq_index},'.seq$','');
97            InputTable{isel,3}=RootFile;
98        InputTable{isel,4}='*';
99        InputTable{isel,5}='.seq';
100    end
101    end
102    hseries=findobj(allchild(0),'Tag','series');% find the parent GUI 'series'
103    hhseries=guidata(hseries); %handles of the elements in 'series'
104    set(hhseries.InputTable,'Data',InputTable)
105    ParamOut.ActionInput.LogPath=RootPath;% indicate the path for the output info: 0_LOG ....
106return
107end
108
109ParamOut=[];
110%%%%%%%%%%%% STANDARD PART  %%%%%%%%%%%%
111%% read input parameters from an xml file if input is a file name (batch mode)
112checkrun=1;
113if ischar(Param)
114    Param=xml2struct(Param);% read Param as input file (batch case)
115    checkrun=0;
116end
117hseries=findobj(allchild(0),'Tag','series');
118RUNHandle=findobj(hseries,'Tag','RUN');%handle of RUN button in GUI series
119WaitbarHandle=findobj(hseries,'Tag','Waitbar');%handle of waitbar in GUI series
120
121%% root input file(s) and type
122RootPath=Param.InputTable{1,1};
123if ~isempty(find(~strcmp(RootPath,Param.InputTable(:,1))))% if the Rootpath for each camera are not identical
124    disp_uvmat('ERROR','Rootpath for all cameras must be identical',checkrun)
125    return
126end
127
128% get the set of input file names (cell array filecell), and the lists of
129% input file or frame indices i1_series,i2_series,j1_series,j2_series
130[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
131
132%OutputDir=[Param.OutputSubDir Param.OutputDirExt];
133 
134% numbers of slices and file indices
135nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices)
136nbfield_i=size(i1_series{1},2); %nb of fields for the i index
137nbfield=nbfield_j*nbfield_i; %total number of fields
138
139%determine the file type on each line from the first input file
140
141FileInfo=get_file_info(filecell{1,1});
142if strcmp(FileInfo.FileType,'rdvision')
143    if ~isequal(FileInfo.NumberOfFrames,nbfield)
144        msgbox_uvmat('ERROR',['the whole series of ' num2str(FileInfo.NumberOfFrames) ' images must be extracted at once'])
145        %rmfield(OutputDir)
146%         return
147    end
148    %% interactive input of specific parameters (for RDvision system)
149    display('converting images from RDvision system...')
150else
151    msgbox_uvmat('ERROR','the input is not from rdvision: a .seq or .sqb file must be opened')
152    return
153end
154t=xmltree;
155
156save(t,fullfile(RootPath,'Running.xml'))%create an xml file to indicate that processing takes place
157
158%% calibration data and timing: read the ImaDoc files
159mode=''; %default
160timecell={};
161itime=0;
162NbSlice_calib={};
163
164%SubDirBase=regexprep(SubDir{1},'\..*','');%take the root part of SubDir, before the first dot '.'
165
166%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
167%%%  loop on the cameras ( #iview)
168%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
169% RootPath=Param.InputTable(:,1);
170% RootFile=Param.InputTable(:,3);
171% SubDir=Param.InputTable(:,2);
172% NomType=Param.InputTable(:,4);
173% FileExt=Param.InputTable(:,5);
174
175% [XmlData,NbSlice_calib,time,errormsg]=read_multimadoc(RootPath,SubDir,RootFile,FileExt,i1_series,i2_series,j1_series,j2_series);
176% if size(time,1)>1
177%     diff_time=max(max(diff(time)));
178%     if diff_time>0
179%         disp_uvmat('WARNING',['times of series differ by (max) ' num2str(diff_time)],checkrun)
180%     end
181% end
182%
183%      nbfield2=size(time,1);
184checkpreserve=0;% if =1, will npreserve the original images, else it erases them at the end
185for iview=1:size(Param.InputTable,1)
186    for iview_xml=1:size(Param.InputTable,1)% look for the xml files in the different data directories
187        filexml=[fullfile(RootPath,Param.InputTable{iview_xml,2},Param.InputTable{iview,3}) '.xml'];%new convention: xml at the level of the image folder
188        if exist(filexml,'file')
189            break
190        end
191    end
192    if ~exist(filexml,'file')
193        disp_uvmat('ERROR',[filexml ' missing'],checkrun)
194        return
195    end
196 
197    newxml=fullfile(RootPath,Param.InputTable{iview,3});
198    newxml=regexprep(newxml,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180'
199    newxml=[newxml '.xml'];
200   
201    %copyfile_modif(filexml,newxml); %copy the xml file in the upper folder
202   
203    %[XmlData,errormsg]=imadoc2struct(newxml);
204%     nbfield2=size(XmlData.Time,2)-1;
205%     if nbfield2>1
206%         NomTypeNew='_1_1';
207%     else
208%         NomTypeNew='_1';
209%     end
210    %% get the names of .seq and .sqb files
211    switch Param.InputTable{iview,5}
212        case {'.seq','.sqb'}
213            filename_seq=fullfile(RootPath,Param.InputTable{iview,2},[Param.InputTable{iview,3} '.seq']);
214            filename_sqb=fullfile(RootPath,Param.InputTable{iview,2},[Param.InputTable{iview,3} '.sqb']);
215            logdir=[Param.OutputSubDir Param.OutputDirExt];
216            [success,errormsg] = copyfile(filename_seq,[fullfile(RootPath,logdir,Param.InputTable{iview,3}) '.seq']); %copy the seq file in the upper folder
217            [success,errormsg] = copyfile(filename_sqb,[fullfile(RootPath,logdir,Param.InputTable{iview,3}) '.sqb']); %copy the sqb file in the upper folder
218        otherwise
219            errormsg='input file extension must be .seq or .sqb';
220    end
221    if ~exist(filename_seq,'file')
222        errormsg=[filename_seq ' does not exist'];
223    end
224    if ~isempty(errormsg)
225        disp_uvmat('ERRROR',errormsg,checkrun);
226        return
227    end
228   
229
230    %% get data from .seq file
231    s=ini2struct(filename_seq);
232    SeqData=s.sequenceSettings;
233    SeqData.width=str2double(SeqData.width);
234    SeqData.height=str2double(SeqData.height);
235    SeqData.bytesperpixel=str2double(SeqData.bytesperpixel);
236    SeqData.nb_frames=str2double(s.sequenceSettings.numberoffiles);
237    if isempty(SeqData.binrepertoire)%used when binrepertoire empty, strange feature of rdvision
238        SeqData.binrepertoire=regexprep(s.sequenceSettings.bindirectory,'\\$','');%tranform Windows notation to Linux
239        SeqData.binrepertoire=regexprep(SeqData.binrepertoire,'\','/');
240        [tild,binrepertoire,DirExt]=fileparts(SeqData.binrepertoire);
241        SeqData.binrepertoire=[SeqData.binrepertoire DirExt];
242    end
243   
244   
245    %% reading the .sqb file
246    m = memmapfile(filename_sqb,'Format', { 'uint32' [1 1] 'offset'; ...
247        'uint32' [1 1] 'garbage1';...
248        'double' [1 1] 'timestamp';...
249        'uint32' [1 1] 'file_idx';...
250        'uint32' [1 1] 'garbage2' },'Repeat',SeqData.nb_frames);
251   
252    %%%%%%%BRICOLAGE in case of unreadable .sqb file: remplace lecture du fichier
253    %         ind=[111 114:211];%indices of bin files
254    %         w=1024;%w=width of images in pixels
255    %         h=1024;%h=height of images in pixels
256    %         bpp=2;% nbre of bytes per pixel
257    %         lengthimage=w*h*bpp;% lengthof an image record on the binary file
258    %         nbimages=32; %nbre of images of each camera in a bin file
259    %         for ii=1:32*numel(ind)
260    %             data(ii).offset=mod(ii-1,32)*2*lengthimage+lengthimage;%Dalsa_2
261    %             %data(ii).offset=mod(ii-1,32)*2*lengthimage;%Dalsa_1
262    %             data(ii).file_idx=ind(ceil(ii/32));
263    %             data(ii).timestamp=0.2*(ii-1);
264    %         end
265    %         m.Data=data;
266    %%%%%%%
267    timestamp=zeros(1,numel(m.Data));
268    for ii=1: numel(m.Data)
269        timestamp(ii)=m.Data(ii).timestamp;
270%         j1=1;
271%         if ~isequal(nbfield2,1)
272%             j1=mod(ii-1,nbfield2)+1;
273%         end
274%         i1=floor((ii-1)/nbfield2)+1;
275        %diff_time(i1,j1)= timestamp(ii)-XmlData.Time(i1+1,j1+1);
276    end
277    [nbfield2,msg]=copyfile_modif(filexml,timestamp,newxml); %copy the xml file in the upper folder
278    [XmlData,errormsg]=imadoc2struct(newxml);% check reading of the new xml file
279    if ~isempty(errormsg)
280        disp(errormsg)
281        return
282    end
283    difftime=XmlData.Time(2:end,2:end)-(reshape(timestamp,nbfield2,[]))';
284    disp(['time from xml and timestamp differ by ' num2str(max(max(abs(difftime))))])
285    if max(abs(difftime))>0.01
286        checkpreserve=1;% will not erase the initial files, possibility of error
287    end
288    if nbfield2>1
289        NomTypeNew='_1_1';
290    else
291        NomTypeNew='_1';
292    end
293
294    [BinList,errormsg]=binread_rdv_series(RootPath,SeqData,m.Data,nbfield2,NomTypeNew);
295    if ~isempty(errormsg)
296        disp_uvmat('ERROR',errormsg,checkrun)
297        return
298    end
299   
300    % check the existence of the expected output image files (from the xml)
301    FileDir=SeqData.sequencename;
302     FileDir=regexprep(FileDir,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180'
303    for i1=1:npi-1
304        for j1=1:npj-1
305            OutputFile=fullfile_uvmat(RootPath,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode
306            A=imread(OutputFile);% check image reading (stop if error)
307        end
308    end
309end
310
311%% remove binary files if transfer OK
312    if ~checkpreserve
313        for iview=1:size(Param.InputTable,1)
314         fullfile(RootPath,Param.InputTable{iview,2})
315
316        [SUCCESS,MESSAGE]=rmdir(fullfile(RootPath,Param.InputTable{iview,2}),'s')
317        end
318    end
319delete(fullfile(RootPath,'Running.xml'))%delete the  xml file to indicate that processing is finished
320
321%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
322%--------- reads a series of bin files
323
324%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
325function [BinList,errormsg]=binread_rdv_series(PathDir,SeqData,SqbData,nbfield2,NomTypeNew)
326% BINREAD_RDV Permet de lire les fichiers bin gᅵnᅵrᅵs par Hiris ᅵ partir du
327% fichier seq associᅵ.
328%   [IMGS,TIMESTAMPS,NB_FRAMES] = BINREAD_RDV(FILENAME,FRAME_IDX) lit
329%   l'image d'indice FRAME_IDX de la sï¿œquence FILENAME.
330%
331%   Entrï¿œes
332%   -------
333%   FILENAME  : Nom du fichier sï¿œquence (.seq).
334%   FRAME_IDX : Indice de l'image ï¿œ lire. Si FRAME_IDX vaut -1 alors la
335%   sï¿œquence est entiï¿œrement lue. Si FRAME_IDX est un tableau d'indices
336%   alors toutes les images d'incides correspondant sont lues. Si FRAME_IDX
337%   est un tableau vide alors aucune image n'est lue mais le nombre
338%   d'images et tous les timestamps sont renvoyï¿œs. Les indices commencent ï¿œ
339%   1 et se termines ï¿œ NB_FRAMES.
340%
341%   Sorties
342%   -------
343%   IMGS        : Images de sortie.
344%   TIMESTAMPS  : Timestaps des images lues.
345%   NB_FRAMES   : Nombres d'images dans la sï¿œquence.
346NbBinFile=0;
347BinSize=0;
348fid=0;
349errormsg='';
350BinList={};
351
352classname=sprintf('uint%d',SeqData.bytesperpixel*8);
353
354classname=['*' classname];
355BitDepth=8*SeqData.bytesperpixel;%needed to write images (8 or 16 bits)
356binrepertoire=fullfile(PathDir,SeqData.binrepertoire);
357FileDir=SeqData.sequencename;
358FileDir=regexprep(FileDir,'_Master_Dalsa_4M180$','');%suppress '_Master_Dalsa_4M180'
359OutputDir=fullfile(PathDir,FileDir);
360if ~exist(OutputDir,'dir')
361    %     errormsg=[OutputDir ' already exist, delete it first'];
362    %     return
363    % end
364    [s,errormsg]=mkdir(OutputDir);
365   
366    if s==0
367        disp(errormsg)
368        return%not able to create new image dir
369    end
370end
371bin_file_counter=0;
372for ii=1:SeqData.nb_frames
373    j1=[];
374    if ~isequal(nbfield2,1)
375        j1=mod(ii-1,nbfield2)+1;
376    end
377    i1=floor((ii-1)/nbfield2)+1;
378    OutputFile=fullfile_uvmat(PathDir,FileDir,'img','.png',NomTypeNew,i1,[],j1);% TODO: set NomTypeNew from SeqData.mode
379    fname=fullfile(binrepertoire,sprintf('%s%.5d.bin',SeqData.binfile,SqbData(ii).file_idx));
380    if exist(OutputFile,'file')
381        fid=0;
382    else
383        if fid==0 || ~strcmp(fname,fname_prev) % open the bin file if not in use
384            if fid~=0
385                fclose(fid);%close the previous bin file if relevant
386            end
387            [fid,msg]=fopen(fname,'rb');
388            if isequal(fid,-1)
389                errormsg=['error in opening ' fname ': ' msg];
390                return
391            else
392                disp([fname ' opened for reading'])
393                bin_file_counter=bin_file_counter+1;
394                BinList{bin_file_counter}=fname;
395            end
396            fseek(fid,SqbData(ii).offset,-1);%look at the right starting place in the bin file
397            NbBinFile=NbBinFile+1;%counter of binary files (for checking purpose)
398            BinSize(NbBinFile)=0;% strat counter for new bin file
399        else
400            fseek(fid,SqbData(ii).offset,-1);%look at the right starting place in the bin file
401        end
402        fname_prev=fname;
403        A=reshape(fread(fid,SeqData.width*SeqData.height,classname),SeqData.width,SeqData.height);%read the current image
404        A=A';
405        BinSize(NbBinFile)=BinSize(NbBinFile)+SeqData.width*SeqData.height*SeqData.bytesperpixel*8; %record bits read
406        try
407            imwrite(A,OutputFile,'BitDepth',BitDepth) % case of 16 bit images
408            disp([OutputFile ' written']);
409            % [s,errormsg] = fileattrib(OutputFile,'-w','a'); %set images to read only '-w' for all users ('a')
410            %         if ~s
411            % %             disp_uvmat('ERROR',errormsg,checkrun);
412            %             return
413            %         end
414        catch ME
415            errormsg=ME.message;
416            return
417        end
418    end
419end
420if fid~=0
421fclose(fid)
422end
423
424
425
426
427function [nbfield2,msg]=copyfile_modif(filexml,timestamp,newxml)
428msg='';
429t=xmltree(filexml);
430
431%% correct NbDtj
432uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj');
433uid_content=get(t,uid_NbDtj,'contents');
434t=set(t,uid_content,'value','1');% set NbDtj to 1 (correct error in the xml file)
435
436%% check Dtj
437uid_Dtj=find(t,'ImaDoc/Camera/BurstTiming/Dtj');
438uid_content=get(t,uid_Dtj,'contents');
439Dtj=str2num(get(t,uid_content,'value'));
440nbfield2=numel(Dtj)+1;
441timestamp=(reshape(timestamp,nbfield2,[]))';
442diff_Dtj=diff(timestamp(1,:))-Dtj;
443if max(abs(diff_Dtj))>min(Dtj)/1000
444    disp(['Dtj from xml file differs from time stamp by ' num2str(max(abs(diff_Dtj))) ', '])%'
445else
446    disp('Dtj OK');
447end
448
449%% correct NbDti
450NbDti=size(timestamp,1); %default for series or burst
451uid_motor_nbslice=find(t,'ImaDoc/TranslationMotor/Nbslice');
452if ~isempty(uid_motor_nbslice)
453    uid_content=get(t,uid_motor_nbslice,'contents');
454    NbSlice=str2num(get(t,uid_content,'value'));
455    NbDti=NbSlice-1;
456uid_NbDti=find(t,'ImaDoc/Camera/BurstTiming/NbDti');
457uid_content=get(t,uid_NbDti,'contents');
458t=set(t,uid_content,'value',num2str(NbDti));
459end
460
461%% adjust Dti
462uid_Dti=find(t,'ImaDoc/Camera/BurstTiming/Dti');
463uid_content=get(t,uid_Dti,'contents');
464Dti=str2num(get(t,uid_content,'value'));
465Dti_stamp=(timestamp(1+NbDti,1)-timestamp(1,1))/NbDti;
466if abs(Dti_stamp-Dti)>Dti/1000
467    disp([msg 'Dti from xml file corrected by ' num2str(Dti_stamp-Dti) ', ']);%'
468else
469    disp('Dti OK')
470end
471t=set(t,uid_content,'value',num2str(Dti_stamp));
472
473%% adjust Dtk
474uid_Dtk=find(t,'ImaDoc/Camera/BurstTiming/Dtk');
475if ~isempty(uid_Dtk)
476uid_content_Dtk=get(t,uid_Dtk,'contents');
477Dtk=str2num(get(t,uid_content_Dtk,'value'));
478uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk');
479uid_content_NbDtk=get(t,uid_NbDtk,'contents');
480NbDtk=str2num(get(t,uid_content_NbDtk,'value'));
481Dtk_stamp=(timestamp(end-NbDti,1)-timestamp(1,1))/NbDtk;
482if abs(Dtk_stamp-Dtk)>Dtk/1000
483    disp([msg 'Dtk from xml file corrected by ' num2str(Dtk_stamp-Dtk)]);
484else
485    disp('Dtk OK')
486end
487t=set(t,uid_content_Dtk,'value',num2str(Dtk_stamp));
488end
489
490save(t,newxml)
491
492
493
494
Note: See TracBrowser for help on using the repository browser.