# source:trunk/src/read_geometry_calib.m@4

Last change on this file since 4 was 2, checked in by gostiaux, 15 years ago
• Initial import
• Add .m files in src
• Add .fig files in src
• Add .xml config files
File size: 1.6 KB
Line
1%'read_geometry_calib': read data on the GUI geometry_calib
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3function data=read_geometry_calib(Coord_cell)
4data_XIma=[];
5data_YIma=[];
6data_XObject=[];
7data_YObject=[];
8data_ZObject=[];
9%Coord=get(handles.ListCoord,'String');
10% XImage=get(handles.XImage,'String');
11% YImage=get(handles.YImage,'String');
12% XObject=get(handles.XObject,'String');
13% YObject=get(handles.YObject,'String');
14% ZObject=get(handles.ZObject,'String');
15% if ischar(Xcolumn)
16%     Xcolumn={Xcolumn};
17% end
18nb_defining_points=length(Coord_cell);
19iline=0;
20for i=1:nb_defining_points
21    coord_str=Coord_cell{i};%character string of line number i
22    k=findstr('|',coord_str);%find separators '|'
23    if length(k)>=4 % test for separators '|'
24        data1=str2num(coord_str(1:k(1)-5));
25        data2=str2num(coord_str(k(1)+5:k(2)-5));
26        data3=str2num(coord_str(k(2)+5:k(3)-5));
27        data4=str2num(coord_str(k(3)+5:k(4)-5));
28        data5=str2num(coord_str(k(4)+5:end));
29        if ~isempty(data1)|~isempty(data2)|~isempty(data3)|~isempty(data4)|~isempty(data5)
30            iline=iline+1;
31            if ~isempty(data1)
32                data.Coord(iline,1)=data1;
33            end
34            if ~isempty(data2)
35                data.Coord(iline,2)=data2;
36            end
37            if ~isempty(data3)
38                data.Coord(iline,3)=data3;
39            end
40            if ~isempty(data4)
41                data.Coord(iline,4)=data4;
42            end
43            if isempty(data5)
44                data.Coord(iline,5)=0;
45            else
46                data.Coord(iline,5)=data5;
47            end
48        end
49    end
50end
51data.Style='points';
Note: See TracBrowser for help on using the repository browser.