Segmentation Guided Registration For Medical Images