Radioisotopes have the supreme advantage in that they can be taken to the site when an examination is required – and no power is needed.
However, they cannot be simply turned off, and so must be properly shielded both when in use and at other times.
Gamma sources are normally more portable than x-ray equipment so have a clear advantage in certain applications, such as in remote areas.
Also while X-ray sources emit a broad band of radiation, gamma sources emit at most a few discrete wavelengths.
The energies of the fluorescent X-rays emitted can identify the elements present in the material, and their intensity can indicate the quantity of each element present.