Surface Topological Analysis for Image Synthesis