Legend:
- Unmodified
- Added
- Removed
-
trunk/src/phys_ima.m
r849 r892 1 1 2 % phys_ima: transform several images in phys coordinates on a common pixel grid 2 3 %------------------------------------------------------------------------ … … 61 62 SliceCoord=Calib.SliceCoord(ZIndex,:); 62 63 zphys=SliceCoord(3); %to generalize for non-parallel planes 63 if isfield(Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex')64 H=Calib.InterfaceCoord(3);65 if H>zphys66 zphys=H-(H-zphys)/Calib.RefractionIndex; %corrected z (virtual object)67 end68 end64 % if isfield(Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex') 65 % H=Calib.InterfaceCoord(3); 66 % if H>zphys 67 % zphys=H-(H-zphys)/Calib.RefractionIndex; %corrected z (virtual object) 68 % end 69 % end 69 70 end 70 71 xima=0.5:npx-0.5;%image coordinates of corners -
trunk/src/px_XYZ.m
r809 r892 48 48 if H>Zphys 49 49 Zphys=H-(H-Zphys)/Calib.RefractionIndex; %corrected z (virtual object) 50 test_refraction=1;50 % test_refraction=1; 51 51 end 52 52 end -
trunk/src/uvmat.m
r890 r892 1083 1083 1084 1084 UvData=get(handles.uvmat,'UserData');%read UvData properties stored on the uvmat interface 1085 check=0;1085 % check=0; 1086 1086 if isfield(UvData,'XmlData')&&isfield(UvData.XmlData{1},'GeometryCalib')&& isfield(UvData.XmlData{1}.GeometryCalib,'SliceCoord') 1087 1087 GeometryCalib=UvData.XmlData{1}.GeometryCalib; … … 1101 1101 end 1102 1102 RefractionIndex=1.33; 1103 CheckRefraction=0;% default value of the check box refraction 1103 1104 if isfield(GeometryCalib,'RefractionIndex') 1104 1105 RefractionIndex=GeometryCalib.RefractionIndex; 1106 CheckRefraction=1; 1105 1107 end 1106 1108 SliceAngle=[0 0 0]; … … 1141 1143 '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 1142 1144 % raw 3 of the GUI 1143 uicontrol('Style','checkbox','Units','normalized', 'Position', [2*ii+ww 0.95-3*ii-2*hh 2*ww hh],'tag','CheckRefraction','BackgroundColor',BackgroundColor,...1145 hcheckrefraction=uicontrol('Style','checkbox','Units','normalized', 'Position', [2*ii+ww 0.95-3*ii-2*hh 2*ww hh],'tag','CheckRefraction','BackgroundColor',BackgroundColor,... 1144 1146 'Callback',@(hObject,eventdata)set_slice_CheckRefraction_Callback(hObject,eventdata),... 1145 'String','refraction','Value', 0,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''CheckRefraction'':=1 to provide refraction correction');1147 'String','refraction','Value',CheckRefraction,'FontUnits','points','FontSize',12,'FontWeight','bold','TooltipString','''CheckRefraction'':=1 to provide refraction correction'); 1146 1148 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',... 1147 1149 'String','index','Visible','off','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title … … 1165 1167 'String','tild angle y axis','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','center');%title 1166 1168 % raw 6 of the GUI 1167 % uicontrol('Style','text','Units','normalized', 'Position', [ii 0.95-5*ii-4.75*hh 2*ww hh/2],'BackgroundColor',BackgroundColor,'Tag','NbSlice_title',...1168 % 'String','tilt angle','FontUnits','points','FontSize',12,'FontWeight','bold','ForegroundColor','blue','HorizontalAlignment','right');%title1169 1169 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],... 1170 1170 '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 … … 1185 1185 'String','Cancel','FontWeight','bold','FontUnits','points','FontSize',12,'TooltipString','''Cancel'': quit GUI without action'); 1186 1186 drawnow 1187 set_slice_CheckRefraction_Callback(hcheckrefraction,[]) 1187 1188 1188 1189 %------------------------------------------------------------------------ … … 1235 1236 GeometryCalib.InterfaceCoord=[0 0 SliceData.H]; 1236 1237 GeometryCalib.RefractionIndex=SliceData.RefractionIndex; 1238 elseif isfield(GeometryCalib,'RefractionIndex') 1239 GeometryCalib=rmfield(GeometryCalib,'RefractionIndex'); 1240 GeometryCalib=rmfield(GeometryCalib,'InterfaceCoord'); 1237 1241 end 1238 1242
Note: See TracChangeset
for help on using the changeset viewer.