Changeset 745 for trunk/src/geometry_calib.m
- Timestamp:
- Apr 18, 2014, 7:26:31 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r738 r745 142 142 set(handles.ListCoord,'Data',[]) 143 143 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 145 145 if isfield(Heading,'Campaign')&& ischar(Heading.Campaign) 146 146 struct.Campaign=Heading.Campaign; … … 216 216 217 217 %% 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 229 235 end 230 236 … … 251 257 nbcalib=0; 252 258 for ilist=1:numel(OutPut.Experiment) 253 SubDirBase=regexprep(OutPut.D evice{1},'\..+$','');259 SubDirBase=regexprep(OutPut.DataSeries{1},'\..+$',''); 254 260 XmlName=fullfile(OutPut.Campaign,OutPut.Experiment{ilist},[SubDirBase '.xml']); 255 261 % copy the xml file from the old location if appropriate, then update with the calibration parameters … … 274 280 function [GeometryCalib,index]=calibrate(handles,hhuvmat) 275 281 %------------------------------------------------------------------------ 282 set(handles.CheckEnableMouse,'Value',0)% desactivate mouse (to avoid spurious creation of new points) 276 283 %% read the current calibration points 277 284 index=[];
Note: See TracChangeset
for help on using the changeset viewer.