Skip to main content

A Python package designed to estimate the temperature increase due to high intensity focused ultrasound (HIFU) excitation

Project description

TEMP4HIFU

Author: Gerald Lee

Final Project, BIOEN 537: Computational System Biology. University of Washington, Seattle

A Python package designed to estimate the temperature increase due to high intensity focused ultrasound (HIFU) excitation.

CURRENT ACTIVE VERSION = 0.2.2

LAST UPDATED: 12/05/2024

BACKGROUND

High Intensity Focused Ultrasound (HIFU) and Focused Ultrasound (FUS) are used for thermal treatment of cells such as for cancer treatment. The generated increase of temperature during HIFU thermal treatment must be within safety guidelines for human use (44 degrees Celsius), which is essential for FDA approval and compliance. Accurate predictions of temperature bioeffects must be demonstrated through computational simulations before applications ex vivo and in vivo. Computational simulations requires modeling for both HIFU/FUS pressure fields and then the Bioheat equation; not complicated individually, but when combined can be tricky to navigate based on initial conditions.

Provided here is a tool to estimate bioheat from HIFU, usable as a GUI or importable as functions for integration with other code. The GUI provides an entry-friendly visualization of many aspects of bioheat due to HIFU. In this package, the heat input generated by HIFU is governed by the pressure output by the ultrasound transducer defined in the cylindrical space. The bioheat model solution is governed by a Forward Time Centered Space (FTCS) finite element model. The given assumptions are that the system is axissymetric and linear in nature, and the bioheat equation does not consider blood perfusion and assumes heat propagates instantaneously.

INSTALLATION AND USE

PRE-REQUISITES

In addition to the temp4hifu Python package, ensure you have the following additional Python packages installed into your machine:

  1. numpy
  2. pandas
  3. dash

You may choose to pip install these packages separately, or as one line as follows:

pip install numpy pandas dash temp4hifu

USING GUI

In Terminal, type:

python -m temp4hifu.startApp

Then follow the server link to view the application. NOTE: To kill the app in terminal, CTRL+C

An alternate set of lines to run:

from temp4hifu.startApp import app

app.run(debug=True)

USING INDIVIDUAL FUNCTIONS

You may choose to use one or more of the following modules, imported as follows:

from temp4hifu import setParam, calculateBioheat, calculateRayleighIntegral

setParam.setMedium(INPUT_ARG)

calculateRayleighIntegral.generateField(INPUT_ARG)

calculateBioheat.generateVector(INPUT_ARG)

GUI COMPONENTS AND FUNCTION NOTES

The GUI is able to sustain the following actions:

  1. Graph a 2D Pressure Field in cylindrical coordinate space of given transducer and medium properties.
  2. Display the 2D graph as a pressure or an intensity based on a given initial pressure.
  3. Graph a 1D Temperature Vector over Time for a given transducer, medium, heating scheme, and FTCS model.
  4. Load premade .csv or .txt files for graphing and computation of the above.
  5. Calls on the three other module functions as listed below:

The function setParam.setMedium provides a small list of propagation media to select from as a preset, as well as provides custom input as needed. The export is either a preset dictionary of the properties for Water, Glycerol, Egg White, or Castor Oil, or a custom dictionary of values of the user's choosing.

The function calculateRayleighIntegral.generateField allows the calculation of a pressure field using the Rayleigh Integral in cylindrical coordinate (Z,R) space, and outputs a 2D list of pressure values, a 1D list of Z-axis values, and a 1D list of R-axis values.

Using the outputs from the first function, the function calculateBioheat.generateVector allows for the calculation the temperature based on a heating and cooling scheme for at a specific point in the (Z,R) space, and outputs a 1D list of temperature values and a 1D list of time values. Optionally, this function also exports the 2D list of heat Q, calculated based on the intensity from the pressure field and the parameters given previously. Please note that an overflow error may appear in the terminal during the heating component. Unless an error is thrown, please ignore this warning. It will not affect the output calculation.

Author's Notes

This package was intended to include addtional components such as different models to calculate pressure (the KZK and Westervelt equations) in the nonlinear space. Accompanying this, there are more complicated bioheat models that would better represent the temperature propagating through the human body. Due to the limited scope of the project, the package was designed for linear use only.

RESOURCES

Github Link [https://github.com/C2H5OH-Consumer/temp4hifu]

Contains Sample Scripts using Juypter Notebooks:

sampleScript_loadFunctions.ipynb

sampleScript_loadGUI.ipynb

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

temp4hifu-0.2.2.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

temp4hifu-0.2.2-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file temp4hifu-0.2.2.tar.gz.

File metadata

  • Download URL: temp4hifu-0.2.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for temp4hifu-0.2.2.tar.gz
Algorithm Hash digest
SHA256 4ed3f674ac4a7051a36830c2014689956e0f501fc37a8917c30bc8765104a351
MD5 62631ac18b82da64ce3a2d4310c445f5
BLAKE2b-256 195553823852b9949080a73815ec2b12e1571987c9524149c4e8955b9f8e7bde

See more details on using hashes here.

File details

Details for the file temp4hifu-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: temp4hifu-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for temp4hifu-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f2d2988a9af8bf73cec96e83776d8054f100092f9c19db31dd7b174fca72f0ca
MD5 57ff9424783d491dc2e30a7913bbb081
BLAKE2b-256 906871c8a0599a72b58e7e8ebce2a477f44c9ebcbd65b8c8da42f080108d7356

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page