Characterising Residual Limb Morphology and Prosthetic Socket Design based on Expert Clinician Practice

Abstract


Introduction
Prosthetic socket design and fitting is crucial for providing comfortable, stable and functional prostheses that match the shape and biomechanical characteristics of the individual residual limb, distributing the pressure created by ambulatory loading in ways the limb can tolerate without tissue damage [1].Residual limb shapes, sizes and tissue tolerances vary significantly across the population, so understanding the design objectives to best suit an individual is complex.Conventional approaches to socket fitting rely heavily on the skill of prosthetists, who work from limited objective data.There is a need for evidence to support their design choices so that they can optimise the fit for the individual, and at present this is a highly iterative process [2], [3].Some iteration will always be required, to accommodate limb volume and shape changes especially in the first year after amputation, but this project's goal is to reduce the iteration arising from trial and error.

Current clinical practice in residual limb shape capture and prosthetic socket design.
There is a range of approaches for capturing the shape of a residual limb and generating a corresponding socket design, with shape capture and design often overlapping [4].Hands-on methods include capturing the limb shape by plaster casting, creating a positive mould, and performing a range of shape modifications known as rectification (carving material off the mould, or building material up), so that a vacuum-formed or composite socket has a desired pattern of limb-prosthesis interface load transfer.The two most common approaches at the transtibial level are known as Patellar Tendon Bearing (PTB) [5] and Total Surface Bearing (TSB) [6].PTB aims to load preferentially the tolerant tissue sites in the residual limb (including the patella tendon and fleshy zones either side of the anterior tibia and over the calf muscles), and offload more vulnerable sites (including the anterior and distal tibia, the fibula head, and residual limb tip).TSB sockets with elastomeric liners are intended to achieve more uniform load transfer across the limb surface, and avoid pressure gradients.
Alternatively, several 'hands-off' shape capture methods are available, which aim to create uniform load transfer directly in response to the residual limb tissues' compliance under load.Hydrostatic Sockets (HS) are plaster cast over a silicone elastomer liner, non-weightbearing, with pressure applied through compressed air [7], [8].Pressure casting can also be performed weightbearing; the PCAST approach collects a plaster cast while weightbearing, suspending the limb inside a cylinder of water [9], and the CIR system uses sand casting under vacuum [10], [11].These methods are designed to reduce variation and reliance on manual dexterity, but may still require local shape modifications [4].
The family of Computer-Aided Design and Manufacturing (CAD/CAM) technologies are growing in use, typically to create sockets by the PTB and TSB concepts through digital modification of a 3D shape scan file, before carving a foam mould for socket fabrication.CAD/CAM requires the same clinician experience and skill as plaster methods, and gives the prosthetist full control over the design whilst preserving a digital record of individual designs, and their practice as a whole.

Towards more evidence-based prosthetic socket design
Prosthetists have identified the need for support in evidence-based socket design to improve socket fit, and this remains part of the International Society for Prosthetics & Orthotics (ISPO) mission and ISPO 50 Charter [12].Conventionally this employs user feedback, though this is subjective and may be unreliable in people with vascular disease, whose tissues may be insensate.Technologists have worked towards offering feedback from limb-socket interface stress sensors [1], [13] or predicting pressure, based on socket strain [14] and biomechanical simulations, commonly Finite Element Analysis (FEA) [15], [16].Despite recognising the need for these technologies over two decades ago, and recommendations for their clinical adoption [17], [18] they have not yet reached common use and prosthetists still have the same request for technological support.
Socket design and fitting feedback technologies may face barriers to clinical adoption if they are not designed for users with conventional prosthetist-orthotist training, or if they add cost, complexity or inconvenience to the existing clinical pathway.For example, FEA is unlikely to be adopted if it requires expensive software licenses, a high-performance computer, expensive volume imaging (typically magnetic resonance imaging (MRI)), and a trained biomechanical engineer to build each patient's model [16].Furthermore technologies are unlikely to face a warm reception from the clinical community if they are proposed to replace the need for skill and experience, or place any barrier between the clinician and their patient.

