1. A method of correcting a PET or SPECT image of an imaged subject for attenuation, the method comprising: performing a volumetric attenuation imaging scan of the subject with an X-ray source and an X-ray detector to generate volumetric X-ray attenuation imaging data, such that the imaged subject is not moved along an axis of rotation of the X-ray detector during the imaging scan, wherein the volumetric attenuation imaging scan is performed while the subject is breathing; randomizing the volumetric attenuation imaging scan, wherein randomizing the volumetric attenuation imaging scan comprises averaging volumetric X-ray attenuation imaging data collected during different breathing phases; using the volumetric X-ray attenuation imaging data to generate a gamma ray attenuation map; performing a gamma ray imaging scan of the subject with a gamma ray detector to generate PET or SPECT imaging data; and using the gamma ray attenuation map to correct the PET or SPECT imaging data for attenuation, and to generate an attenuation-corrected PET or SPECT image.