This paper presents a general and unifying optimization framework for the problem of feature extraction and reduction for high-dimensional pattern classification of medical images. Feature extraction is often an ad hoc and case-specific task. Herein, we formulate it as a problem of sparse decomposition of images into a basis that is desired to possess several properties: 1) Sparsity and local spatial support, which usually provides good generalization ability on new samples, and lends itself to anatomically intuitive interpretations; 2) good discrimination ability, so that projection of images onto the optimal basis yields discriminant features to be used in a machine learning paradigm; 3) spatial smoothness and contiguity of the estimated basis functions. Our method yields a parts-based representation, which warranties that the image is decomposed into a number of positive regional projections. A non-negative matrix factorization scheme is used, and a numerical solution with proven convergence is used for solution. Results in classification of Alzheimers patients from the ADNI study are presented.