Python library to analyze how the shape of the stump evolves, from the cast to the finished socket, based on the three-dimensional digitization of the surfaces.
Project description
SocketFactory
SocketFactory is a Python library to analyze how the shape of the stump evolves, from the cast to the finished socket, based on the three-dimensional digitization of the surfaces. The software uses algorithms and computational geometry tools in order to support data processing processes. The implemented functionalities will also help understanding the errors inherent in the production of tailored orthopedic devices, including the propagation of error during the process chain. The developed library provides a set of interfaces that allows access to non-expert users and is characterized by modularity and extensibility of features.
The data processing flow was developed in the following phases:
- Acquisition and pre-processing of data;
- Digital identification of anatomical landmark;
- Alignment of surfaces in a global reference system according to a common logic, using methods defined both for patients with transtibial and transfemoral amputation;
- Spatial registration of two surfaces to align them with each other;
- Generation of outcomes and dimensional parameters, including distance maps, cross-sections, geodesic paths and regions of interest;
- Extraction of summary statistical indicators of differences related to a series of scans using PCA.
Functionalities
The provided interfaces allow to perform various features:
- Mesh decimation;
- Landmark selection;
- Alignment of the scan according to a chosen method;
- Registration of two meshes using different algorithms which the user can select from a predefined list;
- Creation of 3D color quality mapper given two meshes and the related distance metric;
- Computation of cross-sections and related dimensional parameters;
- Generation of the geodesic path between two mesh points, calculation of length and extraction of points coordinates at certain percentages of path;
- Extraction of Region Of Interest (ROI) and analysis of the quality parameters associated with it;
- Application of the same color scale to N meshes for inter-map comparison;
- Generation of the .pts file required by the morphing software, given two meshes;
- PCA application to a set of meshes;
- Differential PCA application to a set of differences between two mesh groups.
SocketFactory relies on different libraries:
- NumPy and SciPy to perform mathematical operations;
- Pandas, OpenPyXL and Plyfile to manage different data formats;
- PyMeshLab to process data with MeshLab filters;
- VTK and PyVista to process, visualize and analyze data;
- NetworkX and Networkx-query to create and query graphs;
- AmpScan to perform Sanders registration;
- Scikit-learn to perform PCA;
- PyQt to create interfaces.
Installing SocketFactory
SocketFactory uses Python 3.8.
SocketFactory can be installed via pip from PyPI.
pip install SocketFactory
Running applications
Run in Python console:
from SocketFactory import filename
filename.launch()
Replace filename with the file name of related functionality.
Filename list:
- decimation_main
- landmark_main
- alignment_main
- registration_main
- quality_mapper_main
- slices_main
- geodesic_path_main
- roi_main
- analysis_mesh_main
- pts_file_generation_main
- pca_main
- differential_pca_main
Author
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for SocketFactory-1.0.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7258142d55a3a0da99bd2ef8943d4ee6f682a905f5077863c9e2c45f37d82d31 |
|
MD5 | 67ad064561f86be9fb6a6a497a539581 |
|
BLAKE2b-256 | 845ae76ffaf5ae5528cb597ff5b5546b67c188d61c7a1149059a6694b977d263 |