Data-constrained modeling is a method that enables three-dimensional distribution of mineral phases and porosity in a sample to be modeled based on micro-computed tomography scans acquired at different X-ray energies. Here we describe an alternative method for measuring porosity, synchrotron K-edge subtraction using xenon gas as a contrast agent. Results from both methods applied to the same Darai limestone sample are compared. Reasonable agreement between the two methods and with other porosity measurements is obtained. The possibility of a combination of data-constrained modeling and K-edge subtraction methods for more accurate sample characterization is discussed.