Fully digital readout of segmented solid state detectors