Ignore:
Timestamp:
Jun 17, 2012, 10:52:04 PM (12 years ago)
Author:
sommeria
Message:

merg_i_j transformed to the new standards.
Various improvements

File:
1 edited

Legend:

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

    r249 r457  
    11%'relabel_i_j': relabel an image series with two indices, and correct errors from the RDvision transfer program
    2 %----------------------------------------------------------------------
    3 function GUI_input=relabel_i_j(num_i1,num_i2,num_j1,num_j2,Series)
    4 %requests for the visibility of input windows in the GUI series  (activated directly by the selection in the menu ACTION)
    5 
    6 GUI_input={};
    7 
    8 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%enable waitbar
    9 hGUI=findobj(allchild(0),'name','series');
    10 hseries=guidata(hGUI);%handles of the GUI series
    11 WaitbarPos=get(hseries.waitbar_frame,'Position');
    12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    13 
    14 %% PARAMETERS (for RDvision system)
     2%------------------------------------------------------------------------
     3% function GUI_config=relabel_i_j(Param)
     4%------------------------------------------------------------------------
     5
     6%%%%%%%%%%% GENERAL TO ALL SERIES ACTION FCTS %%%%%%%%%%%%%%%%%%%%%%%%%%%
     7%
     8% This function is used in four modes by the GUI series:
     9%           1) config GUI: with no input argument, the function determine the suitable GUI configuration
     10%           2) interactive input: the function is used to interactively introduce input parameters, and then stops
     11%           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
     12%           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
     13%
     14% This function is used in four modes by the GUI series:
     15%           1) config GUI: with no input argument, the function determine the suitable GUI configuration
     16%           2) interactive input: the function is used to interactively introduce input parameters, and then stops
     17%           3) RUN: the function itself runs, when an appropriate input  structure Param has been introduced.
     18%           4) BATCH: the function itself proceeds in BATCH mode, using an xml file 'Param' as input.
     19%
     20%OUTPUT
     21% GUI_input=list of options in the GUI series.fig needed for the function
     22%
     23%INPUT:
     24% In run mode, the input parameters are given as a Matlab structure Param copied from the GUI series.
     25% In batch mode, Param is the name of the corresponding xml file containing the same information
     26% In the absence of input (as activated when the current Action is selected
     27% in series), the function ouput GUI_input set the activation of the needed GUI elements
     28%
     29% Param contains the elements:(use the menu bar command 'export/GUI config' in series to see the current structure Param)
     30%    .InputTable: cell of input file names, (several lines for multiple input)
     31%                      each line decomposed as {RootPath,SubDir,Rootfile,NomType,Extension}
     32%    .OutputSubDir: name of the subdirectory for data outputs
     33%    .OutputDir: directory for data outputs, including path
     34%    .Action: .ActionName: name of the current activated function
     35%             .ActionPath:   path of the current activated function
     36%    .IndexRange: set the file or frame indices on which the action must be performed
     37%    .FieldTransform: .TransformName: name of the selected transform function
     38%                     .TransformPath:   path  of the selected transform function
     39%                     .TransformHandle: corresponding function handle
     40%    .InputFields: sub structure describing the input fields withfields
     41%              .FieldName: name of the field
     42%              .VelType: velocity type
     43%              .FieldName_1: name of the second field in case of two input series
     44%              .VelType_1: velocity type of the second field in case of two input series
     45%    .ProjObject: %sub structure describing a projection object (read from ancillary GUI set_object)
     46%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     47
     48function GUI_config=relabel_i_j(Param)
     49
     50%% set the input elements needed on the GUI series when the action is selected in the menu ActionName
     51if ~exist('Param','var') % case with no input parameter
     52    GUI_config={'NbViewMax';1;...% max nbre of input file series (default='' , no limitation)
     53        'AllowInputSort';'off';...% allow alphabetic sorting of the list of input files (options 'off'/'on', 'off' by default)
     54        'WholeIndexRange';'on';...% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default)
     55        'NbSlice';'off'; ...%nbre of slices ('off' by default)
     56        'VelType';'off';...% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
     57        'FieldName';'off';...% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     58        'FieldTransform'; 'off';...%can use a transform function
     59        'ProjObject';'off';...%can use projection object(option 'off'/'on',
     60        'Mask';'off';...%can use mask option   (option 'off'/'on', 'off' by default)
     61        'OutputDirExt';'';...%set the output dir extension
     62               ''};
     63        return
     64end
     65
     66%%%%%%%%%%%% STANDARD PART (DO NOT EDIT) %%%%%%%%%%%%
     67%% select different modes,  RUN, parameter input, BATCH
     68% BATCH  case: read the xml file for batch case
     69GUI_config=Param;%reproduce the input parameters, no interactive input
     70if ischar(Param)
     71    if strcmp(Param,'input?')
     72        checkrun=1;% will inly search input parameters (preparation of BATCH mode)
     73    else
     74        Param=xml2struct(Param);
     75        checkrun=0;
     76    end
     77% RUN case: parameters introduced as the input structure Param
     78else
     79    hseries=guidata(Param.hseries);%handles of the GUI series
     80    WaitbarPos=get(hseries.waitbar_frame,'Position');%position of the waitbar on the GUI series
     81    checkrun=2; % indicate the RUN option is used
     82end
     83
     84%% root input file(s) and type
     85RootPath=Param.InputTable(:,1);
     86RootFile=Param.InputTable(:,3);
     87SubDir=Param.InputTable(:,2);
     88NomType=Param.InputTable(:,4);
     89FileExt=Param.InputTable(:,5);
     90
     91% get the set of input file names (cell array filecell), and the lists of
     92% input file or frame indices i1_series,i2_series,j1_series,j2_series
     93[filecell,i1_series,i2_series,j1_series,j2_series]=get_file_series(Param);
     94% filecell{iview,fileindex}: cell array representing the list of file names
     95%        iview: line in the table corresponding to a given file series
     96%        fileindex: file index within  the file series,
     97% i1_series(iview,ref_j,ref_i)... are the corresponding arrays of indices i1,i2,j1,j2, depending on the input line iview and the two reference indices ref_i,ref_j
     98% i1_series(iview,fileindex) expresses the same indices as a 1D array in file indices
     99% set of frame indices used for movie or multimage input
     100% numbers of slices and file indices
     101
     102NbSlice=1;%default
     103if isfield(Param.IndexRange,'NbSlice')&&~isempty(Param.IndexRange.NbSlice)
     104    NbSlice=Param.IndexRange.NbSlice;
     105end
     106nbview=numel(i1_series);%number of input file series (lines in InputTable)
     107nbfield_j=size(i1_series{1},1); %nb of fields for the j index (bursts or volume slices)
     108nbfield_i=size(i1_series{1},2); %nb of fields for the i index
     109nbfield=nbfield_j*nbfield_i; %total number of fields
     110nbfield_i=floor(nbfield/NbSlice);%total number of  indexes in a slice (adjusted to an integer number of slices)
     111nbfield=nbfield_i*NbSlice; %total number of fields after adjustement
     112
     113%determine the file type on each line from the first input file
     114ImageTypeOptions={'image','multimage','mmreader','video'};
     115NcTypeOptions={'netcdf','civx','civdata'};
     116for iview=1:nbview
     117    if ~exist(filecell{iview,1}','file')
     118        msgbox_uvmat('ERROR',['the first input file ' filecell{iview,1} ' does not exist'])
     119        return
     120    end
     121    [FileType{iview},FileInfo{iview},MovieObject{iview}]=get_file_type(filecell{iview,1});
     122    CheckImage{iview}=~isempty(find(strcmp(FileType{iview},ImageTypeOptions)));% =1 for images
     123    CheckNc{iview}=~isempty(find(strcmp(FileType{iview},NcTypeOptions)));% =1 for netcdf files
     124    if ~isempty(j1_series{iview})
     125        frame_index{iview}=j1_series{iview};
     126    else
     127        frame_index{iview}=i1_series{iview};
     128    end
     129end
     130
     131%% calibration data and timing: read the ImaDoc files
     132mode=''; %default
     133timecell={};
     134itime=0;
     135NbSlice_calib={};
     136XmlData=cell(1,nbview);%initiate the structures containing the data from the xml file (calibration and timing)
     137for iview=1:nbview%Loop on views
     138    SubDirBase=regexprep(SubDir{iview},'\..*','');%take the root part of SubDir, before the first dot '.'
     139    filexml=[fullfile(RootPath{iview},SubDirBase) '.xml'];%new convention: xml at the level of the image folder
     140    if ~exist(filexml,'file')
     141        filexml=[fullfile(RootPath{iview},SubDir{iview},RootFile{iview}) '.xml']; % old convention: xml inside the image folder
     142        if ~exist(filexml,'file')
     143            filexml=[fullfile(RootPath{iview},SubDir{iview},RootFile{iview}) '.civ']; % very old convention: .civ file
     144            if ~exist(filexml,'file')
     145                filexml='';
     146            end
     147        end
     148    end
     149    if ~isempty(filexml)
     150        [XmlData{iview},error]=imadoc2struct_special(filexml);
     151    end
     152    if isfield(XmlData{iview},'Time')
     153        itime=itime+1;
     154        timecell{itime}=XmlData{iview}.Time;
     155    end
     156    if isfield(XmlData{iview},'GeometryCalib') && isfield(XmlData{iview}.GeometryCalib,'SliceCoord')
     157        NbSlice_calib{iview}=size(XmlData{iview}.GeometryCalib.SliceCoord,1);%nbre of slices for Zindex in phys transform
     158        if ~isequal(NbSlice_calib{iview},NbSlice_calib{1})
     159            msgbox_uvmat('WARNING','inconsistent number of Z indices for the two field series');
     160        end
     161    end
     162end
     163
     164%% check coincidence in time for several input file series
     165% not relevant
     166
     167%% coordinate transform or other user defined transform
     168%not relevant
     169%%%%%%%%%%%% END STANDARD PART  %%%%%%%%%%%%
     170 % EDIT FROM HERE
     171
     172%% check the validity of  input file types
     173if CheckImage{1}
     174    FileExtOut='.png'; % write result as .png images for image inputs
     175elseif CheckNc{1}
     176    FileExtOut='.nc';% write result as .nc files for netcdf inputs
     177else
     178    msgbox_uvmat('ERROR',['invalid file type input ' FileType{1}])
     179    return
     180end
     181if nbview==2 && ~isequal(CheckImage{1},CheckImage{2})
     182        msgbox_uvmat('ERROR','input must be two image series or two netcdf file series')
     183    return
     184end
     185NomTypeOut='_1-2_1';% output file index will indicate the first and last ref index in the series
     186if NbSlice~=nbfield_j
     187    answer=msgbox_uvmat('INPUT_Y-N',['will not average slice by slice: for so cancel and set NbSlice= ' num2str(nbfield_j)]);
     188    if ~strcmp(answer,'Yes')
     189        return
     190    end
     191end
     192
     193%% Set field names and velocity types
     194% not relevant here
     195
     196%% Initiate output fields
     197% not relevant here
     198
     199%% interactive input of specific parameters (for RDvision system)
    15200display('RDvision system')
    16201first_label=0; %image numbers start from 0
    17 %errorfactor=1 %correct a factor of 2 in NbDk+1
    18 
    19 %% read imadoc
    20 RootPath=get(hseries.RootPath,'String');
    21 RootFile=get(hseries.RootFile,'String');
    22 if ~iscell(RootFile)
    23     msgbox_uvmat('ERROR','please enter an input image series from RDVision system')%error message for xml file reading
    24     return
    25 end
    26 basename=fullfile(RootPath{1},RootFile{1});
    27 [XmlData,warntext]=imadoc2struct([basename '.xml']);% read the xml file appended to the present function (containing bug corrections)
    28 if ~isempty(warntext)
    29     msgbox_uvmat('ERROR',warntext)%error message for xml file reading
    30 end
    31 nbfield1=size(XmlData.Time,1);
    32 nbfield2=size(XmlData.Time,2);
    33 set(hseries.first_i,'String',num2str(first_label))% display the first image in the process
    34 set(hseries.last_i,'String',num2str(nbfield1*nbfield2-1+first_label))% display the last image in the process
    35 set(hseries.nb_field,'String',{num2str(nbfield1*nbfield2-1+first_label)})% display the total nbre of images
    36 SeriesData=get(hGUI,'UserData');
    37 if ~strcmp(SeriesData.NomType,'_000001')
     202if ~strcmp(NomType{1},'_000001')
    38203    msgbox_uvmat('WARNING','the input is not a file from RDvision: this function relabel_i_j has no action');%error message for directory creation
    39204    return
    40205else
    41     answer=msgbox_uvmat('','this function will relabel the file series from RDvision and correct the xml file');%error message for directory creation
     206    answer=msgbox_uvmat('','this function will relabel the file series from RDvision from  and correct the xml file');%error message for directory creation
    42207    if ~strcmp(answer,'Yes')
    43208        return
     
    45210end
    46211
    47 %% stop program ther when it is selected in the menu (no run action)
    48 if ~exist('num_i1','var')
    49     return
    50 end
    51 if nbfield2>=2
    52 answer=msgbox_uvmat('',[num2str(nbfield1) ' bursts containing ' num2str(nbfield2) ' images each']);%error message for directory creation
    53 nomtype='_i_j';
    54 else
    55     answer=msgbox_uvmat('',['image series with ' num2str(nbfield1) ' images']);%error message for directory creation
    56     nomtype='_i';
    57 end
    58 if ~strcmp(answer,'Yes')
    59     return
    60 end
     212%% read imadoc
     213% RootPath=get(hseries.RootPath,'String');
     214% RootFile=get(hseries.RootFile,'String');
     215% if ~iscell(RootFile)
     216%     msgbox_uvmat('ERROR','please enter an input image series from RDVision system')%error message for xml file reading
     217%     return
     218% end
     219% basename=fullfile(RootPath{1},RootFile{1});
     220% [XmlData,warntext]=imadoc2struct_special([basename '.xml']);% read the xml file appended to the present function (containing bug corrections)
     221% if ~isempty(warntext)
     222%     msgbox_uvmat('ERROR',warntext)%error message for xml file reading
     223% end
     224% nbfield1=size(XmlData.Time,1);
     225% nbfield2=size(XmlData.Time,2);
     226% set(hseries.first_i,'String',num2str(first_label))% display the first image in the process
     227% set(hseries.last_i,'String',num2str(nbfield1*nbfield2-1+first_label))% display the last image in the process
     228% set(hseries.nb_field,'String',{num2str(nbfield1*nbfield2-1+first_label)})% display the total nbre of images
     229% SeriesData=get(hGUI,'UserData');
     230
     231
     232%% stop program there when it is selected in the menu (no run action)
     233% if ~exist('num_i1','var')
     234%     return
     235% end
     236% if nbfield2>=2
     237% answer=msgbox_uvmat('',[num2str(nbfield1) ' bursts containing ' num2str(nbfield2) ' images each']);%error message for directory creation
     238% nomtype='_i_j';
     239% else
     240%     answer=msgbox_uvmat('',['image series with ' num2str(nbfield1) ' images']);%error message for directory creation
     241%     nomtype='_i';
     242% end
     243% if ~strcmp(answer,'Yes')
     244%     return
     245% end
    61246
    62247%% copy and adapt the xml file
    63 if exist([basename '.xml'],'file')
    64     try
    65         copyfile([basename '.xml'],[basename '.xml~']);% backup the xml file
    66     catch ME
    67         msgbox_uvmat('ERROR',ME.message);
    68         return
    69     end
    70     t=xmltree([basename '.xml']);
    71    
    72     %update information on the first image name in the series
    73     uid_Heading=find(t,'ImaDoc/Heading');
    74     if isempty(uid_Heading)
    75         [t,uid_Heading]=add(t,1,'element','Heading');
    76     end
    77     uid_ImageName=find(t,'ImaDoc/Heading/ImageName');
    78     ImageName=name_generator(basename,1,1,'.png','_i_j');
    79     [pth,ImageName]=fileparts(ImageName);
    80     ImageName=[ImageName '.png'];
    81     if isempty(uid_ImageName)
    82         [t,uid_ImageName]=add(t,uid_Heading,'element','ImageName');
    83     end
    84     uid_value=children(t,uid_ImageName);
    85     if isempty(uid_value)
    86         t=add(t,uid_ImageName,'chardata',ImageName);%indicate  name of the first image, with ;png extension
     248if ~isempty(XmlData{1})
     249
     250%     if exist([basename '.xml'],'file')
     251%         try
     252%             copyfile([basename '.xml'],[basename '.xml~']);% backup the xml file
     253%         catch ME
     254%             msgbox_uvmat('ERROR',ME.message);
     255%             return
     256%         end
     257%         filexml=[filebase{1} '.xml']
     258        t=xmltree(filexml);
     259       
     260        %update information on the first image name in the series
     261        uid_Heading=find(t,'ImaDoc/Heading');
     262        if isempty(uid_Heading)
     263            [t,uid_Heading]=add(t,1,'element','Heading');
     264        end
     265        uid_ImageName=find(t,'ImaDoc/Heading/ImageName');
     266        j1=[];
     267        if ~isempty(j1_series{1})
     268            j1=j1_series{1};
     269        end
     270        ImageName=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},'_1_1',i1_series{1}(1),[],j);
     271%         ImageName=name_generator(basename,1,1,'.png','_i_j');
     272        [pth,ImageName]=fileparts(ImageName);
     273        ImageName=[ImageName '.png'];
     274        if isempty(uid_ImageName)
     275            [t,uid_ImageName]=add(t,uid_Heading,'element','ImageName');
     276        end
     277        uid_value=children(t,uid_ImageName);
     278        if isempty(uid_value)
     279            t=add(t,uid_ImageName,'chardata',ImageName);%indicate  name of the first image, with ;png extension
     280        else
     281            t=set(t,uid_value(1),'value',ImageName);%indicate  name of the first image, with ;png extension
     282        end
     283       
     284        %%%% correction RDvision %%%%
     285        if isfield(XmlData,'NbDtj')
     286            uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj');
     287            uid_value=children(t,uid_NbDtj);
     288            if ~isempty(uid_value)
     289                t=set(t,uid_value(1),'value',num2str(XmlData.NbDtj));
     290            end
     291        end
     292        if isfield(XmlData,'NbDtk')
     293            uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk');
     294            uid_value=children(t,uid_NbDtk);
     295            if ~isempty(uid_value)
     296                t=set(t,uid_value(1),'value',num2str(XmlData.NbDtk));
     297            end
     298        end
     299        if isempty(j1_series{1}) && isfield(XmlData,'NbDti')
     300            uid_Dti=find(t,'ImaDoc/Camera/BurstTiming/Dti');
     301            t=add(t,uid_Dti,'chardata',num2str(XmlData.Dti));
     302            uid_NbDti=find(t,'ImaDoc/Camera/BurstTiming/NbDti');
     303            t=add(t,uid_NbDti,'chardata',num2str(XmlData.NbDti));
     304            uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj');
     305            uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk');
     306            t=delete(t,uid_NbDtj);
     307            t=delete(t,uid_NbDtk);
     308            uid_Dtj=find(t,'ImaDoc/Camera/BurstTiming/Dtj');
     309            uid_Dtk=find(t,'ImaDoc/Camera/BurstTiming/Dtk');
     310            t=delete(t,uid_Dtj);
     311            t=delete(t,uid_Dtk);
     312        end
     313            SubDirBase=regexprep(SubDir{1},'\..*','');%take the root part of SubDir, before the first dot '.'
     314    filexml_new=[fullfile(RootPath{1},SubDirBase) '.xml'];
     315        save(t,filexml_new)
     316%     end
     317end
     318
     319%% main loop on images
     320%j1=[];%default
     321nbfield2=size(XmlData{1}.Time,2);
     322for ifile=1:nbfield
     323    if checkrun
     324        update_waitbar(hseries.waitbar_frame,WaitbarPos,ifile/nbfield)
     325        stopstate=get(hseries.RUN,'BusyAction');
    87326    else
    88         t=set(t,uid_value(1),'value',ImageName);%indicate  name of the first image, with ;png extension
    89     end
    90    
    91     %%%% correction RDvision %%%%
    92     if isfield(XmlData,'NbDtj')
    93         uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj');
    94         uid_value=children(t,uid_NbDtj);
    95         if ~isempty(uid_value)
    96             t=set(t,uid_value(1),'value',num2str(XmlData.NbDtj));
    97         end
    98     end
    99     if isfield(XmlData,'NbDtk')
    100         uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk');
    101         uid_value=children(t,uid_NbDtk);
    102         if ~isempty(uid_value)
    103             t=set(t,uid_value(1),'value',num2str(XmlData.NbDtk));
    104         end
    105     end
    106     if strcmp(nomtype,'_i') && isfield(XmlData,'NbDti')
    107         uid_Dti=find(t,'ImaDoc/Camera/BurstTiming/Dti');
    108         t=add(t,uid_Dti,'chardata',num2str(XmlData.Dti));
    109         uid_NbDti=find(t,'ImaDoc/Camera/BurstTiming/NbDti');
    110         t=add(t,uid_NbDti,'chardata',num2str(XmlData.NbDti));
    111 %         uid_value=children(t,uid_NbDti);
    112 %         if ~isempty(uid_value)
    113 %             t=set(t,uid_value(1),'value',num2str(XmlData.NbDti));
    114 %         end
    115         uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj');
    116         uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk');
    117         t=delete(t,uid_NbDtj);
    118         t=delete(t,uid_NbDtk);
    119         uid_Dtj=find(t,'ImaDoc/Camera/BurstTiming/Dtj');
    120         uid_Dtk=find(t,'ImaDoc/Camera/BurstTiming/Dtk');
    121         t=delete(t,uid_Dtj);
    122         t=delete(t,uid_Dtk);
    123     end
    124     %%%
    125    
    126     save(t,[basename '.xml'])
    127 end
    128 
    129 %% main loop
    130 
    131 for ifile=1:nbfield1*nbfield2
    132     update_waitbar(hseries.waitbar,WaitbarPos,ifile/(nbfield1*nbfield2))
    133     filename=name_generator(basename,ifile-1,1,Series.FileExt,Series.NomType);
    134     num_j=mod(ifile-1+first_label,nbfield2)+1;
    135     num_i=floor((ifile-1+first_label)/nbfield2)+1;
    136     filename_new=name_generator(basename,num_i,num_j,'.png',nomtype);
    137     try
    138         movefile(filename,filename_new);
    139         [s,errormsg] = fileattrib(filename_new,'-w','a'); %set images to read only '-w' for all users ('a')
    140         if ~s
    141             msgbox_uvmat('ERROR',errormsg);
     327        stopstate='queue';
     328    end
     329    if isequal(stopstate,'queue') % enable STOP command
     330        filename=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},NomType{1},i1_series{1}(ifile));
     331        j1=mod(ifile-1+first_label,nbfield2)+1;
     332        i1=floor((ifile-1+first_label)/nbfield2)+1;
     333        %         filename_new=name_generator(basename,num_i,num_j,'.png',nomtype);
     334        filename_new=fullfile_uvmat(RootPath{1},SubDir{1},RootFile{1},FileExt{1},'_1_1',i1,[],j1);
     335        try
     336            movefile(filename,filename_new);
     337            [s,errormsg] = fileattrib(filename_new,'-w','a'); %set images to read only '-w' for all users ('a')
     338            if ~s
     339                msgbox_uvmat('ERROR',errormsg);
     340                return
     341            end
     342        catch ME
     343            msgbox_uvmat('ERROR',ME.message);
    142344            return
    143345        end
    144     catch ME
    145         msgbox_uvmat('ERROR',ME.message);
    146         return
    147     end
    148 end
    149 
    150 
    151 %'imadoc2struct': reads the xml file for image documentation
     346    end
     347end
     348
     349%'imadoc2struct_special': reads the xml file for image documentation
    152350%------------------------------------------------------------------------
    153 % function [s,errormsg]=imadoc2struct(ImaDoc,option)
     351% function [s,errormsg]=imadoc2struct_special(ImaDoc,option)
    154352%
    155353% OUTPUT:
     
    165363% option: ='GeometryCalib': read  the data of GeometryCalib, including source point coordinates
    166364
    167 function [s,errormsg]=imadoc2struct(ImaDoc,option)
     365function [s,errormsg]=imadoc2struct_special(ImaDoc,option)
    168366
    169367%% default input and output
     
    247445                     s.Dti=Dti;
    248446                else
    249                     NbDtj=NbDtj/numel(Dtj);%bursts
     447                    % NbDtj=NbDtj/numel(Dtj);%bursts
    250448                    s.NbDtj=NbDtj;
    251449                end
Note: See TracChangeset for help on using the changeset viewer.