Ignore:
Timestamp:
Apr 2, 2010, 9:01:21 PM (14 years ago)
Author:
sommeria
Message:

debugging of geometry_calib and mouse operations
merge_proj: call to read_image replaced. Still problems to solve to merge images

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r71 r78  
    216216set(handles.ListCoord,'String',Tabchar)
    217217MenuPlot_Callback(handles.geometry_calib, [], handles)
    218 
     218if isempty(Coord)
     219    set(handles.edit_append,'Value',1)
     220    set(handles.edit_append,'BackgroundColor',[1 1 0])
     221else
     222    set(handles.edit_append,'Value',0)
     223    set(handles.edit_append,'BackgroundColor',[0.7 0.7 0.7])
     224end
    219225%
    220226%------------------------------------------------------------------------
     
    441447path_uvmat=which('uvmat');% check the path detected for source file uvmat
    442448path_UVMAT=fileparts(path_uvmat); %path to UVMAT
    443 
     449huvmat=findobj(allchild(0),'Tag','uvmat');
     450hhuvmat=guidata(huvmat);
    444451x_1=Coord(:,4:5)';
    445452X_1=Coord(:,1:3)';
    446453n_ima=1;
    447454% check_cond=0;
    448 nx=1024;ny=1024;
     455
     456
     457nx=str2num(get(hhuvmat.npx,'String'));
     458ny=str2num(get(hhuvmat.npy,'String'));
     459
     460
    449461% est_kc=[1;0;0;0;0];
    450 est_dist=[1;0;0;0;0];
     462est_dist=[0;0;0;0;0];
    451463run(fullfile(path_UVMAT,'TOOLBOX_calib','go_calib_optim'));
    452464
     
    652664Coord_cell=get(handles.ListCoord,'String');
    653665val=get(handles.ListCoord,'Value');
     666if numel(val)>1
     667    return %no action if several lines have been selected
     668end
    654669coord_str=Coord_cell{val};
    655670k=findstr('|',coord_str);
     
    706721%------------------------------------------------------------------------
    707722choice=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
     733if choice
     734    set(handles.edit_append,'BackgroundColor',[1 1 0])
     735else
     736    set(handles.edit_append,'BackgroundColor',[0.7 0.7 0.7])
     737end
    720738   
    721739function NEW_Callback(hObject, eventdata, handles)
     
    763781    Coord_cell=get(handles.ListCoord,'String');
    764782    val=get(handles.ListCoord,'Value');
    765     if val<numel(Coord_cell) % the last element '...' has not been selected
     783     if max(val)<numel(Coord_cell) % the last element '...' has not been selected
    766784        Coord_cell(val)=[];%remove the selected line
     785        set(handles.ListCoord,'Value',min(val))
    767786        set(handles.ListCoord,'String',Coord_cell)         
    768787        ListCoord_Callback(hObject, eventdata, handles)
    769788        MenuPlot_Callback(hObject,eventdata,handles)
    770     end
     789     end
    771790end
    772791
Note: See TracChangeset for help on using the changeset viewer.