Evaluation of an automated template-based treatment planning system for radiotherapy of anal, rectal and prostate cancer