We propose a variational approach for the reconstruction of a volume from slices. The reconstructed set is obtained as a minimizer of a geometric regularity criterion, either the perimeter or the Willmore energy, with inclusion-exclusion constraints associated with the cross sections. We propose a phase field approximation of this model, and we analyze it when the regularity criterion is the perimeter. We derive simple and accurate numerical schemes for both the perimeter-based and the Willmore-based formulations, and we illustrate with several numerical examples the performances of our approach, which proves to be effective for a large category of constraints.