SPAD-based Light Detection and Ranging for 3D imaging