Skip to content

Commit fdbbc5c

Browse files
Merge branch 'main' into Fix_website
2 parents f92add0 + 960b446 commit fdbbc5c

31 files changed

+624
-127
lines changed

.github/workflows/analysis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ jobs:
2929

3030
- name: Install dependencies
3131
run: |
32+
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
3233
pip install -r requirements.txt
33-
34+
3435
- name: Read algorithms
3536
id: algorithms
3637
run: |
@@ -79,7 +80,7 @@ jobs:
7980
test_output_${{ matrix.algorithm }}_${{ matrix.SNR }}.csv
8081
test_duration_${{ matrix.algorithm }}_${{ matrix.SNR }}.csv
8182
overwrite: true
82-
83+
8384
merge:
8485
runs-on: ubuntu-latest
8586
needs: build

.github/workflows/docker-build-and-run.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
- name: Install Python dependencies
2424
run: |
2525
python -m pip install --upgrade pip
26+
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
2627
pip install -r requirements.txt
2728
2829
- name: Generate input files

.github/workflows/unit_test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ jobs:
2929
- name: Install dependencies
3030
run: |
3131
python -m pip install --upgrade pip
32+
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
3233
pip install -r requirements.txt
3334
- name: Test with pytest
3435
run: |
3536
pip install pytest pytest-cov
3637
python -m pytest --doctest-modules --junitxml=junit/test-results.xml --cov=. --cov-report=xml --cov-report=html -r w
38+
python -m pytest --doctest-modules --junitxml=junit/test-results-brain.xml --cov=. --cov-report=xml --cov-report=html --dataFile tests/IVIMmodels/unit_tests/generic_brain.json -r w -k test_ivim_fit_saved
3739

.github/workflows/website.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,12 @@ jobs:
4141

4242
- name: Install dependencies
4343
run: |
44+
pip install torch --extra-index-url https://download.pytorch.org/whl/cpu
4445
pip install -r requirements.txt
4546
4647
# Download Figures artifact
4748
- name: Download Figures artifact
49+
4850
if: ${{ github.event.workflow_run.conclusion == 'success' }}
4951
uses: actions/download-artifact@v4
5052
with:

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
__pycache__/
66
*.nii.gz
77
*.nii
8+
*.bval
9+
*.bvec
810
*.npy
911
*.dcm
1012
*.npy
@@ -37,3 +39,5 @@ coverage.xml
3739
phantoms/MR_XCAT_qMRI/*.json
3840
phantoms/MR_XCAT_qMRI/*.txt
3941
tests/IVIMmodels/unit_tests/models
42+
models
43+
test_output.csv

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ The ISMRM Open Science Initiative for Perfusion Imaging (OSIPI) is an initiative
44

55
>“promote the sharing of perfusion imaging software in order to eliminate the practice of duplicate development, improve the reproducibility of perfusion imaging research, and speed up the translation into tools for discovery science, drug development, and clinical practice”
66
7-
This **IVIM code collection** code library is maintained by OSIPI [Taskforce 2.4](https://www.osipi.org/task-force-2-4/) (*currently not available*) and aims to collect, test and share open-source code related to intravoxel incoherent motion (IVIM) analysis of diffusion encoded MRI data to be used in research and software development. Code contributions can include any code related IVIM analysis (denoising, motion correction, model fitting, etc.), but at an initial phase, development of tests and other features of the repository will predominantly focus on fitting algorithms. A goal of the IVIM OSIPI task force is to develop a fully tested and harmonized code library, building upon the contributions obtained through this initiative. Documentation and analysis are available on the [OSIPI TF2.4](https://osipi.github.io/TF2.4_IVIM-MRI_CodeCollection/).
7+
This **IVIM code collection** code library is maintained by OSIPI [Taskforce 2.4](https://osipi.ismrm.org/task-forces/task-force-2-4/) and aims to collect, test and share open-source code related to intravoxel incoherent motion (IVIM) analysis of diffusion encoded MRI data to be used in research and software development. Code contributions can include any code related IVIM analysis (denoising, motion correction, model fitting, etc.), but at an initial phase, development of tests and other features of the repository will predominantly focus on fitting algorithms. A goal of the IVIM OSIPI task force is to develop a fully tested and harmonized code library, building upon the contributions obtained through this initiative. Documentation and analysis are available on the [OSIPI TF2.4](https://osipi.github.io/TF2.4_IVIM-MRI_CodeCollection/).
88

99
We have some useful tools and further documentation on https://osipi.github.io/TF2.4_IVIM-MRI_CodeCollection/.
1010

@@ -22,6 +22,9 @@ If you would like to contribute with code, please follow the instructions below:
2222
If you would like to use code from the repository and/or are new to Github or IVIM, please see the jupyter notebook below:
2323
* [Introduction to TF2.4_IVIM-MRI_CodeCollection github and IVIM Analysis using Python](doc/Introduction_to_TF24_IVIM-MRI_CodeCollection_github_and_IVIM_Analysis_using_Python.ipynb)
2424

25+
If you would like to use MATLAB-based algorithms or apply the testing framework to one of these algorithms, please have a look at these instructions:
26+
* [MATLAB-related instructions](doc/matlab_instructions.md)
27+
2528
## Repository Organization
2629

2730
The repository is organized in four main folders along with configuration files for automated testing.

conftest.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,7 @@ def algorithmlist(algorithms):
267267
for algorithm in algorithms["algorithms"]:
268268
algorithm_dict = algorithms.get(algorithm, {})
269269
requires_matlab = algorithm_dict.get("requires_matlab", False)
270-
if not algorithm_dict.get('deep_learning', False):
271-
yield algorithm, requires_matlab
270+
yield algorithm, requires_matlab, algorithm_dict.get('deep_learning', False)
272271

273272

274273
def bound_input(datafile, algorithms):

doc/matlab_instructions.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
## MATLAB-related instructions
2+
3+
A large portion of IVIM-related code has historically been written in the MATLAB programming language. For this reason, we have included the possibility to call and test MATLAB-based code from the Python-based code developed here. This requires a few additional steps to get going
4+
5+
- In addition to the Python packages listed requirements.txt, one also need to install matlab.engine, for example with pip: `python -m pip install matlabengine`. This requires a corresponding version of MATLAB to be installed.
6+
- To be able to call the MATLAB code in this repository, the src/original folder must be added to the MATLAB path
7+
- Testing of MATLAB-based code only runs offline (not on Github). This is done by running `python -m pytest --withmatlab`
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0 10 20 30 40 80 110 140 170 200 300 400 500 600 700 800 900

requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ sphinx
1717
sphinx_rtd_theme
1818
pytest-json-report
1919
statsmodels
20-
ivimnet
20+
ivimnet
21+
nlopt

0 commit comments

Comments
 (0)