Tensor based dictionary learning for spectral CT reconstruction