Cavitation is a complicated multiphase phenomenon, where the production of vapor cavities leads to an opaque flow. Exploring the internal structures of the cavitating flows is one of the most significant challenges in this field of study. While it is not possible to visualize the interior of the cavity with visible light, we use X-ray computed tomography to obtain the time-averaged void fraction distribution in an axisymmetric converging-diverging nozzle ('venturi'). This technique is based on the amount of energy absorbed by the material, which in turn depends on its density and thickness. Using this technique, two different partial cavitation mechanisms are examined: the re-entrant jet mechanism and the bubbly shock mechanism. 3D reconstruction of the X-ray images is used (i) to differentiate between vapor and liquid phase, (ii) to obtain radial geometric features of the flow, and (iii) to quantify the local void fraction. The void fraction downstream of the venturi in the bubbly shock mechanism is found to be more than twice compared to the re-entrant jet mechanism. The results show the presence of intense cavitation at the walls of the venturi. Moreover, the vapor phase mixes with the liquid phase downstream of the venturi, resulting in cloud-like cavitation.