function Vo=voxel(P)
%
% Purpose : to compute the voxels connected to the pixel P
% 
% Arguments in :
% P : location of the pixel in the frame (C,nr,np,nc)
%
% Arguments out :
% Vo : voxels in the sample that are connected to the pixel P
%       V(i,n) is the i-th component of the n-th voxel
%
% All coordinates are given in the frame (C,nr,np,nc)
%
% ARAMIS - (c) S. Balac - ENSSAT - Université de Rennes 1 - 2007 (version 2.0)
%

global c
global r0
Vo=[];

tau1=P(1)/r0; % to work with dimensionless qty
tau2=P(2)/r0;
zeta=P(3)/r0;

R=[];
R = fndrc(tau1,tau2,zeta,c/r0); % computation of the zeros of the function F

% computation of the coordinates of the voxels Vo linked to P
for i=1:length(R)
  xs = R(i);	
  xr = tau1 + (xs-zeta);
  xp = tau2;
  Vo(1,i)=r0*xr;
  Vo(2,i)=r0*xp;
  Vo(3,i)=r0*xs;
end


