An image segmentation and registration approach to cardiac function analysis using MRI