A stochastic model is developed to enable pattern classification in mammograms based on Bayesian decision theory. Labelling of the image is performed by a deterministic relaxation scheme in which both image data and prior beliefs are weighted simultaneously. The image data is represented by two parameter images representing local contrast and shape. Involving shape is necessary to distinguish thin patches of connective tissue from microcalcifications. A random field models contextual relations between pixel labels. Long range interaction is introduced to express the fact that calcifications do occur in clusters. This ensures that faint spots are only interpreted as calcifications if they are in the neighbourhood of others.