The invention relates to a system for performing a therapeutic procedure like a HDR brachytherapy. An elongate introduction element is introduced into a body (2), a temperature is determined along the introduction element, and it is determined which part of the introduction element is within the body based on the determined temperature. A therapeutic procedure is performed by using the introduction element depending on the determination which part of the introduction element is within the body (2). This can ensure that the therapeutic procedure is only performed within the body, thereby reducing the likelihood of involuntary affecting, for instance, a patients outer skin, especially by ionizing radiation which may be used during a HDR brachytherapy.