Changeset 78 for trunk/src/geometry_calib.m
- Timestamp:
- Apr 2, 2010, 9:01:21 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r71 r78 216 216 set(handles.ListCoord,'String',Tabchar) 217 217 MenuPlot_Callback(handles.geometry_calib, [], handles) 218 218 if isempty(Coord) 219 set(handles.edit_append,'Value',1) 220 set(handles.edit_append,'BackgroundColor',[1 1 0]) 221 else 222 set(handles.edit_append,'Value',0) 223 set(handles.edit_append,'BackgroundColor',[0.7 0.7 0.7]) 224 end 219 225 % 220 226 %------------------------------------------------------------------------ … … 441 447 path_uvmat=which('uvmat');% check the path detected for source file uvmat 442 448 path_UVMAT=fileparts(path_uvmat); %path to UVMAT 443 449 huvmat=findobj(allchild(0),'Tag','uvmat'); 450 hhuvmat=guidata(huvmat); 444 451 x_1=Coord(:,4:5)'; 445 452 X_1=Coord(:,1:3)'; 446 453 n_ima=1; 447 454 % check_cond=0; 448 nx=1024;ny=1024; 455 456 457 nx=str2num(get(hhuvmat.npx,'String')); 458 ny=str2num(get(hhuvmat.npy,'String')); 459 460 449 461 % est_kc=[1;0;0;0;0]; 450 est_dist=[ 1;0;0;0;0];462 est_dist=[0;0;0;0;0]; 451 463 run(fullfile(path_UVMAT,'TOOLBOX_calib','go_calib_optim')); 452 464 … … 652 664 Coord_cell=get(handles.ListCoord,'String'); 653 665 val=get(handles.ListCoord,'Value'); 666 if numel(val)>1 667 return %no action if several lines have been selected 668 end 654 669 coord_str=Coord_cell{val}; 655 670 k=findstr('|',coord_str); … … 706 721 %------------------------------------------------------------------------ 707 722 choice=get(handles.edit_append,'Value'); 708 if choice==1 709 Coord=get(handles.ListCoord,'String'); 710 val=length(Coord); 711 if val>=1 & isequal(Coord{val},'') 712 val=val-1; %do not take into account blank 713 end 714 Coord{val+1}=''; 715 set(handles.ListCoord,'String',Coord) 716 set(handles.ListCoord,'Value',val+1) 717 end 718 719 723 % if choice==1 724 % Coord=get(handles.ListCoord,'String'); 725 % val=length(Coord); 726 % if val>=1 & isequal(Coord{val},'') 727 % val=val-1; %do not take into account blank 728 % end 729 % Coord{val+1}=''; 730 % set(handles.ListCoord,'String',Coord) 731 % set(handles.ListCoord,'Value',val+1) 732 % end 733 if choice 734 set(handles.edit_append,'BackgroundColor',[1 1 0]) 735 else 736 set(handles.edit_append,'BackgroundColor',[0.7 0.7 0.7]) 737 end 720 738 721 739 function NEW_Callback(hObject, eventdata, handles) … … 763 781 Coord_cell=get(handles.ListCoord,'String'); 764 782 val=get(handles.ListCoord,'Value'); 765 if val<numel(Coord_cell) % the last element '...' has not been selected783 if max(val)<numel(Coord_cell) % the last element '...' has not been selected 766 784 Coord_cell(val)=[];%remove the selected line 785 set(handles.ListCoord,'Value',min(val)) 767 786 set(handles.ListCoord,'String',Coord_cell) 768 787 ListCoord_Callback(hObject, eventdata, handles) 769 788 MenuPlot_Callback(hObject,eventdata,handles) 770 end789 end 771 790 end 772 791
Note: See TracChangeset
for help on using the changeset viewer.