We propose a new signal-detection approach for detecting brain activations from PET or fMRI images in a two-state ("on-off") neuroimaging study. We model the activation pattern as a superposition of an unknown number of circular spatial basis functions of unknown position, size, and amplitude. We determine the number of these functions and their parameters by maximum a posteriori (MAP) estimation. To maximize the posterior distribution we use a reversible-jump Markov-chain Monte-Carlo (RJMCMC) algorithm. The main advantage of RJMCMC is that it can estimate parameter vectors of unknown length. Thus, in the model used the number of activation sites does not need to be known. Using a phantom derived from a neuroimaging study, we demonstrate that the proposed method can estimate more accurately the activation pattern from traditional approaches. We also show results obtained from real fMRI data.