Machine Learning
Recently researchers have proposed the use of Machine Learning (ML) to bridge the gap between hands-on socket design and complex software-supported alternatives.Machine Learning is a subset of techniques within Artificial Intelligence (AI), which involves the examination of datasets to find patterns.With 'supervision' to link these patterns to some known description or desired outcome, ML can be used for prediction or recommendation, and several applications have been considered for lower limb prosthetics.
Sewell et al [14] used artificial neural networks (ANN) to predict socket-limb interface pressures from noninvasive strain measurements in the socket.Here, ML is unobstructive to the patient and clinician and potentially provides informative data, but imposes a workload in training the ANN for each socket.Colombo et al [19] proposed conducting automatic rectification design using an ANN based on a residual limb 3D scan, the person's weight and desired activity level, and simple tissue 'tonicity'-deformation relations.The alternative approach considered by biomechanical modellers is optimisation, whereby the socket design is adjusted in order to meet an objective such as minimising limb-socket interface pressure, or soft tissue strain [20]- [22].Optimisation may be computationally expensive and require modelling knowledge, and ANNs remain limited by their large requirement for training data, which may not be available in prosthetics, and because they are often effectively black boxes for all except simple problems.
Instead, Expert Systems or Knowledge Based Systems are proposed to be suited to the prosthetic socket design problem, as they involve learning to mechanise tasks which humans already perform well.Li et al [23] proposed the Analytic Hierarchy Process decision approach to determine personalised socket design 'compensations' based on multiple prosthetists' experience-based recommendations, and the residual limb's characteristics.
Combining expert knowledge and physical measurements, Karamousadakis et al [24] used a fuzzy-logic Inference Engine (IE) to convert socket pressure and shear stress measurements and expert prosthetists' design rules into rectifications for a transfemoral socket design.Using more intuitive methods and incorporating expert knowledge in design might mean these concepts are closer to the objectives mentioned above, but it remains non-trivial to integrate them with current clinical workflows, requiring minimal additional modelling or sensor complexity and expense.

Understanding population and design variation in current prosthetics workflows
The idea of learning from CAD/CAM prosthetic design practice was proposed in the 1990s.Lemaire and Johnson [25] presented a method for quantifying and comparing manual rectifications in the commercial CADVIEW CAD/CAM environment, and proposed using these data for education, improving clinical efficiency and consistency, and ensuring CAD/CAM is informed by best-practice manual approaches.Torres-Moreno et al created a library of 27 reference shapes for transfemoral socket design in a CAD system, considering combinations of three brim sizes, lengths and profiles (skinny/sparse, average/moderate and fat/bulky), which could be modified interactively [26].Later, Lemaire et al [27] proposed using averaged modifications as a template for CAD/CAM rectifications, and demonstrated this approach produced sockets with equivalent function, comfort and overall satisfaction to manual methods.Recently Fatone et al have used a similar approach to produce templates for the transfemoral NW-FSIV socket [28].Templates are not in common clinical use for CAD/CAM below-knee prosthetic socket design, though some clinicians use itemised workflows.Improvements in 3D scanning technology and computational power and methods, as well as the increased collaborative work between data scientists and clinicians may now enable these early concepts to be enhanced.More formal population-based methods such as Principal Component Analysis (PCA), employed for statistical shape modelling (SSM) can be used to reduce the dimensionality of anatomic variation, allowing identification of the principal, independent 'modes' of variation between individuals in a dataset.Populationbased modelling approaches have extensive history in orthopaedics and musculoskeletal biomechanics, enabling machine learning to enhance the personalisation of models [29].Understanding the behaviour of interventions or medical devices in a representative population sample is compulsory in preclinical trials, and is practical, low risk and low cost in an in silico clinical trial, sometimes using virtual participants.This population-based approach addresses the range of possible outcomes and avoids the risk of using nearaverage patient models that do not adequately represent the full range of results across a population [30].This approach to capture variations in residual limb size and shape alone was used in supervised ML by Worsley et al [31] to automatically classify residual limb shapes by their profile, and by Steer et al [32] as a means of providing FEA predictions of limb-socket interface pressure in real time.

