source: trunk/src/read_geometry_calib.m @ 36

Last change on this file since 36 was 36, checked in by sommeria, 11 years ago

-get_field: functions called by ACTION in the GUI get_field put in the subdirectory get_field (like for series)
-help put in the subdir uvmat_doc, help call in uvmat, civ, geometry calib modified accordingly

File size: 1.7 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;
20data.Coord=[];%default
21for 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
51end
52data.Style='points';
Note: See TracBrowser for help on using the repository browser.