SPAD-based Time-gated Active pixel for 3D Imaging Applications