Image processing and lattice determination for three-dimensional nanocrystals