[29] | 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; |
---|

[36] | 20 | data.Coord=[];%default |
---|

[29] | 21 | for i=1:nb_defining_points |
---|

| 22 | coord_str=Coord_cell{i};%character string of line number i |
---|

| 23 | k=findstr('|',coord_str);%find separators '|' |
---|

| 24 | if length(k)>=4 % test for separators '|' |
---|

| 25 | data1=str2num(coord_str(1:k(1)-5)); |
---|

| 26 | data2=str2num(coord_str(k(1)+5:k(2)-5)); |
---|

| 27 | data3=str2num(coord_str(k(2)+5:k(3)-5)); |
---|

| 28 | data4=str2num(coord_str(k(3)+5:k(4)-5)); |
---|

| 29 | data5=str2num(coord_str(k(4)+5:end)); |
---|

| 30 | if ~isempty(data1)|~isempty(data2)|~isempty(data3)|~isempty(data4)|~isempty(data5) |
---|

| 31 | iline=iline+1; |
---|

| 32 | if ~isempty(data1) |
---|

| 33 | data.Coord(iline,1)=data1; |
---|

| 34 | end |
---|

| 35 | if ~isempty(data2) |
---|

| 36 | data.Coord(iline,2)=data2; |
---|

| 37 | end |
---|

| 38 | if ~isempty(data3) |
---|

| 39 | data.Coord(iline,3)=data3; |
---|

| 40 | end |
---|

| 41 | if ~isempty(data4) |
---|

| 42 | data.Coord(iline,4)=data4; |
---|

| 43 | end |
---|

| 44 | if isempty(data5) |
---|

| 45 | data.Coord(iline,5)=0; |
---|

| 46 | else |
---|

| 47 | data.Coord(iline,5)=data5; |
---|

| 48 | end |
---|

| 49 | end |
---|

| 50 | end |
---|

| 51 | end |
---|

| 52 | data.Style='points'; |
---|