An algorithm is proposed for the fuzzy segmentation of two and three-dimensional multispectral magnetic resonance (MR) images that have been corrupted by intensity inhomogeneities, also known as shading artifacts. The algorithm is an extension of the two-dimensional adaptive fuzzy C-means algorithm (2-D AFCM) presented in previous work by the authors. This algorithm models the intensity inhomogeneities as a gain field that causes image intensities to smoothly and slowly vary through the image space. It iteratively adapts to the intensity inhomo-geneities and is completely automated. In this paper, we fully generalize 2-D AFCM to three-dimensional (3-D) multispectral images. Because of the potential size of 3-D image data, we also describe a new, faster multigrid-based algorithm for its implementation. We show using simulated MR data that 3-D AFCM yields significantly lower error rates than both the standard fuzzy C—means algorithm and several other competing methods when segmenting corrupted images. Its efficacy is further demonstrated using real 3-D scalar and multispectral MR brain images.