Ignore:
Timestamp:
Apr 18, 2014, 7:26:31 AM (10 years ago)
Author:
sommeria
Message:

set_slice installed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/geometry_calib.m

    r738 r745  
    142142    set(handles.ListCoord,'Data',[])
    143143    if exist(struct.XmlInputFile,'file')
    144         Heading=loadfile(handles,struct.XmlInputFile);% load data from the xml file
     144        Heading=loadfile(handles,struct.XmlInputFile);% load data from the xml file and fill the GUI
    145145        if isfield(Heading,'Campaign')&& ischar(Heading.Campaign)
    146146            struct.Campaign=Heading.Campaign;
     
    216216   
    217217    %% display image with new calibration in the currently opened uvmat interface
    218     set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image
    219     UserData=get(handles.geometry_calib,'UserData');
    220     UserData.XmlInputFile=outputfile;%save the current xml file name
    221     set(handles.geometry_calib,'UserData',UserData)
    222     uvmat('InputFileREFRESH_Callback',hObject,eventdata,hhuvmat); %file input with xml reading  in uvmat, show the image in phys coordinates
    223     PLOT_Callback(hObject, eventdata, handles)
    224     set(handles.CoordLine,'string',num2str(index))
    225     Coord=get(handles.ListCoord,'Data');
    226     update_calib_marker(Coord(index,:)); %indicate the point with max deviations from phys coord to calibration
    227     figure(handles.geometry_calib)% put the GUI geometry_calib in front
    228     set(handles.APPLY,'BackgroundColor',[1 0 0]) % set APPLY button to red color
     218    FieldList=get(hhuvmat.FieldName,'String');
     219    val=get(hhuvmat.FieldName,'Value');
     220    if strcmp(FieldList{val},'image')
     221        set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image
     222        UserData=get(handles.geometry_calib,'UserData');
     223        UserData.XmlInputFile=outputfile;%save the current xml file name
     224        set(handles.geometry_calib,'UserData',UserData)
     225        uvmat('InputFileREFRESH_Callback',hObject,eventdata,hhuvmat); %file input with xml reading  in uvmat, show the image in phys coordinates
     226        PLOT_Callback(hObject, eventdata, handles)
     227        set(handles.CoordLine,'string',num2str(index))
     228        Coord=get(handles.ListCoord,'Data');
     229        update_calib_marker(Coord(index,:)); %indicate the point with max deviations from phys coord to calibration
     230        figure(handles.geometry_calib)% put the GUI geometry_calib in front
     231        set(handles.APPLY,'BackgroundColor',[1 0 0]) % set APPLY button to red color
     232    else
     233        msgbox_uvmat('WARNING','open the image to see the effect of the new calibration')
     234    end
    229235end
    230236
     
    251257nbcalib=0;
    252258for ilist=1:numel(OutPut.Experiment)
    253     SubDirBase=regexprep(OutPut.Device{1},'\..+$','');
     259    SubDirBase=regexprep(OutPut.DataSeries{1},'\..+$','');
    254260    XmlName=fullfile(OutPut.Campaign,OutPut.Experiment{ilist},[SubDirBase '.xml']);
    255261    % copy the xml file from the old location if appropriate, then update with the calibration parameters
     
    274280function [GeometryCalib,index]=calibrate(handles,hhuvmat)
    275281%------------------------------------------------------------------------
     282set(handles.CheckEnableMouse,'Value',0)% desactivate mouse (to avoid spurious creation of new points)
    276283%% read the current calibration points
    277284index=[];
Note: See TracChangeset for help on using the changeset viewer.