Changeset 216


Ignore:
Timestamp:
Mar 8, 2011, 11:38:22 PM (13 years ago)
Author:
sommeria
Message:

correct bug on xml reading

File:
1 edited

Legend:

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

    r214 r216  
    2020RootPath=get(hseries.RootPath,'String');
    2121RootFile=get(hseries.RootFile,'String');
     22if ~iscell(RootFile)
     23    msgbox_uvmat('ERROR','please enter an input image series from RDVision system')%error message for xml file reading
     24    return
     25end
    2226basename=fullfile(RootPath{1},RootFile{1});
     27[XmlData,warntext]=imadoc2struct([basename '.xml'])% read the xml file appended to the present function (containing bug corrections)
     28if ~isempty(warntext)
     29    msgbox_uvmat('ERROR',warntext)%error message for xml file reading
     30end
     31nbfield1=size(XmlData.Time,1);
     32nbfield2=size(XmlData.Time,2);
     33
     34set(hseries.first_i,'String',num2str(first_label))% display the first image in the process
     35set(hseries.last_i,'String',num2str(nbfield1*nbfield2-1+first_label))% display the last image in the process
     36set(hseries.nb_field,'String',{num2str(nbfield1*nbfield2-1+first_label)})% display the total nbre of images
    2337SeriesData=get(hGUI,'UserData');
    2438if ~strcmp(SeriesData.NomType,'_000001')
     
    2842    msgbox_uvmat('CONFIRMATION','this function will relabel the file series from RDvision and correct the xml file')%error message for directory creation
    2943end
    30 [XmlData,warntext]=imadoc2struct([basename '.xml'])% read the xml file appended to the present function (containing bug corrections)
    31 if ~isempty(warntext)
    32     msgbox_uvmat('ERROR',warntext)%error message for xml file reading
    33 end
    34 nbfield1=size(XmlData.Time,1);
    35 nbfield2=size(XmlData.Time,2);
    36 
    37 set(hseries.first_i,'String',num2str(first_label))% display the first image in the process
    38 set(hseries.last_i,'String',num2str(nbfield1*nbfield2-1+first_label))% display the last image in the process
    39 set(hseries.nb_field,'String',{num2str(nbfield1*nbfield2-1+first_label)})% display the total nbre of images
    4044
    4145%% stop program ther when it is selected in the menu (no run action)
     
    8286    %%%% correction RDvision %%%%
    8387    uid_NbDtj=find(t,'ImaDoc/Camera/BurstTiming/NbDtj');
    84     t=set(t,uid_NbDtj,'value',num2str(s.NbDtj))
     88    t=set(t,uid_NbDtj,'value',num2str(XmlData.NbDtj));
    8589    uid_NbDtk=find(t,'ImaDoc/Camera/BurstTiming/NbDtk');
    86     t=set(t,uid_NbDtk,'value',num2str(s.NbDtk))
     90    t=set(t,uid_NbDtk,'value',num2str(XmlData.NbDtk));
    8791    %%%
    8892   
Note: See TracChangeset for help on using the changeset viewer.