Data analysis of multivariate magnetic resonance images I. A principal component analysis approach