We give an algorithm allowing the construction of bases of local unitary invariants of pure k-qubit states from a knowledge of the polynomial covariants of the group of invertible local filtering operations. The simplest invariants obtained in this way are made explicit and compared with various known entanglement measures. Complete sets of generators are obtained for up to four qubits, and the structure of the invariant algebras is discussed in detail.