Motivation
We argue that it is inappropriate to fully automate the prosthetic socket design process, given the importance of clinical expertise to personalisation.However, we propose that there is benefit in pursuing evidence-based approaches to save time and iteration towards an acceptable socket for each person, learning from experts at each stage (Fig. 1).Whilst there are proven conventions in socket design, there is no consensus on the targets for limb-socket rectification sizes, or their spatial pattern.There is also no measure of the clinically observed variability in these parameters.PCA and image analysis methods may allow extraction of quantitative descriptions of the key trends in prosthetic socket design as well as residual limb shape, which might be used in supervised ML to propose initial template designs for a new fitting.

Objective
As a step towards enhancing prosthetic socket templates using expert clinician design data, this study set out to evaluate supervised machine learning methods trained on a population of residual limb 3D scans and their matched, clinician-produced prosthetic socket designs.This research investigated how populationbased models of the residual limb anatomic shape and the prosthetic socket design might be built, the key requirements for each, and whether separate shape and design models might provide higher resolution for machine learning than a combined shape and design model.The data was then inspected to characterise expert socket design following PTB and TSB approaches, and to identify any general trends in socket design for particular residual limb shapes.

Methodology Study Design, Approval and Raw Data
This study was approved by the University of Southampton's institutional ethics and research governance office (ERGO, ID 53279), as a retrospective audit of clinical design practice.Inclusion criteria were age of 18 years or above, and transtibial amputation.Sixty-seven participants were selected by random sampling from clinical service provision in the UK.The sample contained 20 females and 47 males, mean age 56.9 years (range 19.6-88.2years) and mean 4.5 years since amputation (range 0.14-30.2years).Participants had a range of activity levels (8 K1, 29 K2, 27 K3, 3 K4) and reasons for amputation (27 dysvascularity, 20 trauma, 11 infection, 5 neoplasia, 2 neurological, 2 unknown).55 had been fitted with a PTB socket, and 12 with a TSB, 40 to their left limb and 37 to their right.For each participant a pair of 3D surface mesh (.stl) files were provided, representing their residual limb scan and the corresponding mould shape for carving to produce a rectified socket.Researchers performing data processing were blinded to participant metadata.

Application: Template-Based Socket Design in Clinic
Smart Templates might reduce clinician workload in coarse design, and allow expertise sharing... ... freeing them to focus their time on higher valueadded limb assessment, template personalisation, etc. PCA for Statistical Shape and Design Models Scan pairs were processed using the ampscan open source shape analysis toolbox [33] as a development of a previously published method for non-paired data [34]:

Interpreting: Supervised Machine Learning for Smart Templates
• Right sided shapes were mirrored.
• The full set of socket shapes were aligned.A vertical superior-inferior translation was applied so that all shapes' patella tendon rectification was located at z=0, and the shapes' centroids at the patella tendon level were aligned in the medial-lateral and anterior-posterior axes (x=0, y=0).An internalexternal rotation was applied so that the posterior trimline lay parallel with the coronal plane.The sockets' abduction-adduction and flexion-extension were not changed from the CAD file.• Each limb shape was aligned with its corresponding socket.Shapes were aligned first by their centroids, then by automatic iterative-closest-point (ICP) surface matching.Where the limb and socket scan shapes deviated considerably, manual alignment adjustments were made and checked by two experienced observers (LED, ASD) to ensure prioritised medial-lateral, anterior-posterior and abduction-adduction alignment at the knee, flexion-extension and internal-external rotation alignment at the anterior tibia.Superior-inferior alignment referenced the anterior tibia and patella.• An HC Laplacian smoothing algorithm was applied to remove noise while preserving volume, and the socket shapes were cut at an approximated trimline.• A ~30,000 node mesh was registered onto each of the limb and socket meshes, to allow direct comparison in location of corresponding vertices.• A field of surface vertex normal deviations representing the rectification design was calculated between each limb-socket pair, and plotted according to an accessible colour map (Fig. 2) common to the prosthetics community [25].• A statistical limb shape model (SLM) using the limb scans as a training dataset was produced by principal component analysis (PCA) using the scikit-learn toolbox1 .The mesh files were each represented as a column vector: where  represents the number of nodes in the baseline mesh and ,  and  are the vertex coordinates.A vector describing the mean limb shape was calculated by: where  represents the number of limbs in the training dataset.PCA by mean-centred Singular Value Decomposition allowed each limb shape to be described by: where   are eigenvectors corresponding to the  Principal Components (PC) or 'modes' of the population's shape variation, and   is a vector of weighting coefficients associated with the eigenvectors to describe each shape's deviation from the mean.
• A statistical design model (SDM) was produced in the same way, but using a column vector containing the socket-limb rectification values  at each vertex: • Finally, a statistical limb shape and design model (SLDM) was produced in the same way, using a column vector of the limb shape and socket-limb rectification values: • The 95% range of population variation in limb shape was estimated by plotting synthetic shapes with weighting coefficients at   = ±2 either side of the mean for each mode in turn, where  represents the standard deviation of variation.Extremes of (non-parametric) socket design variation were plotted using the 2.5 th and 97.5 th percentile mode scores.Variations were interpreted by expert observers (DH, EP).

