- Timestamp:
- Dec 8, 2014, 1:04:22 AM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/browse_data.m
r827 r837 73 73 set(hObject, 'Position', FigPos); 74 74 set(hObject, 'Units', OldUnits); 75 if exist('EnableMirror','var') && strcmp(EnableMirror,'on') 76 set(handles.CreateMirror,'Visible','on') 77 set(handles.mirror_txt,'Visible','on') 78 else 79 set(handles.CreateMirror,'Visible','off') 80 set(handles.mirror_txt,'Visible','off') 81 end 75 82 if exist('Campaign','var') 76 83 [tild,CampaignName]=fileparts(Campaign); 77 84 RootXml=fullfile(Campaign,[CampaignName '.xml']); 78 85 s=[]; 79 if exist(RootXml,'file') 86 if exist(RootXml,'file') 80 87 [s,Heading]=xml2struct(RootXml);%read the xml file 81 88 if isfield(s,'SourceDir') … … 104 111 uiwait(handles.browse_data); 105 112 end 106 if exist('EnableMirror','var') && strcmp(EnableMirror,'on') 107 set(handles.CreateMirror,'Visible','on') 108 end 113 109 114 110 115 %------------------------------------------------------------------------ -
trunk/src/geometry_calib.m
r827 r837 52 52 % Edit the above text to modify the response to help geometry_calib 53 53 54 % Last Modified by GUIDE v2.5 11-Apr-2014 23:10:5754 % Last Modified by GUIDE v2.5 07-Dec-2014 15:50:44 55 55 56 56 % Begin initialization code - DO NOT edit … … 112 112 set(handles.Extrinsic,'Position',[1 Height-40-4-92-75 418 75])% rank 3 113 113 set(handles.PointLists,'Position',[1 Height-40-6-92-75-117 418 117]) % rank 4 114 set(handles.CheckEnableMouse,'Position',[3 Height- 40-8-92-75-117-30 18030])% rank 5114 set(handles.CheckEnableMouse,'Position',[3 Height-362 208 30])% rank 5 115 115 set(handles.PLOT,'Position',[3 Height-394 120 30])% rank 6 116 116 set(handles.Copy,'Position',[151 Height-394 120 30])% rank 6 117 set(handles.C LEAR_PTS,'Position',[297 Height-394 120 30])% rank 6118 set(handles.Clear Line,'Position',[297 Height-364120 30])% rank 6119 set(handles.CoordLine,'Position',[ 177 Height-364 12030])% rank 6117 set(handles.ClearAll,'Position',[297 Height-394 120 30])% rank 6 118 set(handles.ClearPoint,'Position',[297 Height-362 120 30])% rank 6 119 set(handles.CoordLine,'Position',[211 Height-362 86 30])% rank 6 120 120 set(handles.phys_title,'Position',[38 Height-426 125 20])% rank 7 121 121 set(handles.CoordUnit,'Position',[151 Height-426 120 30])% rank 7 … … 772 772 773 773 % -------------------------------------------------------------------- 774 % --- Executes on button press in C LEAR_PTS: clear the list of calibration points775 function C LEAR_PTS_Callback(hObject, eventdata, handles)774 % --- Executes on button press in ClearAll: clear the list of calibration points 775 function ClearAll_Callback(hObject, eventdata, handles) 776 776 % -------------------------------------------------------------------- 777 777 set(handles.ListCoord,'Data',[]) … … 1399 1399 1400 1400 %------------------------------------------------------------------------ 1401 % --- Executes on button press in Clear Line: remove the selected line in the table Coord1402 %------------------------------------------------------------------------ 1403 function Clear Line_Callback(hObject, eventdata, handles)1401 % --- Executes on button press in ClearPoint: remove the selected line in the table Coord 1402 %------------------------------------------------------------------------ 1403 function ClearPoint_Callback(hObject, eventdata, handles) 1404 1404 1405 1405 Coord=get(handles.ListCoord,'Data'); … … 1418 1418 end 1419 1419 end 1420 -
trunk/src/mouse_motion.m
r809 r837 441 441 set(hhh,'Position',[XCoord(index_point)-ind_range/2 YCoord(index_point)-ind_range/2 ind_range ind_range]) 442 442 else 443 axes(hchild) 443 444 rectangle('Curvature',[1 1],... 444 445 'Position',[XCoord(index_point)-ind_range/2 YCoord(index_point)-ind_range/2 ind_range ind_range],'EdgeColor','m',... -
trunk/src/uvmat.m
r831 r837 1120 1120 'String','last','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1121 1121 uicontrol('Style','text','Units','normalized', 'Position', [4*ii+3*ww 0.95-ii-0.25*hh ww hh/2],'BackgroundColor',BackgroundColor,... 1122 'String','surface',' FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title1122 'String','surface','Visible','off','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1123 1123 % raw 2 of the GUI 1124 1124 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-2*ii-0.75*hh ww hh/2],'BackgroundColor',BackgroundColor,... … … 1129 1129 'String',num2str(SliceCoord(end,3)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_Z_2'': z position of last slice');%edit box 1130 1130 uicontrol('Style','edit','Units','normalized', 'Position', [4*ii+3*ww 0.95-2*ii-hh ww hh],'tag','num_H','BackgroundColor',[1 1 1],... 1131 'String',num2str(InterfaceCoord),' FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_H'': z position of the water surface (=Z_1 in air)');%edit box1131 'String',num2str(InterfaceCoord),'Visible','off','FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_H'': z position of the water surface (=Z_1 in air)');%edit box 1132 1132 % raw 3 of the GUI 1133 uicontrol('Style','text','Units','normalized', 'Position', [2*ii+ww 0.95-3*ii-1.75*hh 2*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Refraction_title',... 1134 'String','refraction index','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title 1133 uicontrol('Style','checkbox','Units','normalized', 'Position', [2*ii+ww 0.95-3*ii-2*hh 2*ww hh],'tag','CheckRefraction','BackgroundColor',BackgroundColor,... 1134 'Callback',@(hObject,eventdata)set_slice_CheckRefraction_Callback(hObject,eventdata),... 1135 'String','refraction','Value',0,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''CheckRefraction'':=1 to provide refraction correction'); 1136 uicontrol('Style','text','Units','normalized', 'Position', [2*ii+2*ww 0.95-3*ii-1.75*hh ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Refraction_title',... 1137 'String','index','Visible','off','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title 1135 1138 uicontrol('Style','edit','Units','normalized', 'Position', [4*ii+3*ww 0.95-3*ii-2*hh ww hh],'tag','num_RefractionIndex','BackgroundColor',[1 1 1],... 1136 'String',num2str(RefractionIndex),' FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_RefractionIndex'': refraction index of water');1139 'String',num2str(RefractionIndex),'Visible','off','FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_RefractionIndex'': refraction index of water'); 1137 1140 % raw 4 of the GUI 1138 1141 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-4*ii-3.25*hh ww hh],'BackgroundColor',BackgroundColor,'Tag','NbSlice_title',... … … 1143 1146 'String','volume scan','Value',CheckVolumeScan,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''CheckVolumeScan'':=1 for volume scan (z varies with j index)'); 1144 1147 % raw 5 of the GUI 1145 uicontrol('Style','text','Units','normalized', 'Position', [2*ii+2*ww 0.95-5*ii-4.2*hh ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_1',... 1146 'String','x axis','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1147 uicontrol('Style','text','Units','normalized', 'Position', [3*ii+3*ww 0.95-5*ii-4.2*hh ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_2',... 1148 'String','y axis','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1148 uicontrol('Style','text','Units','normalized', 'Position', [2*ii+2*ww 0.95-3*ii-3.5*hh ww hh/2],'BackgroundColor',BackgroundColor,... 1149 'String','first','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1150 uicontrol('Style','text','Units','normalized', 'Position', [3*ii+3*ww 0.95-3*ii-3.5*hh ww hh/2],'BackgroundColor',BackgroundColor,... 1151 'String','last','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1152 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4*hh 2*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_1',... 1153 'String','tild angle x axis','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1154 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-6*ii-5*hh 2*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','Angle_title_2',... 1155 'String','tild angle y axis','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1149 1156 % raw 6 of the GUI 1150 uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4.75*hh 2*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','NbSlice_title',... 1151 'String','tilt angle','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title 1152 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+2*ww 0.95-5*ii-5*hh ww hh],'tag','num_SliceAngle_1','BackgroundColor',[1 1 1],... 1153 'String',num2str(SliceAngle(1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceAngle_1'':slice angle of inclination around the x axis');%edit box 1154 uicontrol('Style','edit','Units','normalized', 'Position', [4*ii+3*ww 0.95-5*ii-5*hh ww hh],'tag','num_SliceAngle_2','BackgroundColor',[1 1 1],... 1155 'String',num2str(SliceAngle(2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceAngle_1'':slice angle of inclination around the y axis');%edit box 1157 % uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4.75*hh 2*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','NbSlice_title',... 1158 % 'String','tilt angle','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title 1159 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+2*ww 0.95-5*ii-4.2*hh ww hh],'tag','num_SliceAngle_1_1','BackgroundColor',[1 1 1],... 1160 'String',num2str(SliceAngle(1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceAngle_1_1'':first slice angle of inclination around the x axis');%edit box 1161 uicontrol('Style','edit','Units','normalized', 'Position', [4*ii+3*ww 0.95-5*ii-4.2*hh ww hh],'tag','num_SliceAngle_1_2','BackgroundColor',[1 1 1],... 1162 'String',num2str(SliceAngle(2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceAngle_1_2'':last slice angle of inclination around the x axis');%edit box 1163 uicontrol('Style','edit','Units','normalized', 'Position', [3*ii+2*ww 0.95-6*ii-5.2*hh ww hh],'tag','num_SliceAngle_2_1','BackgroundColor',[1 1 1],... 1164 'String',num2str(SliceAngle(1)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceAngle_2_1'':first slice angle of inclination around the y axis');%edit box 1165 uicontrol('Style','edit','Units','normalized', 'Position', [4*ii+3*ww 0.95-6*ii-5.2*hh ww hh],'tag','num_SliceAngle_2_2','BackgroundColor',[1 1 1],... 1166 'String',num2str(SliceAngle(2)),'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''num_SliceAngle_2_2'':last slice angle of inclination around the y axis');%edit box 1167 1156 1168 % raw 7 of the GUI: pushbuttons 1157 1169 wwp=(1-4*ii)/3; %width of the push buttons … … 1165 1177 1166 1178 %------------------------------------------------------------------------ 1179 % function called by selecting CheckRefraction in the GUI set_slices 1180 function set_slice_CheckRefraction_Callback(hObject,eventdata) 1181 %------------------------------------------------------------------------ 1182 hset_slice=get(hObject,'parent'); 1183 h_refraction(1)=findobj(hset_slice,'String','surface'); 1184 h_refraction(2)=findobj(hset_slice,'Tag','num_H'); 1185 h_refraction(3)=findobj(hset_slice,'String','index'); 1186 h_refraction(4)=findobj(hset_slice,'Tag','num_RefractionIndex'); 1187 if isequal(get(hObject,'Value'),1) 1188 set(h_refraction,'Visible','on') 1189 else 1190 set(h_refraction,'Visible','off') 1191 end 1192 1193 %------------------------------------------------------------------------ 1167 1194 % function called by pressing APPLY in the GUI set_slices 1168 1195 function set_slice_APPLY_Callback(hObject,eventdata) … … 1173 1200 hhuvmat=guidata(huvmat); 1174 1201 [RootPath,SubDir,RootFile,FileIndex,FileExt]=read_file_boxes(hhuvmat); 1175 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];%name of the xml file for calibration1202 FileName=[fullfile(RootPath,SubDir,RootFile) FileIndex FileExt];%name of the current input file 1176 1203 [RootPath,SubDir,RootFile,tild,tild,tild,tild,FileExt]=fileparts_uvmat(FileName); 1177 XmlFile=find_imadoc(RootPath,SubDir,RootFile,FileExt); 1178 [s,errormsg]=imadoc2struct(XmlFile,'GeometryCalib'); 1204 XmlFile=find_imadoc(RootPath,SubDir,RootFile,FileExt);%find name of the relevant xml file 1205 [s,errormsg]=imadoc2struct(XmlFile,'GeometryCalib');%read the xml file 1179 1206 if~isempty(errormsg) 1180 1207 msgbox_uvmat('ERROR',errormsg) 1181 1208 return 1182 1209 end 1183 GeometryCalib=s.GeometryCalib; 1210 GeometryCalib=s.GeometryCalib;% get thegeometric calibration data 1184 1211 1185 1212 %% read the content of the GUI set_slice … … 1193 1220 GeometryCalib.SliceAngle(:,2)=SliceData.SliceAngle(2)*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise) 1194 1221 GeometryCalib.SliceAngle(:,3)=0; 1195 GeometryCalib.InterfaceCoord=[0 0 SliceData.H]; 1196 GeometryCalib.RefractionIndex=SliceData.RefractionIndex; 1222 if SliceData.CheckRefraction 1223 GeometryCalib.InterfaceCoord=[0 0 SliceData.H]; 1224 GeometryCalib.RefractionIndex=SliceData.RefractionIndex; 1225 end 1197 1226 1198 1227 %% store the result in the xml file used for calibration … … 1222 1251 1223 1252 %% open the GUI browse_data 1224 answer=msgbox_uvmat('INPUT_TXT','Campaign to calibrate with slice position?',fileparts(RootPath)); 1225 if strcmp(answer,'Cancel') 1226 return 1227 end 1228 OutPut=browse_data(answer); 1253 % answer=msgbox_uvmat('INPUT_TXT','Campaign to calibrate with slice position?',fileparts(RootPath)); 1254 % if strcmp(answer,'Cancel') 1255 % return 1256 % end 1257 OutPutDir=uigetfile_uvmat('Campaign to calibrate with slice position?',fileparts(RootPath),'uigetdir'); 1258 OutPut=browse_data(OutPutDir); 1229 1259 nbcalib=0; 1230 1260 for ilist=1:numel(OutPut.Experiment) … … 1247 1277 GeometryCalib.SliceAngle(:,2)=SliceData.SliceAngle(2)*ones(GeometryCalib.NbSlice,1);%rotation around y axis (to generalise) 1248 1278 GeometryCalib.SliceAngle(:,3)=0; 1249 GeometryCalib.InterfaceCoord=[0 0 SliceData.H]; 1250 GeometryCalib.RefractionIndex=SliceData.RefractionIndex; 1279 if SliceData.CheckRefraction 1280 GeometryCalib.InterfaceCoord=[0 0 SliceData.H]; 1281 GeometryCalib.RefractionIndex=SliceData.RefractionIndex; 1282 end 1251 1283 1252 1284 % update the current xml file … … 4872 4904 4873 4905 %% delete drawn objects if the output CooordUnit is different from the previous one 4874 if ~isempty(CoordUnit) && ~isempty(CoordUnitPrev) && ~strcmp(CoordUnit,CoordUnitPrev) 4906 if ~strcmp(CoordUnit,CoordUnitPrev) 4907 % for iobj=1:numel(UvData.ProjObject) 4908 % delete_object(iobj) 4909 % end 4875 4910 set(handles.CheckFixLimits,'Value',0) 4876 4911 hother=findobj('Tag','proj_object');%find all the proj objects 4877 4912 for iobj=1:length(hother) 4878 delete _object(hother(iobj))4913 delete(hother(iobj)) 4879 4914 end 4880 4915 hother=findobj('Tag','DeformPoint');%find all the proj objects 4881 4916 for iobj=1:length(hother) 4882 delete _object(hother(iobj))4917 delete(hother(iobj)) 4883 4918 end 4884 4919 hh=findobj('Tag','calib_points');
Note: See TracChangeset
for help on using the changeset viewer.