Determination of the spatial distribution of wetting in the pore networks of rocks.