K-Means Cluster Analysis of Localised Rectifications
A second methodology was developed to semi-automatically identify particular rectification features using a custom image recognition and classification tool, trained to identify PT, FH, MP, LP and DT rectifications.This involved: • Segmentation: fields of rectification curvature, and combined rectification and curvature from the 67 training datasets (Fig. 3a) were mapped onto 224 x 224-pixel 2D images (Fig. 3b).K-means clustering was applied across all the images to generate up to 90 binarised pixel regions per image (Fig. 3c).• Feature Extraction: The shape of each region was quantified using Histogram of Oriented Gradients (HOG) to compute the edge detection gradient, followed by PCA to reduce the problem dimensionality, with the first 25 components retained (>95% of explained variance).In parallel, the location of each region was quantified by dividing the original region into a 7 x 7 grid, with the number of pixels for each region in each grid square calculated.Finally, the total pixel count was included.This resulted in a total of 75 features for each region which were then used for classification.• Classification: the features were fed into a second k-means clustering algorithm, which groups the regions generated from the image segmentation.To ensure all groups represented the same features, erroneous clustering was identified through comparison to the average of each cluster.Outliers were identified based upon pixel overlap with the average cluster.Any outlier regions were then moved to the cluster where they were closest to the average.The clustered groups were then visually inspected and related to rectifications of interest, for example, a group which contains the patella tendon bars across all input sockets (Fig. 3d).The classified cluster images were then mapped back onto the corresponding 3D shape (Fig. 3e).

Data Analysis
The validity of the three PCA models (limb shape model, socket design model, and combined model) was evaluated and compared.Compactness was assessed by finding the number of modes required to describe 95% of the training population's variance.Generality was assessed by Leave-One-Out (LOO) testing to identify the required training dataset size.Each training population shape was left out of the statistical model generation and then reconstructed using its weighting coefficients from the complete model, and its root mean squared error (RMSE) of reconstruction was calculated.A threshold RMSE of 1mm was defined, based on consistency measures of manual rectifications [35], plaster casting and 3D scanning in limb shape capture for socket design [36].
Gross and detailed shape and rectification measures were analysed for the training dataset.The limb lengths were measured from patella tendon to distal tip, and perimeters at the patella tendon and at half and threequarters of the length.Profile ratios were created between the half-and three-quarter perimeters and the patella tendon perimeter.The abduction-adduction angle was calculated by finding the principal axis of the mesh below the patella tendon.Volume and area reductions were calculated by comparing limb and socket shapes.Finally, the distributions of rectification sizes were extracted using the K-Means Clustering method.These measures were inspected for the whole training population and for the PTB and TSB socket groups.A Kolmogorov-Smirnov test was used to assess whether data were normally distributed.Differences between measures for the PTB and TSB groups were assessed for statistical significance using an unpaired Student's t-test (for parametric measures) and a Mann-Whitney U test (for non-parametric measures).Two-tailed tests were used for limb shape measures, where hypotheses assumed the populations were equal.One-tailed tests were used for rectification measures, where hypotheses assumed the PTB designs would have larger rectifications.

