Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Build and Commit
uses: sphinx-notes/pages@v2
with:
requirements_path: ./docs_requirements.txt
requirements_path: ./requirements/docs.txt
- name: Push changes
uses: ad-m/github-push-action@master
with:
Expand Down
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
# k-Wave-python

This project is a Python interface to the pre-compiled v1.3 of [k-Wave simulation binaries](http://www.k-wave.org/download.php) which support NVIDIA sm 3.0 to sm 7.5.
This project is a Python implementation of most of the [MATLAB toolbox k-Wave](http://www.k-wave.org/) as well as an interface to the pre-compiled v1.3 of k-Wave simulation binaries which support NVIDIA sm 3.0 to sm 7.5.

## Mission

With this project, we hope to increase accessibility and reproducablitiy of [k-Wave](http://www.k-wave.org/) simulations for medical imaging, algorithmic prototyping and testing. Many tools and methods of [k-Wave](http://www.k-wave.org/) can be found here, but this project has and will continue to diverge from the original [k-Wave](http://www.k-wave.org/) APIs in order to leverage pythonic practices.

## Documentation

The documentation for k-wave-python can be found [here](http://waltersimson.com/k-wave-python/)

The documentation for this Python interface is compiled in a Read the Docs page [here](http://waltersimson.com/k-wave-python/)
## Installation

```bash
pip install k-wave-python
```

Currently, we are looking for beta testers on Windows.
If you would like to get involved, open an issue letting us know, or message us on the [k-Wave-python Telegram chat](https://t.me/+ILL4yGgcX0A2Y2Y6).


## Getting started
![](docs/images/example_bmode.png)
Expand All @@ -19,7 +26,8 @@ After installation, run the B-mode reconstruction example in the `examples` dire

```bash
git clone https://github.com/waltsims/k-wave-python
pip install -r example_requirements.txt
cd k-wave-python
pip install -r ./requirements/example.txt
python3 examples/bmode_reconstruction_example.py
```

Expand All @@ -37,3 +45,7 @@ To test the reconstruction on a machine without a GPU, set `RUN_SIMULATION` [on
## Development

If you're enjoying k-Wave-python and want to contribute, development instructions can be found [here](https://waltersimson.com/k-wave-python/development/development_environment.html).
If you would like to get involved, open an issue letting us know, or message us on the [k-Wave-python Telegram chat](https://t.me/+ILL4yGgcX0A2Y2Y6)

## Contact
e-mail [walter.simson@tum.de](mailto:walter.simson@tum.de).
9 changes: 1 addition & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1 @@
h5py==3.6.0
scipy==1.7.3
opencv-python==4.4.0.46
deepdiff==5.2.3
matplotlib==3.3.4
numpy~=1.21.6
gdown==4.4.0
UFF.py @ git+https://github.com/waltsims/uff.py@a672319b5cfbe3a676837e47c5958a3fdea12fa7
-r ./requirements/base.txt
7 changes: 7 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
h5py==3.6.0
scipy==1.7.3
opencv-python==4.4.0.46
deepdiff==5.2.3
matplotlib==3.3.4
numpy~=1.21.6
UFF.py @ git+https://github.com/waltsims/uff.py@a672319b5cfbe3a676837e47c5958a3fdea12fa7
2 changes: 1 addition & 1 deletion docs_requirements.txt → requirements/docs.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
-r base.txt
sphinx_rtd_theme
sphinx-toolbox
4 changes: 2 additions & 2 deletions example_requirements.txt → requirements/example.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
-r requirements.txt
k-wave-python>=0.1.0
git+https://github.com/waltsims/uff.py
gdown
gdown==4.4.0
2 changes: 2 additions & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
-r base.txt
phantominator
91 changes: 69 additions & 22 deletions tests/test_binary_present.py
Original file line number Diff line number Diff line change
@@ -1,25 +1,72 @@
import setup_test
import os
import os.path

os.chdir('..')

def test_linux_binaries_present():
assert os.path.exists('kwave/bin/linux/acousticFieldPropagator-OMP')
assert os.path.exists('kwave/bin/linux/kspaceFirstOrder-OMP')
assert os.path.exists('kwave/bin/linux/kspaceFirstOrder-CUDA')


def test_windows_binaries_present():
assert os.path.exists('kwave/bin/windows/acousticFieldPropagator-OMP.exe')
assert os.path.exists('kwave/bin/windows/kspaceFirstOrder-CUDA.exe')
assert os.path.exists('kwave/bin/windows/kspaceFirstOrder-OMP.exe')
assert os.path.exists('kwave/bin/windows/hdf5.dll')
assert os.path.exists('kwave/bin/windows/hdf5_hl.dll')
assert os.path.exists('kwave/bin/windows/cufft64_10.dll')
assert os.path.exists('kwave/bin/windows/libiomp5md.dll')
assert os.path.exists('kwave/bin/windows/libmmd.dll')
assert os.path.exists('kwave/bin/windows/msvcp140.dll')
assert os.path.exists('kwave/bin/windows/svml_dispmd.dll')
assert os.path.exists('kwave/bin/windows/szip.dll')
assert os.path.exists('kwave/bin/windows/vcruntime140.dll')
assert os.path.exists('kwave/bin/windows/zlib.dll')
assert os.path.exists('kwave/bin/windows/cufft64_10.dll')

def test_linux_afp_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'linux', 'acousticFieldPropagator-OMP'))


def test_linux_omp_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'linux', 'kspaceFirstOrder-OMP'))


def test_linux_cuda_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'linux', 'kspaceFirstOrder-CUDA'))


def test_windows_afp_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'acousticFieldPropagator-OMP.exe'))


def test_windows_cuda_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'kspaceFirstOrder-CUDA.exe'))


def test_windows_omp_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'kspaceFirstOrder-OMP.exe'))


def test_windows_hdf5_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'hdf5.dll'))


def test_windows_hdf5hl_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'hdf5_hl.dll'))


def test_windows_cufft64_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'cufft64_10.dll'))


def test_windows_libiomp_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'libiomp5md.dll'))


def test_windows_libmmd_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'libmmd.dll'))


def test_windows_msvcp_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'msvcp140.dll'))


def test_windows_svmldispmd_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'svml_dispmd.dll'))


def test_windows_szip_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'szip.dll'))


def test_windows_vcruntime140_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'vcruntime140.dll'))


def test_windows_zlib_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'zlib.dll'))


def test_windows_cufft6410_binaries_present():
assert os.path.exists(os.path.join(os.getcwd(), 'kwave', 'bin', 'windows', 'cufft64_10.dll'))