NA-MIC Project WeeksCreating a volumetric mesh is essential for FEM simulation. However, meshing for orbital tissue with fracture is challenging due to multiple thin structures confined in a bony orbit, low CT contrast, and presence of trauma. To ease the process, we prepared a unified multi-material mesh for orbital tissue to avoid dealing with tissue boundaries. We are currently training a preliminary model using MONAI-nnUNet for orbital tissue segmentation using 13 specimens, each of which augmented to 5 additional volumns using TorchIO. We then created a unified orbital tissue segmentation, converted to a surface model, and created a tetrahedral mesh using gmsh. Sub-tissue regions were then selected in SOFA using specific tisssue surface models. Overall, though much easier than creating multiple tissue meshes, this step still requires many manual steps, including segmentation refinement and surface model downsampling and uniform remeshing, in Slicer and gmsh. Furthermore, due to the coarseness of interior tetrahedra, the selected tetrahedra could not accurately reflect internal tissue geometry, creating errors in tissue geometry tracking in simulation. Mesh refinement was used to create finer elements at interior tissue surface but it led to a over-detailed mesh with too many elements.
Using claude slicer-skill https://github.com/pieper/slicer-skill to create a prompt to streamline a segmentation to meshing workflow. Overall it took me five hours.
Initially, I tried to teach it step-by-step. Giving sample outcomes from my own manual preprocessing as ground truth helped.
Steps:
https://github.com/user-attachments/assets/233a780e-c723-4821-a830-ee283b6d458a
In the end, it produced a prompt and a script for segmentation and Surface Toolbox effects for reusing.
I also had to constantly monitor the “thinking” process in case Claude did extra unncessary steps:
Segmentation using a preliminary nnUNet model trained via MONAI
Create a combined uniform tissue segmentation and convert into a surface model
Convert into a tetrahedral mesh (15k nodes in this case)
Assign different material properties in SOFA using surface models: globe, muscles, optic nerve, and orbital fat
Further refinement by creating finer elements near tissue surfaces
No response
No response