Results
Statistical models were built using PCA for the limb shape (SLM), socket design (SDM) and combined limb shape and socket design (SLDM).Plots of cumulative variance across each model's modes (Fig. 4a-c) show that 95% of the population variation was captured by 3, 19 and 4 modes for the limb shape, socket design and combined models, respectively.When randomly selected training datasets were reconstructed using different training population sizes (Fig. 4d-f), leave-one-out (LOO) testing revealed that around 40 training limb and/or socket shapes are required for shape reconstructions from the SLM and SLDM models to have less than 1.0 mm mean error.The same accuracy was achieved for the SDM using only 10 training socket shapes.
The SLM was able to discriminate between the main independent modes of limb shape variation (Fig. 5).
Variation presented as the limb's overall size (mode 1 containing 85% of population variation), with larger limb circumference and width corresponding with longer length; and the limb's soft tissue bulk (mode 2, 8.3% of variation).Mode 3 (2.5% of variation) described abduction-adduction angle at the knee.Mode 4 (1.1% of variation) represented calf muscle bulk, most apparent in the sagittal view, and mode 5 (0.6% of variation) contained the limb's bulbous-conical profiles in the sagittal and coronal planes.Mode 2 demonstrates that larger circumference limbs were more likely to be bulbous shaped and smaller circumference limbs a more cylindrical or conical, and Modes 4 and 5 indicate how the profile can also vary independent of limb size or soft tissue bulk.The SDM was able to discriminate between the main independent trends in prosthetic socket design variation (Fig. 6).The first mode (containing 35% of population variation) showed an apparent trend between the commonly grouped rectifications of the PTB and TSB socket design philosophies.At one extreme of Mode 1, PTB-dominant design features were observed with notable rectifications at the patella tendon bar, lateral and medial areas either side of the anterior tibial crest (all visible on the anterior view), and relief over the fibula head (visible on the lateral view).Posteriorly, nearly matching limb-socket fit was observed.At the other extreme of Mode 1, TSB-dominant design features were observed.The socket was a similar shape to the limb, with slight press-fit/interference around the limb periphery and few local rectifications except at the patella tendon bar, and substantial distal tip off-loading.The next three modes appeared to show these local socket rectifications in combination with various extents of the PTB-TSB grouped features.Mode 2 (25% of variation) presented variation between PTB and TSB designs but with the distal tip off-loading aligned with the PTB design.Mode 3 (8.5% of variation) showed the fibula head off-loading feature presenting more strongly in the TSB design, than in the PTB with which it is normally associated.Mode 4 (5.1% of variation) showed variation in the patella tendon bar rectifications.Finally, mode 5 (3.9% of variation) showed little variation in the pattern or magnitudes of rectification, but showed their locations varying in internal-external rotation.In summary, PCA performed upon socket rectification data did not generate an SDM which discriminated between individual rectifications, instead identifying variance in combined rectification groups.

