Spatial independent component analysis (ICA) is a well-established technique for multivariate analysis of functional magnetic resonance imaging (fMRI) data. It blindly extracts spatiotemporal patterns of neural activity from functional measurements by seeking for sources that are maximally independent. Additional information on one or more sources (e.g., spatial regularity) is often available; however, it is not considered while looking for independent components. In the present work, we propose a new ICA algorithm based on the optimization of an objective function that accounts for both independence and other information on the sources or on the mixing model in a very general fashion. In particular, we apply this approach to fMRI data analysis and illustrate, by means of simulations, how inclusion of a spatial regularity term helps to recover the sources more effectively than with conventional ICA. The improvement is especially evident in high noise situations. Furthermore we employ the same approach on data sets from a complex mental imagery experiment, showing that consistency and physiological plausibility of relatively weak components are improved.