A Novel Segmentation Algorithm Based on Level Set Approach with Intensity Inhomogeneity: Application to Medical Images