(a) (b) (c) (d) (e) (f)
The SLDM (Fig. 7) showed very similar limb shapes and variance to the pure statistical limb shape model (Fig. 5), which dominated the modes.However, this model revealed trends in socket design which correspond with the shape variation.A more PTB-like design was observed for larger, longer limb shapes (mode 1), for more bulbous limb shapes (modes 2 and 5), and for limbs with less defined calf tissue (mode 4).More TSBlike sockets corresponded with limbs that were smaller (mode 1), more slender or cylindrical (modes 2 and 5) and with more defined calf tissue (mode 4).Mode 3 contained abduction-adduction angle variation at the knee, and showed little socket design variation except a slightly more marked fibula head buildup in abducted limbs.The main shape and design correspondences identified in the PCA statistical models are summarised in Table 1.The training population was observed to be normally-distributed in the generated limb shape and combined limb shape and socket design models, but the statistical socket design model was not normally distributed (Fig. A1).The K-Means Cluster analysis permitted statistical analysis of the training sockets' individual rectification sizes (Fig. 8).Against a human observer, the method classified rectifications with 97.3% accuracy overall, including 100% for PT and DE (Table 2).After correcting the few incorrectly classified rectifications, the method identified that all sockets had a rectification at the patella tendon.At least one paratibial rectification was identified all sockets except one from each group.Fibula head rectifications featured in 49/55 PTB sockets but only 6/12 TSB sockets.The limb shape and socket design distributions were extracted (Table 3).
No statistically significant limb shape measures were observed between the individuals who received PTB and TSB sockets (p>0.05).Inspecting the socket volume and cross-sectional area reduction measures, TSB sockets were smaller compared to the limb than PTB sockets, although this did not reach statistical significance (0.23≤p≤0.36).The local PT, MP and LP rectifications were normally distributed (Fig. 8a,c&d).
No difference was found between the PT rectification size for each group (p=0.40).The paratibial rectifications were larger for the PTB designs, but this was marginally insignificant for the lateral side (p=0.051).The fibula head and distal end rectifications (Fig. 8b&e) were skewed owing to many sockets with small or no rectification at these sites.Larger DE rectifications were seen for the TSB sockets, a compensation for their greater press-fit as the near-incompressible posterior soft tissues must be accommodated elsewhere.The difference between PTB and TSB groups was not significant (p=0.21).PTB sockets had significantly more pronounced FH rectifications than TSB sockets (p=0.03).

Discussion
This study applied supervised machine learning methods to evaluate trends in the shape of residual limbs and corresponding expert-designed prosthetic sockets.It investigated how population-based models might be built, and whether separate shape and design models might provide higher resolution for machine learning than a combined shape and design model.Global limb shape trends were captured and separated clearly using principal component analysis of surface shape.The same method distinguished the main overall trends in prosthetic socket design (i.e.PTB and TSB), but it was less successful in separating the variations in discrete local rectifications.For this purpose a K-Means Clustering model was trained to identify specific rectifications so that they could be compared quantitatively.Correspondences in anatomy and socket design variation were inspected to identify whether there were trends in the socket design approach for particular residual limb shapes in the training dataset.

Observations:
The Statistical Limb Model (Fig. 5) showed detailed distinction between different shape profiles, with different modes capturing independent variations in gross tissue bulk (Mode 2) and the conical-cylindrical-bulbous profile in sagittal (Mode 4) and coronal (Mode 5) planes.The modes showing coronal plane bulbousness varying to a cylindrical profile (Mode 2, and particularly Mode 5 which shows medial and lateral 'ears') might indicate short-term swelling and oedema which subsides in the months following surgery, whereas the bulbous to conical shape variance seen in the sagittal plane (Mode 4) might be associated more with activity level and atrophic effects.These theories were tested in a secondary analysis of correlation between the SLM mode scores and time-since-amputation (Table A1).No correlation was seen for Modes 1, 3 and 4 (r<0.1,p>0.4) but weak correlations were observed for the bulbousness-shape Modes 2 and 5 (r=0.23 and 0.28, respectively), which reached significance for Mode 5 (p=0.065 and 0.026, respectively).
The socket design model's modes did not clearly distinguish between separate local rectifications (Fig. 6).The first mode clearly showed the established trends in PTB and TSB socket designs, in fine detail.For example, a difference can be seen in the straight patella tendon 'bar' rectification in the PTB design, compared to the TSB's more curved, anatomy-following modification at this site (compare to Fig. 2).[6] However, subsequent SDM modes contained variation in local rectifications combined with these overall design variation trends, so this method did not allow direct assessment of individual rectification sizes and shapes.The SLDM however showed some general trends between limb shape and socket design which are consistent with clinical practice.Clinical, functional and user preference for TSB and PTB sockets is complex, and highly influenced by the liners and accessories they are worn with, [37], [38] though there is some evidence to support the choice of socket when considering residuum shape and tissue composition.TSB sockets are reported to be preferred for "stumps without oedema and pain", which are more common in early rehabilitation.[39] PTB sockets are used for earlier rehabilitation where the strategic proximal loading and distal offloading protects the vulnerable soft tissue reconstruction.[40] TSB sockets are preferred for individuals with mature residual limbs of stable volume, without excessive soft tissue, and which are not excessively long, [41] although they may be more difficult to fit to highly conical shaped limbs.[6] Bulbous limbs are understood to require PTB sockets, as it would be difficult to don a TSB socket over a bulbous distal shape and achieve the desired uniform load transfer.These clinical use principles are consistent with the correlations observed in this study's SLDM, where socket designs had more PTB-like features in longer, larger, more bulbous limb shapes (Fig. 7).
More detailed analysis of personalised local rectifications was possible using the K-Means Clustering approach.Inspection of rectifications across the training population revealed that many of the same rectification features were used for both PTB and TSB socket designs.No differences in patellar tendon or distal tip rectifications were observed, though PTB sockets had larger paratibial and fibular head rectifications.TSB sockets were more tightly fitted to the limb than PTB sockets (-3.1% vs. -1.6%by volume, on average).
Only the FH rectification differences reached statistical significance, and the clinical significance of these fine variations in socket design are unknown.However, it is noteworthy that this method showed how expert prosthetists produce sockets across a continuum of design, instead of in discrete groups as the PTB and TSB approaches were originally presented.Prosthetic socket design may have evolved to employ the most biomechanically useful features of PTB and TSB approaches, tailored to individual patients.The present study shows how design is tailored to general limb shape trends (Fig. 7), and further work is required to understand how detailed design is tailored to individuals.

