function dmap = distanceMap(F, X, dX)
%compute a L1 contour map in the features space
% F is the features tables
% X is the origin vector
% dX is the weights vector

% used for CellAnalysis


   
[row col z] = size(F);
dmap = 1 -...
   dX(1) * abs(F(:,:,1)-X(1)) - ...
   dX(2) * abs(F(:,:,2)-X(2)) - ...
   dX(3) * abs(F(:,:,3)-X(3)) - ...
   dX(4) * abs(F(:,:,4)-X(4)) - ...
   dX(5) * abs(F(:,:,5)-X(5)) - ...
   dX(6) * abs(F(:,:,6)-X(6)) - ...
   dX(7) * abs(F(:,:,7)-X(7));
  

