Assessment of tissue viability using near-infrared spectroscopy