Structure-guided registration in learning based image analysis