unit 30 comprises a medical imaging system configured for image acquisition 301 an image segmentation unit 302 configured for segmentation of a body structure in the image and means 303 for tracking a needle position configured for tracking a position of the needle the medical imaging system could for example be a 2d or 3d ultrasound an x ray system a ct system or an mri system image segmentation can be performed manually semi automatically or automatically image segmentation methods are well known in the art of image processing and will therefore not be further discussed here the means for tracking a needle position could for example be the medical imaging system an em tracking system optical shape sensing in order to avoid hitting and damaging vulnerable structures such as the bladder during a medical intervention the medical imaging system is used to assist a user with needle guidance through the patient or animal body in the case of using a 2d ultrasound scanner this is usually placed at the bladder plane and a continuous observation of the imaging system is required to detect the needle passing through the imaging plane to overcome this limitation a 3d ultrasound scanner can be.