Heart function evaluation requires the segmentation of left and right ventricles. We propose a level set-based method that incorporates topology preservation. Our method allows simultaneous segmentation of left and right ventricles from MRI. Our method is fast and accurate, even in the presence of congenital heart diseases.