Changeset 1112 for trunk/src/px_XYZ.m


Ignore:
Timestamp:
Jan 26, 2022, 7:37:21 PM (2 years ago)
Author:
sommeria
Message:

set_slice separated from geometrey_calib

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/px_XYZ.m

    r1111 r1112  
    2828%=======================================================================
    2929
    30 function [X,Y]=px_XYZ(Calib,Xphys,Yphys,Zphys)
     30function [X,Y]=px_XYZ(Calib,Slice,Xphys,Yphys,Zphys)
    3131if ~exist('Zphys','var')
    3232    Zphys=0;
     
    4040
    4141%%%%%%%%%%%%%
     42if isempty(Slice)
     43    Slice=Calib;
     44end
    4245% general case
    4346if isfield(Calib,'R')
    4447    R=(Calib.R)';
    4548    %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);
    4851        if H>Zphys
    49             Zphys=H-(H-Zphys)/Calib.RefractionIndex; %corrected z (virtual object)Calib
     52            Zphys=H-(H-Zphys)/Slice.RefractionIndex; %corrected z (virtual object)Calib
    5053           
    5154          %  test_refraction=1;
Note: See TracChangeset for help on using the changeset viewer.