ENH: use template registration