SkillAgentSearch skills...

BabelBrain

Application of modeling of transcranial ultrasound for neuromodulation applications

Install / Use

/learn @ProteusMRIgHIFU/BabelBrain
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

BabelBrain v0.8.1

Samuel Pichardo, Ph.D
Associate Professor
Radiology and Clinical Neurosciences, Hotchkiss Brain Institute
Cumming School of Medicine,
University of Calgary
samuel.pichardo@ucalgary.ca
www.neurofus.ca

License: BSD-3 Documentation

GUI application for the modeling of transcranial ultrasound for neuromodulation applications <img src="figures/intro.png">

<img src="figures/Target-demo.png">

BabelBrain is a frontend application for research purposes only in the study of applications of transcranial focused ultrasound. BabelBrain calculates the transmitted acoustic field in the brain tissue, considering the distortion effects caused by the skull barrier. BabelBrain also calculates the thermal effects of a given ultrasound regime, which is regulated mainly by the total duration of ultrasound exposure, the duty cycle of ultrasound use, and the peak acoustic intensity,

BabelBrain is designed to work in tandem with neuronavigation and/or visualization software (such as Rogue Research's Brainsight or 3DSlicer). This tool combines image processing to prepare domains for ultrasound simulation and uses <a href="https://github.com/ProteusMRIgHIFU/BabelViscoFDTD" target="_blank">BabelViscoFDTD</a> extensively for transcranial modeling calculations. BabelViscoFDTD is a finite-difference time-difference solver of isotropic viscoelastic equation, which was implemented to support multiple GPU backends (Metal, OpenCL and CUDA). Predictions of BabelViscoFDTD have been validated experimentally (<a href="https://pubmed.ncbi.nlm.nih.gov/28783716/" target="_blank">Pichardo et al., 2017</a>) and cross-validated with other numerical tools for ultrasound propagation (<a href="https://asa.scitation.org/doi/10.1121/10.0013426" target="_blank">Aubry et al., 2022</a>). BabelBrain supports multiple GPU backends (Metal, OpenCL and CUDA) and works in all major operating systems, with an emphasis on Apple ARM64-based systems, which are very common in brain imaging research.

Citation

If you find BabelBrain useful for your research, please consider adding a citation to:
Pichardo S. BabelBrain: An Open-Source Application for Prospective Modeling of Transcranial Focused Ultrasound for Neuromodulation Applications.
IEEE Trans Ultrason Ferroelectr Freq Control. 2023 Jul;70(7):587-599.
doi: <a href="https://doi.org/10.1109/TUFFC.2023.3274046" target="_blank">10.1109/TUFFC.2023.3274046</a>. Epub 2023 Jun 29. PMID: 37155375.

Disclaimer

This software is provided "as is" and it is intended exclusively for research purposes.

Hardware requirements

  • A decent GPU (AMD, Nvidia or Apple Silicon). For AMD and Nvidia GPUs, 8 GB or more is recommended. For Apple Silicon (M1, M2, and M3 series), 16 GB RAM or more is recommended. Intel-based Mac systems need a dedicated AMD GPU (internal or external). Intel-based iMac Pro and MacPro systems have internal GPUs suitable for sub 650 kHz simulations (i.e., Vega 56, Vega 64). An external GPU (i.e., AMD W6800 Pro) offers excellent performance and capability for high-frequency simulations.
  • 16 GB RAM or more for main CPU memory for Intel-based systems.

Standalone application

Ready-to-use applications (no need for Python installation) for macOS and Windows are available in the Releases section.

  • For macOS, download the correct DMG image according to your CPU architecture (Intel X64 or ARM64), and double-click the PKG installer. The first time you use you will be prompted to authorize to run and access directories.
  • For Windows, download the MSI file and run the installer.

Note for Windows: CUDA 11.7 or up must be installed. Visual Studio (commercial or Community version) must be also installed. Verify the version of Visual Studio is officially supported with the CUDA version. Visual Studio 2019 and 2022 Community versions works well with recent versions of CUDA. Please ensure Visual Studio has the 'Desktop development with C++' option installed.

Instructions for use

Please consult the online manual for details on instructions for use.

Manual Installation for Development

Recommended settings

  • All OS: create a conda environment using the appropriate yaml file for macOS Intel, macOS ARM64, Windows or Linux.

Besides the recommended conda environment, a healthy XCode installation in macOS, or CUDA (up to v11.8) + Visual Studio/gcc in Windows/Linux will be required. Consult BabelViscoFDTD for details on what is needed for the FDTD solvers

Running

If running from the GitHub source code, just change to the BabelBrain directory and execute

python BabelBrain.pyBuilding a standalone application A Pyinstaller specification file is ready for use. To build either the macOS or Windows application, just change to the BabelBrain directory and run

pyinstaller BabelBrain.spec --noconfirm

A new application ready to use will be created at BabelBrain/BabelBrain/dist/

Version log

  • 0.8.1 - Jan 8th, 2026

    • Fix: Small correction for very rare cases where the existing mesh correction does not yield closed volumes in Step 1. This was spotted in a particular case using the Ernie dataset from SimNIBS.
  • 0.8.0 - Jan 6th, 2026

    • New: PlanTUS integration. Experimental feature to integrate the excellent tool PlanTUS developed by Maximilian Lueckel, Suhas Vijayakumar and Til Ole Bergmann from Mainz University. (documentation).

      <img src="figures/PlanTUS-1.png" height=250px>

      Please note that this feature is for the time being only available for macOS and Linux - future release will make it available for Windows.

    • New: Procedure to calibrate individual ring-type transducer (documentation).

      <img src="figures/Plots-AcProfiles-01.png" height=300px>
    • New: Dome-type transducer support. A 1024-element large hemispherical device (diameter= 30 cm)is now supported for 220 kHz and 670 kHz. Please consider using a GPU system with a lot of memory (>=32 GB) for 670 kHz simulation.

      <img src="figures/DomeTx.png" height=250px>
    • New: Air region masks. If using CT/ZTE/PETRA scans as inputs, this feature enables calculating reflection from these regions, which is useful for deep locations or nearby air-filled regions. Feature accessible in the Advanced options dialog.

      <img src="figures/Air-regions.png" height=150px>
    • New: Brain tissue types support in simulations. Feature accessible in the Advanced options dialog.

      <img src="figures/advanced-4.png" height=150px>
    • New: Density maps added as new type of bone imaging input.

    • New: Transducer - H301. This transducer has 128 elements, focal length of 150 mm, diameter of 150 mm, and operates at frequency of 1100 kHz.

    • New: Transducer - IGT64_500. This transducer has 64 elements, focal length of 75 mm, diameter of 65 mm, and operates at frequency of 500 kHz.

    • New: Transducer - R15287. This transducer has 10 ring elements, focal length of 75 mm, diameter of 65 mm, and operates at frequency of 300 kHz.

    • New: Transducer - R15646. This transducer has 64 elements, focal length of 65 mm, diameter of 65.95 mm, and operates at frequency of 650 kHz.

    • New: Transducer - DPXPC_300. This transducer has 4 ring elements, focal length of 150 mm, diameter of 65 mm, and operates at frequency of 300 kHz.

    • New: Support to grouped sonications for more complex thermal modeling scenarios. For example

      BaseIsppa: 5.0 # W/cm2
      AllDC_PRF_Duration: #All combinations of timing that will be considered
          -   DC: 0.5
              PRF: 10.0
              Duration: 0.03
              DurationOff: 0.67
              Repetitions: 254
              NumberGroupedSonications: 4
              PauseBetweenGroupedSonications: 360.0
      
      <img src="figures/ExtendedGroupedSon.png" height=250px>
    • Improvement: Unit testing improved and regression-type analysis added to Pytest settings.

    • Improvement: OpenCL devices and platforms scan extended. This allows to select CPU if OpenCL drivers are installed.

    • Improvement: Replacement of pycork CSG library for much more improved trimesh library.

    • Improvement: 9 PPW is selected by default for simulations with frequency lower than 300 kHz

    • Fix: Tx positioning in regions far from ROI pushed the Tx back. In some conditions, the Tx placement was put back off from the scalp if the scalp regions outside the field of view appear before.

    • Fix: Far off distance of simulation domain was slightly cut out (e.g, 36 mm instead of 40 mm).

    • Fix: Calculate mechanical adjustments for multifocal simulations.

    • Fix: Maximum temperature calculation in Skull was wrong when using CT/ZTE/PETRA.

    • Fix: Improve NIfTI saving with enforced isotropic spacing. In some weird cases, it was not enforcing isotropic conditions as it was supposed to do.

    • Fix: Support for new 3DSlicer transform matrix convention.

    • Fix: Some cases were still leaving a small layer of scalp tissue as brain.

    • Known issues: Voxelization task in Step 1 switched to CPU when having an OpenCL GPU, making this step a little slower.

  • 0.4.3 - Feb 21st, 2025

    • Fix: Export CSV for REMOPD and Single transducer was trying to export a wrong parameter.
  • 0.4.2 - Jan 26th, 2025

    • New: New transducer: R15148. This transducer has 128 elements, focal length of 80 mm, diameter of 103 mm, and operat
View on GitHub
GitHub Stars35
CategoryDevelopment
Updated3d ago
Forks15

Languages

Python

Security Score

90/100

Audited on Apr 3, 2026

No findings