Changeset 1112 for trunk/src/px_XYZ.m
- Timestamp:
- Jan 26, 2022, 7:37:21 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/px_XYZ.m
r1111 r1112 28 28 %======================================================================= 29 29 30 function [X,Y]=px_XYZ(Calib, Xphys,Yphys,Zphys)30 function [X,Y]=px_XYZ(Calib,Slice,Xphys,Yphys,Zphys) 31 31 if ~exist('Zphys','var') 32 32 Zphys=0; … … 40 40 41 41 %%%%%%%%%%%%% 42 if isempty(Slice) 43 Slice=Calib; 44 end 42 45 % general case 43 46 if isfield(Calib,'R') 44 47 R=(Calib.R)'; 45 48 %correct z for refraction if needed 46 if isfield( Calib,'InterfaceCoord') && isfield(Calib,'RefractionIndex')47 H= Calib.InterfaceCoord(3);49 if isfield(Slice,'InterfaceCoord') && isfield(Slice,'RefractionIndex') 50 H=Slice.InterfaceCoord(3); 48 51 if H>Zphys 49 Zphys=H-(H-Zphys)/ Calib.RefractionIndex; %corrected z (virtual object)Calib52 Zphys=H-(H-Zphys)/Slice.RefractionIndex; %corrected z (virtual object)Calib 50 53 51 54 % test_refraction=1;
Note: See TracChangeset
for help on using the changeset viewer.