This paper presents a general framework to recover task-related sources from a multi-class Brain-Computer Interface (BCI) based on motor imagery. Our method gathers two common approaches to tackle the multi-class problem: 1) the supervised approach of Common Spatial Patterns and Sparse and/or Spectral variants (CSP, CSSP, CSSSP) to discriminate between different tasks; 2) the criterion of statistical independence of non-stationary sources used in Independent Component Analysis (ICA). Our method can exploit different properties of the signals to find the best discriminative linear combinations of sensors. This yields different models of separation. This work aims at comparing these models. We show that the use of a priori knowledge about the sources and the performed task increases classification rates compared to previous studies. This work gives a general framework to improve Brain-Computer Interfaces and to adapt spatial filtering methods to each subject.