Statistics for Automatic detection and segmentation of brain lesions from 3D MR and CT images