Optimization in spectral X-ray/CT imaging measurements