Methods to organize spectral image database