Added routine for collecting the statistics of the hyperspectral images.