Personal project, 2026
MRI to 3D model: my own knee
A Python tool that reads a knee MRI, segments the bones with TotalSegmentator (a deep-learning model) and turns each bone into a smooth, closed surface I can view, print or publish.
- Read the DICOM series, keeping the scanner's orientation
- Segment the femur, tibia, patella and fibula
- Smooth across the 3 mm slices and resample to 0.5 mm
- Build closed surfaces with marching cubes and Taubin smoothing
- Export STL for printing and a small GLB for the web
- The scan
- T1 sagittal MRI: 27 slices 3 mm apart, with 0.42 mm pixels. Thick slices leave steps, so the meshing smooths and resamples across them.
- The fix that mattered
- The first version produced noise. It dropped the scan's orientation, so the model saw the knee sideways. Keeping the real geometry fixed it.
Tools: Python, TotalSegmentator, SimpleITK, scikit-image, trimesh, napari

