1 | %'read_geometry_calib': read data on the GUI geometry_calib |
---|
2 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
---|
3 | function data=read_geometry_calib(Coord_cell) |
---|
4 | data_XIma=[]; |
---|
5 | data_YIma=[]; |
---|
6 | data_XObject=[]; |
---|
7 | data_YObject=[]; |
---|
8 | data_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 |
---|
18 | nb_defining_points=length(Coord_cell); |
---|
19 | iline=0; |
---|
20 | for 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 |
---|
50 | end |
---|
51 | data.Style='points'; |
---|