Ignore:
Timestamp:
Jan 27, 2012, 1:59:18 AM (12 years ago)
Author:
sommeria
Message:

several bugs corrected
set_object.fig rationalized so that read_set_object is replaced by the rgeneral fct read_GUI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r356 r379  
    149149function APPLY_Callback(hObject, eventdata, handles)
    150150%------------------------------------------------------------------------
    151 %read the current calibration points
     151%% look for the GUI uvmat and check for an image as input
     152huvmat=findobj(allchild(0),'Name','uvmat');
     153hhuvmat=guidata(huvmat);%handles of elements in the GUI uvmat
     154FileExt=get(hhuvmat.FileExt,'String');
     155check_input=0;
     156if ~isempty(FileExt)
     157    if ~isempty(imformats(FileExt(2:end))) ||strcmpi(FileExt,'.avi')
     158        check_input=1;
     159    end
     160end
     161if ~check_input
     162    msgbox_uvmat('ERROR','open an image with uvmat to perform calibration')
     163    return
     164end
     165
     166%% read the current calibration points
    152167Coord_cell=get(handles.ListCoord,'String');
    153168Object=read_geometry_calib(Coord_cell);
     
    200215set(handles.Psi,'String',num2str(GeometryCalib.omc(3),4))
    201216
    202 % store the calibration data, by default in the xml file of the currently displayed image
    203 huvmat=findobj(allchild(0),'Name','uvmat');
     217%% store the calibration data, by default in the xml file of the currently displayed image
    204218UvData=get(huvmat,'UserData');
    205219NbSlice_j=1;%default
     
    208222volume_scan='n';
    209223if isfield(UvData,'XmlData')
    210     UvData.XmlData
    211224    if isfield(UvData.XmlData,'TranslationMotor')
    212225        NbSlice_j=UvData.XmlData.TranslationMotor.Nbslice;
     
    216229    end
    217230end
    218 hhuvmat=guidata(huvmat);%handles of elements in the GUI uvmat
    219231RootPath='';
    220232% RootFile='';
Note: See TracChangeset for help on using the changeset viewer.