Spectral X-ray image reconstruction toolbox. The SPRAY toolbox consists of a set of funtions written in Matlab for nonlinear image reconstruction in spectral X-ray imaging. SPRAY 1.0 performs material decomposition of projection images acquired by a photon counting detector. It implements a regularised weighted least square Gauss Newton algorithm (see here). Different types of functional can be chosen to regularise the material images. It is designed to be simple yet efficient. SPRAY 1.0 is provided with different projections of a realistic thorax phantom.