Ignore:
Timestamp:
Mar 3, 2010, 10:48:08 AM (11 years ago)
Author:
sommeria
Message:

read_imadoc suppressed (obsolete, replaced by imadoc2struct)
update_imadoc: bug repaired: existing xml file was erased
various cleaning (deals with non existing input file for series and uvmat)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/imadoc2struct.m

    r19 r29  
    2121s.TimeUnit=[]; %default
    2222s.GeometryCalib=[];
    23 nom_type_ima=[];%default
    24 ext_ima=[];%default
     23% nom_type_ima=[];%default
     24% ext_ima=[];%default
    2525% abs_time=[];%initiation
    2626% GeometryCalib.CoordUnit='cm';%default
    27 mode=[]; %default
    28 NbSlice=1;%default
    29 npx=[];%default
    30 npy=[];%default
     27% mode=[]; %default
     28% NbSlice=1;%default
     29% npx=[];%default
     30% npy=[];%default
    3131% GeometryCalib.Pxcmx=1;
    3232% GeometryCalib.Pxcmy=1;
    3333% GeometryCalib=[];
    34 NbDtj=1;
     34% NbDtj=1;
    3535tsai=[];%default
    3636% if ~exist('testime','var')
     
    6464    end
    6565    s.Heading.ImageName=get(t,children(t,uid_FirstImage),'value');
    66     FirstImage=s.Heading.ImageName;
    67     if ~isempty(FirstImage)
    68         [Pathsub,RootFile,field_count,str2,str_a,str_b,ext,nom_type_ima]=name2display(FirstImage);
    69     end
     66%     FirstImage=s.Heading.ImageName;
     67%     if ~isempty(FirstImage)
     68%         [Pathsub,RootFile,field_count,str2,str_a,str_b,ext,nom_type_ima]=name2display(FirstImage);
     69%     end
    7070end
    7171
     
    7878        xindex=findstr(ImageSize,'x');
    7979        if length(xindex)>=2
    80             npx=str2num(ImageSize(1:xindex(1)-1));
    81             npy=str2num(ImageSize(xindex(1)+1:xindex(2)-1));
    82         end
    83     end
    84     uid_NbSlice=find(t,'/ImaDoc/Camera/NbSlice');
    85     if ~isempty(uid_NbSlice)
    86         NbSlice=str2num(get(t,children(t,uid_NbSlice),'value'));
    87         if isempty(NbSlice),NbSlice=1;end; %default
    88     end
     80%             npx=str2num(ImageSize(1:xindex(1)-1));
     81%             npy=str2num(ImageSize(xindex(1)+1:xindex(2)-1));
     82        end
     83    end
     84%     uid_NbSlice=find(t,'/ImaDoc/Camera/NbSlice');
     85%     if ~isempty(uid_NbSlice)
     86%         NbSlice=str2num(get(t,children(t,uid_NbSlice),'value'));
     87% %         if isempty(NbSlice),NbSlice=1;end; %default
     88%     end
    8989    uid_TimeUnit=find(t,'/ImaDoc/Camera/TimeUnit');
    9090    if ~isempty(uid_TimeUnit)
     
    9494    if ~isempty(uid_BurstTiming)
    9595        for k=1:length(uid_BurstTiming)
    96             Dtj=[];%default
    97             NbDtj=1;%default
     96%             Dtj=[];%default
     97%             NbDtj=1;%default
    9898            subt=branch(t,uid_BurstTiming(k));%subtree under BurstTiming
    9999             % reading Dtk
     
    121121            % reading Dtk
    122122            Dtk=get_value(subt,'/BurstTiming/Dtk',[]);
    123             NbDtk=get_value(subt,'/BurstTiming/NbDtk',1)
     123            NbDtk=get_value(subt,'/BurstTiming/NbDtk',1);
    124124            if isempty(Dtk)
    125125                s.Time=[s.Time;Time_val];
     
    141141if ~isempty(uid_GeometryCalib)
    142142    if length(uid_GeometryCalib)>1
    143         error=['More than one GeometryCalib in ' filecivxml];
     143        errormsg=['More than one GeometryCalib in ' filecivxml];
    144144        return
    145145    end
     
    149149        uid_pixcmx=find(subt,'/GeometryCalib/Pxcmx');
    150150        uid_pixcmy=find(subt,'/GeometryCalib/Pxcmy');
    151         if ~isempty(uid_pixcmx) & ~isempty(uid_pixcmy)%NON UTILISE
     151        if ~isempty(uid_pixcmx) && ~isempty(uid_pixcmy)%NON UTILISE
    152152           pixcmx=str2num(get(subt,children(subt,uid_pixcmx),'value'));
    153153            if isempty(pixcmx),pixcmx=1;end; %default
     
    180180        uid_Tx_Ty_Tz=find(subt,'/GeometryCalib/Tx_Ty_Tz');
    181181        uid_R=find(subt,'/GeometryCalib/R');
    182         if ~isempty(uid_focal) & ~isempty(uid_dpx_dpy) & ~isempty(uid_Cx_Cy)
     182        if ~isempty(uid_focal) && ~isempty(uid_dpx_dpy) && ~isempty(uid_Cx_Cy)
    183183            tsai.f=str2num(get(subt,children(subt,uid_focal),'value'));
    184184            dpx_dpy=str2num(get(subt,children(subt,uid_dpx_dpy),'value'));
Note: See TracChangeset for help on using the changeset viewer.