Building a pixellated detector for gamma-ray imaging: The PICsIT example