An Optimized Approach for SVM Based Segmentation of MR Images of Brain Tumors