Method and apparatus for three-dimensional imaging of objects