Skip to content

Commit e1dc71b

Browse files
authored
Merge pull request #14 from BrainLesion/21-feature-request-create-tutorial-in-tutorials-repo
21 feature request create tutorial in tutorials repo
2 parents f56940d + f392bc6 commit e1dc71b

10 files changed

Lines changed: 411 additions & 31 deletions

File tree

.github/workflows/release.yml

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

AURORA/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
output
2+
*.log

AURORA/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Tutorials for the AURORA package

AURORA/data/t1c.nii.gz

2.04 MB
Binary file not shown.

AURORA/data/t1n.nii.gz

2.08 MB
Binary file not shown.

AURORA/data/t2f.nii.gz

2.09 MB
Binary file not shown.

AURORA/data/t2w.nii.gz

2.36 MB
Binary file not shown.

AURORA/tutorial.ipynb

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

AURORA/utils.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import matplotlib.pyplot as plt
2+
import nibabel as nib
3+
4+
5+
def visualize_results(t1_file: str, segmentation_file: str):
6+
t1_np = nib.load(t1_file).get_fdata().transpose(2, 1, 0)
7+
seg_np = nib.load(segmentation_file).get_fdata().transpose(2, 1, 0)
8+
_, ax = plt.subplots(1, 2, figsize=(8, 4))
9+
10+
slice_index = t1_np.shape[0] // 2 # You can choose any slice here
11+
ax[0].imshow(t1_np[slice_index, :, :], cmap="gray")
12+
ax[1].imshow(t1_np[slice_index, :, :], cmap="gray")
13+
ax[1].imshow(seg_np[slice_index, :, :], cmap="plasma", alpha=0.3)
14+
for ax in ax:
15+
ax.axis("off")
16+
plt.tight_layout()

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
# tutorials
1+
# Tutorials
2+
3+
This repository provides tutorials showcasing the functionality and usage of our BrainLes packages.

0 commit comments

Comments
 (0)