This protocol is presented to characterize the complex wetting conditions of an opaque porous medium (hydrocarbon reservoir rock) using three-dimensional images obtained by X-ray microtomography at subsurface conditions.