In inverse reconstruction, there are often cases where the volume or image to be reconstructed takes only a finite number of possible values. By explicitly modeling such information, discrete tomography aims to achieve better reconstruction quality and accuracy for these cases. The paper attempts to develop a framework for a general discrete tomography problem. The approach starts with an explicit model of the discreteness using a Bayesian formula. Class label variables are defined to denote the probabilities of each object point belonging to one particular class. The reconstruction then becomes the problem of assigning labels to each object point in the volume (3D) or image (2D) to be reconstructed. Unsurprisingly, this Bayesian labeling process resembles a segmentation process whose goal is also to estimate a discrete-valued field from continuous-valued observations. An expectation-maximization (EM) algorithm is developed to estimate the class label variables. By introducing another set of variables, the EM algorithm iteratively alternates the estimations of these two sets of variables. A linear equation is finally derived, composed of two terms. One accounts for the effect of the discreteness, and the other represents the integral property of the projection in tomography. This linear equation reveals a very interesting relationship between the discrete tomography and ordinary tomography, suggesting that the ordinary tomography may be treated as a special case of discrete tomography where the discreteness term is neglected. Solving the linear equation is usually very computational. This paper, however, derives an efficient algorithm by using concepts developed previously in the rho-filtered layergram method for conventional tomography. With the proposed high-pass filter, the solution for the linear equation can be computed very efficiently in the Fourier domain. In case the class values are unknown in advance, another level of EM algorithm is invoked to estimate these class values. The paper also discusses a Markov random field (MRF) model for non-stationary a priori probability, encouraging the local regularity and smoothness in the reconstruction. The experimental results demonstrate that discrete tomography using the proposed method improves the reconstruction quality greatly, especially when fewer projections are given.