Ignore:
Timestamp:
Apr 29, 2014, 10:10:30 AM (10 years ago)
Author:
sommeria
Message:

a few bug repairs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r755 r757  
    816816end
    817817
    818 
    819818% --------------------------------------------------------------------
    820819function MenuHelp_Callback(hObject, eventdata, handles)
    821 path_to_uvmat=which('uvmat');% check the path of uvmat
    822 pathelp=fileparts(path_to_uvmat);
    823 helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
    824 if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
    825 else
    826    addpath (fullfile(pathelp,'uvmat_doc'))
    827    web([helpfile '#geometry_calib'])
    828 end
     820web('http://servforge.legi.grenoble-inp.fr/projects/soft-uvmat/wiki/UvmatHelp#a8-Geometriccalibration')
     821% path_to_uvmat=which('uvmat');% check the path of uvmat
     822% pathelp=fileparts(path_to_uvmat);
     823% helpfile=fullfile(pathelp,'uvmat_doc','uvmat_doc.html');
     824% if isempty(dir(helpfile)), msgbox_uvmat('ERROR','Please put the help file uvmat_doc.html in the sub-directory /uvmat_doc of the UVMAT package')
     825% else
     826%    addpath (fullfile(pathelp,'uvmat_doc'))
     827%    web([helpfile '#geometry_calib'])
     828% end
    829829
    830830% --------------------------------------------------------------------
    831831function MenuSetScale_Callback(hObject, eventdata, handles)
    832832
    833  answer=msgbox_uvmat('INPUT_TXT','scale pixel/cm?','');
    834  %create test points
    835  huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle
    836 UvData=get(huvmat,'UserData');%Data associated to the current uvmat interface
    837 npy=size(UvData.Field.A,1);
    838 npx=size(UvData.Field.A,2);
     833answer=msgbox_uvmat('INPUT_TXT','scale pixel/cm?','');
     834%create test points
     835huvmat=findobj(allchild(0),'Name','uvmat');%find the current uvmat interface handle
     836hhuvmat=guidata(huvmat);
     837if ~strcmp(get(hhuvmat.Scalar,'Visible'),'on')
     838    msgbox_uvmat('ERROR','An image needs to be opened in uvmat for calibration')
     839    return
     840end
     841set(handles.calib_type,'Value',1)% set calib option to 'rescale'
     842npx=str2num(get(hhuvmat.num_Npx,'String'))/2;
     843npy=str2num(get(hhuvmat.num_Npy,'String'))/2;
    839844Xima=[0.25*npx 0.75*npx 0.75*npx 0.25*npx]';
    840845Yima=[0.25*npy 0.25*npy 0.75*npy 0.75*npy]';
Note: See TracChangeset for help on using the changeset viewer.