Among other important issues, this system can help surgeons to select the prosthesis that best fits patient’s anatomy among a wide range of sizes, or to design a custom-made one. To our knowledge, this is the first compound system trying to answer to all the technical issues involved in such an ambitious task.Figure 1 shows a schematic diagram of our system for pre-operative planning of knee replacement surgery. Various pieces of data are collected from different sources and processed. The first block is related to bone features: computed tomography (CT) scans and mechanical properties. CT volume elements (voxels) are classified into four different tissue classes (see Section 3.2.), in order to extract the geometry of cortical (external) and trabecular (internal) parts of the bones. Then, mechanical properties of the bone are estimated and mapped onto the CT scan (Section 3.3.). The second block encloses mechanical parameters and surface characteristics of the prosthesis, given by the manufacturer and plugged into the system (Section 4.). A detailed mathematical description of the bone-prosthesis contact is developed (Section 5.). Mechanical data of the tibia and femur, and of the prosthesis are used together with geometry for 3D meshing (Section 6.1.). The last block is related to simulation. 3D meshes and loading conditions are used for FEM simulation (Section 6.1.). A method to deal with uncertainties in the measurements has also been studied (Section 6.3.). The simulated stress results are mapped onto the geometry of the bones for analysis and learn more visualisation. Typical mechanical parameters for the specific clinical case can also be taken from statistical studies about similar cases in the literature, using patients’ info such as age, weight, and sex.Figure 1.Scheme of our system for pre-operative planning of knee replacement surgery.In the following sections we discuss each of these issues.3.?Bone ModellingWe model two aspects of bone structures for stress simulation: geometry and mechanical parameters of the bone. Geometry is extracted from CT scans of the patients’ knee joint using by means of an automatic classification algorithm. A statistical generative model is employed together with a Maximum A-posteriori Probability (MAP) classification rule . The probability distributions used for classification are automatically learned from manually-annotated training scans. CT scans are used for two main reasons. First, acquiring CT data for planning is common clinical practice before knee replacement intervention. Second, CT scans give sufficiently accurate data for knee replacement surgery, as pointed out in .From a mechanical viewpoint, the bone is modelled as a three dimensional viscoelastic material. The two regions composing tibia and femur, cortical and trabecular, posses highly different properties that must be taken into account for an accurate stress simulation.