Geometric and structural inference on shape collections