Morphological segmentation of hyperspectral images