From cb32580dc96496bbaaa65fdd9aecf55c679f530a Mon Sep 17 00:00:00 2001 From: Walter Simson Date: Sat, 25 Jun 2022 09:49:17 -0700 Subject: [PATCH 1/6] Update README.md --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c5d8eda0..ce8a1f1b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,15 @@ # 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 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 simulation for medical imaging, algorithmic prototyping and testing. Many tools and methods of k-wave can be found here, but this project has and will continue to diverge from the original k-wave 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 @@ -10,7 +17,7 @@ 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) @@ -37,3 +44,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). From eb6886273d87abb27213fb195176c860bb29b548 Mon Sep 17 00:00:00 2001 From: Walter Simson Date: Sat, 25 Jun 2022 19:16:19 -0700 Subject: [PATCH 2/6] Update README.md Restore k-Wave hyperlinks to readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ce8a1f1b..ec38fa60 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # k-Wave-python -This project is a Python implementation of most of the MATLAB toolbox k-wave 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. +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 simulation for medical imaging, algorithmic prototyping and testing. Many tools and methods of k-wave can be found here, but this project has and will continue to diverge from the original k-wave APIs in order to leverage pythonic practices. +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 From fc03c16cc12524327f6f5c96075fde45fc366522 Mon Sep 17 00:00:00 2001 From: Walter Simson Date: Sat, 25 Jun 2022 19:17:09 -0700 Subject: [PATCH 3/6] Update README.md fix capitalization --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec38fa60..6c7a9c53 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # k-Wave-python -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. +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 From 49b4a17e6fa7787e87d828ddc8ae34af7c49e32e Mon Sep 17 00:00:00 2001 From: Walter Simson Date: Sat, 9 Jul 2022 09:42:52 -0700 Subject: [PATCH 4/6] Update example readme and change requirement file structure --- .github/workflows/pages.yml | 2 +- README.md | 5 +++-- requirements.txt | 9 +-------- requirements/base.txt | 7 +++++++ docs_requirements.txt => requirements/docs.txt | 2 +- example_requirements.txt => requirements/example.txt | 4 ++-- requirements/test.txt | 2 ++ 7 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 requirements/base.txt rename docs_requirements.txt => requirements/docs.txt (61%) rename example_requirements.txt => requirements/example.txt (53%) create mode 100644 requirements/test.txt diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index e3bf6c03..8102415f 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -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: diff --git a/README.md b/README.md index 6c7a9c53..a229ed38 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ Currently, we are looking for beta testers on Windows. After installation, run the B-mode reconstruction example in the `examples` directory of the repository: ```bash -git clone https://github.com/waltsims/k-wave-python -pip install -r example_requirements.txt +git clone -b v0.1.0 https://github.com/waltsims/k-wave-python +cd k-wave-python +pip install -r ./requirements/example.txt python3 examples/bmode_reconstruction_example.py ``` diff --git a/requirements.txt b/requirements.txt index 9a360111..d2b526f9 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 \ No newline at end of file diff --git a/requirements/base.txt b/requirements/base.txt new file mode 100644 index 00000000..282dddd6 --- /dev/null +++ b/requirements/base.txt @@ -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 diff --git a/docs_requirements.txt b/requirements/docs.txt similarity index 61% rename from docs_requirements.txt rename to requirements/docs.txt index 2eb5d760..3feb663d 100644 --- a/docs_requirements.txt +++ b/requirements/docs.txt @@ -1,3 +1,3 @@ --r requirements.txt +-r base.txt sphinx_rtd_theme sphinx-toolbox diff --git a/example_requirements.txt b/requirements/example.txt similarity index 53% rename from example_requirements.txt rename to requirements/example.txt index 00f2629a..c1422fdb 100644 --- a/example_requirements.txt +++ b/requirements/example.txt @@ -1,3 +1,3 @@ --r requirements.txt +k-wave-python>=0.1.0 git+https://github.com/waltsims/uff.py -gdown \ No newline at end of file +gdown==4.4.0 diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 00000000..718cf7a8 --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1,2 @@ +-r base.txt +phantominator \ No newline at end of file From 5898f7272fb6088c81b5f67fb7a5027159400133 Mon Sep 17 00:00:00 2001 From: Walter Simson Date: Sat, 9 Jul 2022 09:51:55 -0700 Subject: [PATCH 5/6] Readme bugfix --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a229ed38..9ac9dcf4 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Currently, we are looking for beta testers on Windows. After installation, run the B-mode reconstruction example in the `examples` directory of the repository: ```bash -git clone -b v0.1.0 https://github.com/waltsims/k-wave-python +git clone https://github.com/waltsims/k-wave-python cd k-wave-python pip install -r ./requirements/example.txt python3 examples/bmode_reconstruction_example.py From e322a04cb2794f57238efe5b1875e0d9b73bf4c8 Mon Sep 17 00:00:00 2001 From: Sepehr Date: Fri, 22 Jul 2022 18:36:25 -0700 Subject: [PATCH 6/6] Update for Windows binary test compatibility --- tests/test_binary_present.py | 91 +++++++++++++++++++++++++++--------- 1 file changed, 69 insertions(+), 22 deletions(-) diff --git a/tests/test_binary_present.py b/tests/test_binary_present.py index df7b8048..90662565 100644 --- a/tests/test_binary_present.py +++ b/tests/test_binary_present.py @@ -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'))