- Timestamp:
- Sep 29, 2023, 6:54:33 PM (15 months ago)
- Location:
- trunk/src
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/uvmat.m
r1123 r1125 1211 1211 Check_slice=0; 1212 1212 if isfield(UvData,'XmlData') 1213 if isfield(UvData.XmlData{1},'GeometryCalib') && strcmp(UvData.XmlData{1}.GeometryCalib.CalibrationType(1:3),'3D_')1213 if isfield(UvData.XmlData{1},'GeometryCalib') && isfield(UvData.XmlData{1}.GeometryCalib,'CalibrationType')&& strcmp(UvData.XmlData{1}.GeometryCalib.CalibrationType(1:3),'3D_') 1214 1214 Check_slice=1; 1215 1215 end … … 1225 1225 end 1226 1226 % default input 1227 if ~(isfield(Slice,'SliceCoord') && size(Slice.SliceCoord,2)==3) 1228 Slice.SliceCoord=[0 0 0]; 1229 end 1230 InterfaceCoord=min(Slice.SliceCoord(:,3)); 1231 if isfield(Slice,'InterfaceCoord') 1232 InterfaceCoord=Slice.InterfaceCoord(1,3); 1233 end 1234 NbSlice=size(Slice.SliceCoord,1); 1235 CheckVolumeScan=0; 1236 if isfield(Slice,'CheckVolumeScan') 1237 CheckVolumeScan=Slice.CheckVolumeScan; 1238 end 1239 RefractionIndex=1.33; 1240 CheckRefraction=0;% default value of the check box refraction 1241 if isfield(Slice,'RefractionIndex') 1242 RefractionIndex=Slice.RefractionIndex; 1243 CheckRefraction=1; 1244 end 1245 SliceAngle=[0 0 0]; 1246 if isfield(Slice,'SliceAngle') 1247 SliceAngle=Slice.SliceAngle; 1227 app=set_slices; 1228 app.UIFigure.Name='set_slices'; 1229 app.unequalintervalsCheckBox.Value=0;%default 1230 if (isfield(Slice,'SliceCoord') && size(Slice.SliceCoord,2)==3) 1231 app.NbSliceEditField.Value=size(Slice.SliceCoord,1); 1232 app.firstZEditField.Value=Slice.SliceCoord(1,3); 1233 app.lastZEditField.Value=Slice.SliceCoord(end,3); 1234 app.axispositionxEditField.Value=Slice.SliceCoord(1,1); 1235 app.yEditField.Value=Slice.SliceCoord(1,2); 1236 app.UITable.Data=zeros(size(Slice.SliceCoord,1),3); 1237 app.UITable.Data(:,1)=Slice.SliceCoord(:,3); 1238 shifts=diff(Slice.SliceCoord(:,3)); 1239 if min(shifts)<max(shifts) 1240 app.unequalintervalsCheckBox.Value=1; 1241 end 1242 if isfield(Slice,'CheckVolumeScan') 1243 app.volumescanCheckBox.Value=Slice.CheckVolumeScan; 1244 end 1245 app.indexEditField.Value=1.33; 1246 app.refractionCheckBox.Value=0;% default value of the check box refraction 1247 if isfield(Slice,'RefractionIndex') 1248 app.refractionCheckBox.Value=1; 1249 app.indexEditField.Value=Slice.RefractionIndex; 1250 app.indexEditField.Visible='on'; 1251 app.indexEditFieldLabel.Visible='on'; 1252 app.surfaceEditField.Value=min(Slice.SliceCoord(:,3));%default free surface position 1253 app.surfaceEditField.Visible='on'; 1254 app.surfaceEditFieldLabel.Visible='on'; 1255 if isfield(Slice,'InterfaceCoord') 1256 app.surfaceEditField.Value=Slice.InterfaceCoord(1,3); 1257 end 1258 end 1259 app.firstangleEditField.Value=0; 1260 app.firstangleEditField_2.Value=0; 1261 app.lastangleEditField.Value=0; 1262 app.lastangleEditField_2.Value=0; 1263 if isfield(Slice,'SliceAngle') 1264 app.firstangleEditField.Value=Slice.SliceAngle(1,1); 1265 app.firstangleEditField_2.Value=Slice.SliceAngle(1,2); 1266 app.lastangleEditField.Value=Slice.SliceAngle(end,1); 1267 app.lastangleEditField_2.Value=Slice.SliceAngle(end,2); 1268 app.UITable.Data(:,2)=Slice.SliceAngle(:,1); 1269 app.UITable.Data(:,3)=Slice.SliceAngle(:,2); 1270 shift_x=diff(Slice.SliceAngle(:,1)); 1271 shift_y=diff(Slice.SliceAngle(:,2)); 1272 if min(shift_x)<max(shift_x)||min(shift_y)<max(shift_y) 1273 app.unequalintervalsCheckBox.Value=1; 1274 end 1275 end 1276 end 1277 if app.unequalintervalsCheckBox.Value 1278 app.UITable.Visible='on'; 1279 else 1280 app.UITable.Visible='off'; 1248 1281 end 1249 1282 1250 1283 %% create the GUI set_slice 1284 return 1285 'TEST' 1286 %%old version 1251 1287 set(0,'Units','points') 1252 1288 ScreenSize=get(0,'ScreenSize');% get the size of the screen, to put the fig on the upper right … … 1256 1292 Bottom=ScreenSize(4)-Height-40; %put fig at top right 1257 1293 hfig=findobj(allchild(0),'Tag','set_slice'); 1258 if ~isempty(hfig),delete(hfig), end %delete existing version of the GUI 1294 % if ~isempty(hfig),delete(hfig), end %delete existing version of the GUI 1295 % hfig=uifigure('name','set_slices','tag','set_slice','MenuBar','none','NumberTitle','off','Units','pixels','Position',[Left,Bottom,Width,Height],'UserData',Slice); 1296 % 1297 %return 1259 1298 hfig=figure('name','set_slices','tag','set_slice','MenuBar','none','NumberTitle','off','Units','pixels','Position',[Left,Bottom,Width,Height],'UserData',Slice); 1260 1299 BackgroundColor=get(hfig,'Color'); … … 4559 4598 4560 4599 %------------------------------------------------------------------------ 4561 % --- read the data displayed for the input rootfile windows (new): TODO use read_GUI4600 % --- read the data displayed for the input rootfile windows 4562 4601 %------------------------------------------------------------------------ 4563 4602 function [RootPath,SubDir,RootFile,FileIndices,FileExt,NomType]=read_file_boxes(handles) … … 4579 4618 if isequal(get(handles.RootPath_1,'Visible'),'off') || isequal(RootPath_1,'"') 4580 4619 RootPath_1=get(handles.RootPath,'String'); 4581 end ;4620 end 4582 4621 SubDir_1=get(handles.SubDir_1,'String'); 4583 4622 if isequal(get(handles.SubDir_1,'Visible'),'off')|| isequal(SubDir_1,'"')
Note: See TracChangeset
for help on using the changeset viewer.