Skip to content

Commit 5c102a0

Browse files
committed
Merge branch 'main' into dynamic_print
2 parents 0ef275b + 43ea41a commit 5c102a0

10 files changed

Lines changed: 558 additions & 31 deletions

File tree

.github/workflows/release.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

AURORA/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Tutorials for the AURORA package
2+
This folder contains several Jupyter notebooks to showcase different possible use cases of the [AURORA package](https://github.com/BrainLesion/AURORA).
3+
Please have a look at the Jupyter notebooks.
4+
5+
6+
## Citation
7+
Please support our development by citing the following manuscripts:
8+
9+
[Identifying core MRI sequences for reliable automatic brain metastasis segmentation](https://www.sciencedirect.com/science/article/pii/S016781402389795X)
10+
11+
```
12+
@article{buchner2023identifying,
13+
title={Identifying core MRI sequences for reliable automatic brain metastasis segmentation},
14+
author={Buchner, Josef A and Peeken, Jan C and Etzel, Lucas and Ezhov, Ivan and Mayinger, Michael and Christ, Sebastian M and Brunner, Thomas B and Wittig, Andrea and Menze, Bjoern H and Zimmer, Claus and others},
15+
journal={Radiotherapy and Oncology},
16+
volume={188},
17+
pages={109901},
18+
year={2023},
19+
publisher={Elsevier}
20+
}
21+
```
22+
23+
also consider citing the original AURORA manuscript, especially when using the `vanilla` model:
24+
25+
[Development and external validation of an MRI-based neural network for brain metastasis segmentation in the AURORA multicenter study](https://www.sciencedirect.com/science/article/pii/S0167814022045625)
26+
27+
```
28+
@article{buchner2022development,
29+
title={Development and external validation of an MRI-based neural network for brain metastasis segmentation in the AURORA multicenter study},
30+
author={Buchner, Josef A and Kofler, Florian and Etzel, Lucas and Mayinger, Michael and Christ, Sebastian M and Brunner, Thomas B and Wittig, Andrea and Menze, Bj{\"o}rn and Zimmer, Claus and Meyer, Bernhard and others},
31+
journal={Radiotherapy and Oncology},
32+
year={2022},
33+
publisher={Elsevier}
34+
}
35+
```
36+
37+
38+
## Licensing
39+
40+
This project is licensed under the terms of the [GNU Affero General Public License v3.0](https://www.gnu.org/licenses/agpl-3.0.de.html).
41+
42+
Contact us regarding licensing.
43+
44+
## Contact / Feedback / Questions
45+
46+
If possible please open a GitHub issue [here](https://github.com/neuronflow/AURORA/issues).
47+
48+
For inquiries not suitable for GitHub issues:
49+
50+
Florian Kofler
51+
florian.kofler [at] tum.de
52+
53+
Josef Buchner
54+
j.buchner [at] tum.de

AURORA/data/flair.nii.gz

2.09 MB
Binary file not shown.

AURORA/data/t1.nii.gz

2.08 MB
Binary file not shown.

AURORA/data/t1c.nii.gz

2.04 MB
Binary file not shown.

AURORA/data/t2.nii.gz

2.36 MB
Binary file not shown.
109 KB
Binary file not shown.

AURORA/tutorial.ipynb

Lines changed: 457 additions & 0 deletions
Large diffs are not rendered by default.

AURORA/utils.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import os
2+
import matplotlib.pyplot as plt
3+
import nibabel as nib
4+
5+
DATA_FOLDER = "data"
6+
7+
8+
def visualize_data(data_folder: str = DATA_FOLDER, slice_index: int = 75):
9+
"""Visualize the MRI modalities for a given slice index
10+
11+
Args:
12+
data_folder (str, optional): Path to the folder containing the t1, t1c, t2 & flair file. Defaults to DATA_FOLDER.
13+
slice_index (int, optional): Slice to be visualized (first index in data of shape (155, 240, 240)). Defaults to 75.
14+
"""
15+
_, axes = plt.subplots(1, 4, figsize=(12, 10))
16+
17+
modalities = ["t1", "t1c", "t2", "flair"]
18+
for i, mod in enumerate(modalities):
19+
modality_file = os.path.join(data_folder, f"{mod}.nii.gz")
20+
modality_np = nib.load(modality_file).get_fdata().transpose(2, 1, 0)
21+
axes[i].set_title(mod)
22+
axes[i].imshow(modality_np[slice_index, :, :], cmap="gray")
23+
axes[i].axis("off")
24+
25+
26+
def visualize_segmentation(modality_file: str, segmentation_file: str):
27+
"""Visualize the MRI modality and the segmentation
28+
29+
Args:
30+
modality_file (str): Path to the desired modality file
31+
segmentation_file (str): Path to the segmentation file
32+
"""
33+
modality_np = nib.load(modality_file).get_fdata().transpose(2, 1, 0)
34+
seg_np = nib.load(segmentation_file).get_fdata().transpose(2, 1, 0)
35+
_, ax = plt.subplots(1, 2, figsize=(8, 4))
36+
37+
slice_index = modality_np.shape[0] // 2 # You can choose any slice here
38+
ax[0].imshow(modality_np[slice_index, :, :], cmap="gray")
39+
ax[1].imshow(modality_np[slice_index, :, :], cmap="gray")
40+
ax[1].imshow(seg_np[slice_index, :, :], cmap="plasma", alpha=0.3)
41+
for ax in ax:
42+
ax.axis("off")
43+
plt.tight_layout()

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# tutorials
1+
# Tutorials
2+
<!-- TODO should such tutorial readmes also get badges? -->
3+
4+
This repository provides tutorials showcasing the functionality and usage of our BrainLes packages.

0 commit comments

Comments
 (0)