source code for partition of multispectral images