- Timestamp:
- Jul 11, 2013, 6:45:32 PM (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r660 r663 1377 1377 set(hh,'YData',Coord_plot(:,2)) 1378 1378 end 1379 1380 % get data on the matlab work space 1379 pause(.1) 1380 figure(handles.geometry_calib) 1381 1382 %------------------------------------------------------------------------ 1383 % --- Executes on button press in Copy. 1384 %------------------------------------------------------------------------ 1385 function Copy_Callback(hObject, eventdata, handles) 1381 1386 1382 1387 evalin('base','global Coord')%make CurData global in the workspace … … 1384 1389 evalin('base','Coord') %display CurData in the workspace 1385 1390 commandwindow; %brings the Matlab command window to the front 1386 pause(.1)1387 figure(handles.geometry_calib)1388 1389 1390 1391 1391 1392 … … 1468 1469 1469 1470 1470 % --- Executes on button press in Copy. 1471 function Copy_Callback(hObject, eventdata, handles) 1472 % hObject handle to Copy (see GCBO) 1473 % eventdata reserved - to be defined in a future version of MATLAB 1474 % handles structure with handles and user data (see GUIDATA) 1471 1472 -
trunk/src/mouse_motion.m
r660 r663 51 51 test_edit_object=0;% edit test for mouse shap: an arrow 52 52 test_ruler=0;%test for active ruler 53 test_transform=0; 53 54 huvmat=findobj(allchild(0),'tag','uvmat');%find the uvmat interface handle 54 55 if ~isempty(huvmat) … … 56 57 test_edit_object=get(hhuvmat.CheckEditObject,'Value'); 57 58 test_ruler=isequal(get(hhuvmat.MenuRuler,'checked'),'on'); 59 test_transform=~isequal(get(hhuvmat.TransformName,'Value'),1) 58 60 end 59 61 test_piv=0; … … 379 381 h_ListCoord=hh_geometry_calib.ListCoord; %findobj(h_geometry_calib,'Tag','ListCoord'); 380 382 data.Coord=get(h_ListCoord,'Data'); 381 % data.Coord(:,6)=[];382 % data=read_geometry_calib(Coord);%transform char cell to numbers383 383 if isnumeric(data.Coord)&&~isempty(data.Coord) 384 if test_transform 385 XCoord=(data.Coord(:,1)); 386 YCoord=(data.Coord(:,2)); 387 else 384 388 XCoord=(data.Coord(:,4)); 385 389 YCoord=(data.Coord(:,5)); 390 end 386 391 xy=get(CurrentAxes,'CurrentPoint');%xy(1,1),xy(1,2): current x,y positions in axes coordinates 387 392 if ~isempty(xy) … … 397 402 end 398 403 hh=findobj('Tag','calib_points');%look for handle of calibration points 399 if ~isempty(hh) && ~isempty(get(hh,'UserData')) && get(hh_geometry_calib.CheckEnableMouse,'Value')404 if ~isempty(hh) && ~isempty(get(hh,'UserData')) %&& get(hh_geometry_calib.CheckEnableMouse,'Value') 400 405 %set(hh,'UserData',index_point) 401 406 index_point=get(hh,'UserData'); -
trunk/src/xml2struct.m
r662 r663 46 46 out.(names{k})=convert_string(ss.(names{k})); 47 47 end 48 case 'char' 49 out=str2double(ss); 50 %if isempty(regexp(ss,'^(-*\d+\.*\d*\ *)+$'))% if the string does not contain a set of numbers (with possible sign and decimal) separated by blanks 51 if isnan(out) 52 sep_ind=regexp(ss,'\s&\s');% check for separator ' & ' which indicates column separation in tables 53 if ~isempty(sep_ind) 54 sep_ind=[-2 sep_ind length(ss)+1]; 55 for icolumn=1:length(sep_ind)-1 56 out{1,icolumn}=ss(sep_ind(icolumn)+3:sep_ind(icolumn+1)-1); 48 case 'char' 49 out=ss; %reproduce the input string 50 if ~strcmp(ss,'image')% bug with Matlab str2num('image')-> child face 51 out=str2num(ss); 52 %if isempty(regexp(ss,'^(-*\d+\.*\d*\ *)+$'))% if the string does not contain a set of numbers (with possible sign and decimal) separated by blanks 53 if isempty(out) 54 sep_ind=regexp(ss,'\s&\s');% check for separator ' & ' which indicates column separation in tables 55 if ~isempty(sep_ind) 56 sep_ind=[-2 sep_ind length(ss)+1]; 57 for icolumn=1:length(sep_ind)-1 58 out{1,icolumn}=ss(sep_ind(icolumn)+3:sep_ind(icolumn+1)-1); 59 end 60 else 61 out=ss; %reproduce the input string 57 62 end 58 else59 out=ss; %reproduce the input string60 63 end 61 64 end … … 64 67 check_numeric=zeros(size(ss)); 65 68 for ilist=1:numel(ss) 66 if ~ isempty(str2num(ss{ilist}))69 if ~strcmp(ss{ilist},'image') && ~isempty(str2num(ss{ilist})) 67 70 out{ilist,1}=str2num(ss{ilist}); 68 71 check_numeric(ilist)=1;
Note: See TracChangeset
for help on using the changeset viewer.