Limitations
Statistical shape models are, at best, as limited as the data used to create them.It is risky to extrapolate their use outside the training population.This model will not necessarily describe other populations, from different ecogeographic groupings or ethnicities, with their respective effects on physical characteristics, form of injury or disease, and surgical approach.For example, amputations may be performed at different heights and with different soft tissue reconstructions depending on the reason for amputation (e.g.landmine trauma vs. road accident trauma vs. vascular disease), and there will be between-group differences in bony anatomy and soft tissue composition.Furthermore the socket population was biased towards PTB designs, with only 12 TSB sockets in the training dataset.The present method would be strengthened with more training data, but the training population was deemed acceptable for the present study as it was randomly sampled, and the TSB concept relatively closely matches the limb shape, so it might be described adequately with fewer models than the more variable PTB concept.Ultimately the socket design model was verified to within 1mm with only 10 socket shapes.
A further study limitation in scope is retrospective assessment of limb shape and socket design only, without a direct consideration of the residuum's bony anatomy, soft tissue wounds or underlying pathology which might influence socket design, such as bone spurs, heterotopic ossification, neuromata, bursae, adhered scars.In CAD/CAM clinical practice these are identified in limb assessment prior to socket design but not necessarily tracked in the CAD record.There have been proposals for how bony anatomy might be predicted from limb surface topology, using surface curvature [42] or an ANN [43].However, the soft tissue pathological phenomena mentioned above would probably not be identifiable, so the use of any such data to inform new socket design would rely on template adaptation to the individual by a prosthetist, part of their value-added work.

