- Python
- C++
- Unreal Engine 5
- Docker
- Visualization
Task
At the start of the project there was a feature-rich prototype, but it would only run on the developer’s machine. Its main issues were a ≥ 20% failure rate of the SimNIBS simulations, which was not reproducible and rose to 100% after the project hand-over, incorrect Jet color mapping, hard-coded system paths, calculations that had to be triggered manually and virtually no documentation.
The core task was to systematically analyze these weaknesses and create a resilient, portable overall system. Seven functional goals were defined for this purpose: (1) locate sources of error and drive the success rate toward 100%, (2) remove absolute paths and introduce containerization, (3) correct the color representation, (4) integrate new visualization means—especially histograms, (5) start simulations directly from the front end, (6) optimize runtimes and (7) provide comprehensive developer and user documentation.
In addition, non-functional requirements such as parallelization, clean logging, maintainability and scalability had to be met. The overarching goal was to lay a reliable foundation for further research and possible clinical use.
Approach
Backend & Simulation:
Extensive refactoring replaced hard-coded Windows paths with pathlib and moved constants to config.ini.
Docker images with a defined Conda environment now ensure reproducible builds and parallel container runs.
Mesh operations were migrated from external Gmsh processes to the high-performance Python API, including removal of self-intersecting surfaces and automatic ROI checks via Delaunay triangulation.
The unstable PETSc iterative solver was replaced by the MKL-PARDISO direct solver; together with the mesh improvements this increased the success rate to ~94%.
Front end (Unreal Engine 5):
A new server-management screen allows entry of arbitrary IP/port combinations and live-checks the accessibility of the REST back end.
A Run button starts simulations directly from the configuration view, and pressing Esc navigates users back to the main menu at any time.
The Jet colormap was replaced with Plasma and grayscale LUTs; incorrectly scaled barycentric weights were fixed, and a Python-based histogram dialog complements data exploration.
Documentation & Dev-Ops:
Sphinx docs for the Python back end and Doxygen for the C++ classes generate searchable HTML references; detailed README guides make it easy to get started.
A centralized logging set-up writes runtime and error messages to log files in chronological order, simplifying debugging and maintenance.
Gallery





