Shape Reconstruction with Topological Priors