Non-rigid registration between histological and MR images of the prostate: A joint segmentation and registration framework