function Y = imageVectors(image, n, even)
% returns a stack of shifted images corresponding to the
% (2n+1+even)x(2n+1+even) neighborhoords of (x,y)


if (nargin == 2)
   even = 0;
end

[row col] = size(image);
Y = zeros((2*n+1+even)^2, row*col);
rep = replicateBounds(image, n+even,n+even);
i = 1;
for x=-n:(n+even)
   for y=-n:(n+even)
      im = getShift(rep, x, y, [row col]);
      Y(i,:) = reshape(im, [1 row*col]);
      i = i+1;
   end
end


