A system and a method for determining the position and orientation ofimplants located in a body part of a patient. The system comprises aprocessingunit configured to operate the system, determine implant voxels having anintensity value representing the implants in a three-dimensional radiographicrepresentation of the body part, select a region to be searched for implants,generate in the selected region multiple random virtual implants untilobtaining ascore that identifies implants, the score being based on a number of implantvoxels contained in each generated virtual implant, determine the position andorientation of implants and generate data to be used to design a medical modeladapted to the implants. The system further comprises a memory unit configuredto store instructions to be executed by the processing unit to determine theposition and orientation of implants.