Image-Domain Material Decomposition for Spectral CT Using a Generalized Dictionary Learning