Optimising surgery using bone quality metrics