Planning for total knee replacement