Chemical shift imaging (CST) often suffers from the inconvenient shape of i
ts spatial response function (SRF), which affects both localization and sig
nal-to-noise ratio. Replacing the magnetic held gradients for phase encodin
g by higher order magnetic fields allows a better adjustment of the SRF to
the structures in the sample. We combined this principle with the SLOOP (sp
ectral localization with optimal pointspread function) technique to simulta
neously obtain spectra from several arbitrarily shaped compartments within
a sample. Linear combinations of the fields of the shim coils are used to g
enerate the pulsed fields for phase encoding. Their shapes are matched to t
he given sample geometry by numerical optimization. Using this method, spec
tra from a phantom were obtained that show a higher signal-to-noise ratio a
nd a strongly reduced contamination compared to an equivalent CSI experimen
t. (C) 1999 Academic Press.