Segmentation of Brain MR Images based on Neural Networks