The invention relates to a system (100) for computing a risk, the risk relating to injuring an anatomical structure by a medical device during a medical procedure, the system comprising: a structure unit (110) for obtaining a position of the anatomical structure; a device unit (120) for obtaining a position of the medical device; and a risk unit (130) for computing the risk relating to injuring the anatomical structure, based on the position of the medical device and the position of the anatomical structure. The system (100) may be used for planning a path of a medical device, which path minimizes said risk, or for monitoring said risk during the medical procedure.