Changeset 909 for trunk/src/uvmat.m
- Timestamp:
- Jun 9, 2015, 7:51:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r908 r909 1206 1206 function set_slice_APPLY_Callback(hObject,eventdata) 1207 1207 %------------------------------------------------------------------------ 1208 set(hObject,'BackgroundColor',[1 1 0]);% paint button in yellow to indicate action 1209 drawnow 1208 1210 1209 1211 %% get the uvmat GUI data and read the current xml file … … 1250 1252 1251 1253 %% display image with new calibration in the currently opened uvmat interface 1252 set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image1254 %set(hhuvmat.CheckFixLimits,'Value',0)% put FixedLimits option to 'off' to plot the whole image 1253 1255 uvmat('InputFileREFRESH_Callback',huvmat,[],hhuvmat); %file input with xml reading in uvmat, show the image in phys coordinates 1256 set(hObject,'BackgroundColor',[1 0 0]);% paint button back to red 1254 1257 1255 1258 %------------------------------------------------------------------------ … … 1257 1260 function set_slice_REPLICATE_Callback(hObject,eventdata) 1258 1261 %------------------------------------------------------------------------ 1262 set(hObject,'BackgroundColor',[1 1 0]) 1263 drawnow 1259 1264 1260 1265 %% read the GUI set_slice … … 1264 1269 huvmat=findobj(allchild(0),'Tag','uvmat'); 1265 1270 hhuvmat=guidata(huvmat); 1266 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(hhuvmat); 1267 1268 %% open the GUI browse_data 1269 % answer=msgbox_uvmat('INPUT_TXT','Campaign to calibrate with slice position?',fileparts(RootPath)); 1270 % if strcmp(answer,'Cancel') 1271 % return 1272 % end 1273 OutPutDir=uigetfile_uvmat('Campaign to calibrate with slice position?',fileparts(RootPath),'uigetdir'); 1271 RootPath=read_file_boxes(hhuvmat); 1272 1273 OutPutDir=uigetfile_uvmat('choosean image folder to calibrate with slice position?',fileparts(RootPath),'uigetdir'); 1274 1274 OutPut=browse_data(OutPutDir); 1275 1275 nbcalib=0; … … 1286 1286 GeometryCalib=s.GeometryCalib; 1287 1287 GeometryCalib.NbSlice=SliceData.NbSlice; 1288 GeometryCalib. VolumeScan=SliceData.CheckVolumeScan;1288 GeometryCalib.CheckVolumeScan=SliceData.CheckVolumeScan; 1289 1289 Z_plane=linspace(SliceData.Z(1),SliceData.Z(2),SliceData.NbSlice); 1290 1290 GeometryCalib.SliceCoord=Z_plane'*[0 0 1]; 1291 1291 GeometryCalib.SliceAngle=zeros(GeometryCalib.NbSlice,3); 1292 GeometryCalib.SliceAngle(:,1)=SliceData.SliceAngle(1)*ones(GeometryCalib.NbSlice,1);%rotation around x axis (to generalise) 1293 GeometryCalib.SliceAngle(:,2)=SliceData.SliceAngle(2)*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise) 1292 Angle_1=linspace(SliceData.SliceAngle_1(1),SliceData.SliceAngle_1(2),SliceData.NbSlice); 1293 Angle_2=linspace(SliceData.SliceAngle_2(1),SliceData.SliceAngle_2(2),SliceData.NbSlice); 1294 GeometryCalib.SliceAngle(:,1)=Angle_1';%rotation around x axis (to generalise) 1295 GeometryCalib.SliceAngle(:,2)=Angle_2';%rotation around y axis (to generalise) 1294 1296 GeometryCalib.SliceAngle(:,3)=0; 1295 1297 if SliceData.CheckRefraction 1296 1298 GeometryCalib.InterfaceCoord=[0 0 SliceData.H]; 1297 1299 GeometryCalib.RefractionIndex=SliceData.RefractionIndex; 1300 elseif isfield(GeometryCalib,'RefractionIndex') 1301 GeometryCalib=rmfield(GeometryCalib,'RefractionIndex'); 1302 GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord'); 1298 1303 end 1299 1304 … … 1307 1312 end 1308 1313 end 1314 set(hObject,'BackgroundColor',[1 0 0]) 1309 1315 msgbox_uvmat('CONFIMATION',[SubDirBase ' calibrated with slice positions for ' num2str(nbcalib) ' experiments']); 1316 1310 1317 1311 1318 %------------------------------------------------------------------------
Note: See TracChangeset
for help on using the changeset viewer.