Edit this page

NA-MIC Project Weeks

Back to Projects List

Slicer-SOFA integration

Key Investigators

Presenter location: In-person

Project Description

SOFA is an open source framework targeted at interactive biomechanical simulation, with an emphasis on medical simulation and robotics. Relying on a C++ implementation, SOFA offers efficient algorithms and methods to solve continuum mechanics problems. Its interactive capability makes it a great tool for off- and on-line medical applications. The SOFA core has a LGPL license, which is permissive and non-contaminating.

Relying on the Finite Element Methods (FEM), SOFA requires a mesh (space discretization) of the simulated objects as input. Eventhough SOFA offers several numerical strategies to reach the best performances possible (preconditionning, multithreading, etc…), this mesh has a direct impact on the simulation stability and performance. This is usually overcome through a long process of mesh refinement and simulation testing to reach computation time suitable for interactive simulation of deformable bodies.

Integrating SOFA to Slicer may ease this process and offer a fully integrated pipeline bridging medical imaging, processing and patient-specific simulation. This integration may be of great interest for the Slicer community to help design and bootstrap finite element simulations.

Objective

  1. Define correctly the integration’s limits. What is desirable and at which point it is meaningless and the user should then switch to SOFA itself + a roadmap for the complete integration.
  2. Define through what means the integration will be done : Python bindings / C++.
  3. Enable the sharing of data structures to be able to use the meshs without the need of multiple copies.
  4. Define the prefabs needed to automatically create a sofa scene without the need of fine tuning directly the scene with the current meshes.
  5. Integrate the SOFA scene graph in read/write to be able to interact with sofa objects.
  6. Add a way to define bounding boxes for sofa or manually specify indices for boundary conditions.

Approach and Plan

  1. Discuss with Slicer devs and users that also use SOFA to gather the needs. Defines the actual steps to reach the desired integration and distribute them among the projet members (it may take more time than the actual project week).
  2. Define a simple POC with few features that is doable during the remaining days of the week to start working on it directly.

Progress and Next Steps

  1. We have discussed different architectures for the integration (Superbuild Extension, ROS2 and Client/Server through OpenIGTLink). We decided to implement the third alternative.
  2. A SOFA-OpenIGTLink extension was created to support sending simulation updates to 3D Slicer
  3. A Slicer-SOFA extension was created to automate the scene loading and creation of the communication channel with SOFA

While the progress can still be considered more a demo than a generic infrastructure, we have established the first steps towards making Slicer-SOFA an extension that will allow to define, run and analyze simulation using SOFA.

Illustrations

liver2

LiverRendered

ImagingUSScene_IRCAD_00000005

Background and References

SOFA 2012 paper: https:/hal.inria.fr/hal-00681539 GitHub: https://github.com/sofa-framework/sofa/ API doc: https://www.sofa-framework.org/api