Automated Brain Lesion Detection and Segmentation Using MR Images