A neural network approach to unsupervised segmentation of single-channel MR images