Radiation therapy planning and optimization studied as inverse problems