1. A method for generating a positron emission tomography (PET) or single-photon emission computed tomography (SPECT) image dataset for an at least partially moving examination object, the method comprising: acquiring a plurality of PET or SPECT measurement signals from an examination region of the examination object; acquiring a plurality of anatomy image datasets that show the examination region using a second imaging modality, the plurality of anatomy image datasets being acquired simultaneously with the acquired plurality of measurement signals; selecting a reference anatomy image dataset from the plurality of anatomy image data sets; applying a temporal weighting function to the plurality of PET or SPECT measurement signals; removing at least one of the plurality of anatomy image datasets when no corresponding measurement signal is acquired during a time period of acquiring the at least one of the plurality of anatomy image data sets; and generating at least one of a PET or SPECT image dataset based on the temporally weighted plurality of measurement signals, wherein the temporal weighting function is decreased as a measurement signal of the PET or SPECT becomes more distant from the reference anatomy image data set in time.