An approach for adaptively Integrating Spatial and spectral components in Hyperspectral imaging applied to Online Classification of Inhomogeneous Materials