Implications and use
As described earlier, the authors argue that it is inappropriate to try to fully automate the prosthetic socket design process.Instead this project builds upon proposals made early in CAD/CAM prosthetics [25], [27], to learn from past experience for smart templating.With quantitative descriptions of the key trends in residual limb shape, a person's limb can be compared to a population dataset, and similar prior socket designs could be looked up.Supervised ML will allow trends in socket design to be scored by appropriate clinical outcome measures of comfort or function, providing templates which can be integrated in current CAD/CAM workflows.
This process requires expert human input throughout, from development to clinical use, to provide the key value of patient-centred design (Fig. 1).According to the Pareto 80:20 principle [44] this expert-led proposal could protect the prosthetists' time to provide their skill where it is most valuable, in adapting the template to their patient.As such, the presented methods could support evidence-based approaches to save time and iteration towards an acceptable socket, and sharing best practice with colleagues and trainees.Ahead of such templates, this study provides quantitative measures of clinically-used socket rectifications and pressfit (Table 3), reveals a design continuum between more PTB-like and more TSB-like sockets, and demonstrates how prosthetists select these features for different limb shapes (Fig. 7).
Beyond direct clinical application, characterisation of residual limb size and shape variability is useful to ensure that biomechanical analysis models are representative of a broad population of prosthesis users.
Without access to such data, Silver-Thorn [45], [46] developed a generic FEA model of the transtibial amputated limb that was resized for the individual to estimate interface stresses with various socket designs, but used standard geometric shapes rather than accurate geometries, and did not account for limb shape variations.The same shape PCA method presented here has been used with finite element mesh morphing to produce an FE limb model scaled from an MRI scan onto a population of surface scans, enabling far more general FE predictions than a single model allows [32].Where many FE studies have used single-or highly simplified, volume-scaled socket designs, [16] the presented shape analysis method and quantitative rectification data (Table 3) would enable modellers to work with more clinically representative sockets.

Conclusions:
This study provides methods for population-based socket design analysis which will support developments in CAD/CAM clinical practice and accuracy of biomechanics research.These methods may help to reduce clinic time and iterations required to fit a comfortable socket.Bearing in mind the mentioned limitations, we advise care in interpreting and using the present study's findings.These design trends are observations from a single group of patients and clinicians, and they do not imply any causal link between design and outcome.
As such the present study's results do not represent recommendations for clinical practice and will not apply to all patients and clinical situations.The proposal of any socket design guideline or template should be validated in a blinded, controlled clinical study comparing from-template and from-scratch sockets.The authors reiterate our position that prosthetic socket design should not be fully automated, but that the process may be improved using smart socket templates, fitted by a highly trained prosthetist. Appendix:

Figure 1 .
Figure 1.Proposed process overview for developing and using smart templates as part of expert-informed, evidence-based socket design.Instead of automating design at the expense of clinicians, the proposal includes the experts in each stage of development and clinical use.
Identify trends in limb shape, socket design and measures of outcome Experts provide interpretation to identify the meaning of these trends, and how to apply them Learning: Socket Design Data Foundation Digital record of clinical design and outcome history from groups, or a single clinician's practice Experts provide consensus upon the key factors in design for limb-socket interaction

Figure 3 .
Figure 3. K-Means Clustering Method for identifying and measuring local rectifications.The socket curvature and rectification maps are taken as inputs (a) and mapped onto 244 x 244 pixel 2D arrays (b).K-means clustering is used to identify regions of pixels representing design features (c).These are clustered, and desired features are classified using their shape and location, labelled (d), and finally mapped back onto the 3D socket shape (e).

Figure 5 .
Figure 5. First five mode variations for the Statistical Shape Model (SSM), showing ±2 standard deviation shapes either side of the mean.Shape variation observations (Obs) are labelled.

Figure 6 .
Figure 6.First five mode variations for the Statistical Design Model (SDM), showing the 2.5 th and 97.5 th percentile shapes.Rectification map units: mm.Design variation Observations are labelled.

Figure 7 .
Figure 7. First five mode variations for the Statistical Limb Shape and Socket Design Model (SLDM), showing mean ±2 standard deviation shapes.Rectification map units: mm.

Figure 8 .
Figure 8. Histograms of local rectification sizes across the training population for (a) patella tendon, (b) fibula head, (c) medial and (d) lateral paratibial, and (e) distal end design features as mapped on the (f) 3D socket shape.-ve denotes buildup, +ve denotes carve.

Figure A1 .
Figure A1.Histograms of training dataset mode scores for the SLM, SDM and SLDM.Greatest deviation from normal distributions is observed for the statistical design model.

Table 3 . Training dataset shape and socket design measures.
1 Profile ratio of 1 is cylindrical, below 1 is conical, above 1 is bulbous.* indicates a statistically significant difference between PTB and TSB groups at the p<0.05 level.