In this paper, we propose a partial differential equation model for three-dimensional (3-D) volume reconstruction from 2-D slices. The proposed method is based on the modified Cahn--Hilliard equation for 3-D binary inpainting. In order to accurately satisfy the constraints while obtaining a smooth result, we apply a presmoothing procedure based on anisotropic diffusion to the slices. We discuss the justification for our inpainting model using a $\Gamma$-convergence analysis. After splitting a grayscale image into binary channels, we perform multichannel Cahn--Hilliard inpainting. Then we adopt smoothing and a shock filter as postprocessing to combine the binary inpainting results. We then employ our method to reconstruct a 3-D human body from parallel slices of CT images.