Joint Reconstruction-Segmentation on Graphs