Changeset 191 for trunk/src/geometry_calib.m
- Timestamp:
- Feb 5, 2011, 11:25:38 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r177 r191 204 204 205 205 % store the calibration data, by default in the xml file of the currently displayed image 206 hhuvmat=guidata(findobj(allchild(0),'Name','uvmat'));%handles of elements in the GUI uvmat 206 huvmat=findobj(allchild(0),'Name','uvmat'); 207 UvData=get(huvmat,'UserData'); 208 NbSlice_j=1;%default 209 ZStart=Z_plane; 210 ZEnd=Z_plane; 211 if isfield(UvData,'XmlData') 212 UvData.XmlData 213 if isfield(UvData.XmlData,'TranslationMotor') 214 NbSlice_j=UvData.XmlData.TranslationMotor.Nbslice; 215 ZStart=UvData.XmlData.TranslationMotor.ZStart; 216 ZEnd=UvData.XmlData.TranslationMotor.ZEnd; 217 end 218 end 219 hhuvmat=guidata(huvmat);%handles of elements in the GUI uvmat 207 220 RootPath=''; 208 221 RootFile=''; … … 227 240 if strcmp(answer,'Yes') 228 241 if strcmp(calib_cell{val}(1:2),'3D')%set the plane position for 3D (projection) calibration 229 answer_1=msgbox_uvmat('INPUT_TXT',' Z= ',num2str(Z_plane)); 230 if strcmp(answer_1,'Cancel') 242 input_key={'Z (first position)','Z (last position)','Z (water surface)', 'refractive index','NbSlice','volume scan (y/n)','tilt angle'}; 243 input_val=[{num2str(ZEnd/10)} {num2str(ZStart/10)} {num2str(ZStart/10)} {'1.33'} num2str(NbSlice_j) {'y'} {'0'}]; 244 answer=inputdlg(input_key,'slice position(s)',ones(1,7), input_val,'on'); 245 %answer_1=msgbox_uvmat('INPUT_TXT',' Z= ',num2str(Z_plane)); 246 GeometryCalib.NbSlice=str2double(answer{5}); 247 GeometryCalib.VolumeScan=answer{6}; 248 if isempty(answer) 231 249 Z_plane=0; %default 232 250 else 233 Z_plane=str2double(answer_1); 234 end 235 GeometryCalib.NbSlice=1; 236 GeometryCalib.SliceCoord=[0 0 Z_plane]; 251 Z_plane=linspace(str2double(answer{1}),str2double(answer{2}),GeometryCalib.NbSlice); 252 end 253 GeometryCalib.SliceCoord=Z_plane'*[0 0 1] 237 254 end 238 255 errormsg=update_imadoc(GeometryCalib,outputfile);% introduce the calibration data in the xml file … … 250 267 delete(hhh); 251 268 end 252 set(hhuvmat.Fix edLimits,'Value',0)% put FixedLimits option to 'off'253 set(hhuvmat.Fix edLimits,'BackgroundColor',[0.7 0.7 0.7])269 set(hhuvmat.FixLimits,'Value',0)% put FixedLimits option to 'off' 270 set(hhuvmat.FixLimits,'BackgroundColor',[0.7 0.7 0.7]) 254 271 UserData=get(handles.geometry_calib,'UserData'); 255 272 UserData.XmlInputFile=outputfile;%save the current xml file name
Note: See TracChangeset
for help on using the changeset viewer.