Pre-stack migration in two and three dimensions