Skip to content
Open
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
Binary file added docs/source/imgs/nifti-jupyter-visualization.mp4
Binary file not shown.
18 changes: 18 additions & 0 deletions docs/source/nifti_dataset.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,22 @@ for epi_img in nifti_ds:
```

For further reading we refer to the [nibabel documentation](https://nipy.org/nibabel/index.html) and especially [this nibabel tutorial](https://nipy.org/nibabel/coordinate_systems.html)

## Visualizing images in Jupyter
We added support for visualizing images directly in the Jupyter notebook-like environments. When you load an image dataset, the images will be displayed automatically when you return them.

```py
from datasets import load_dataset

ds = load_dataset("<path/to/folder>",
split="<split>")

ds[0]["nifti"] # The image will be displayed directly in the notebook
```

<video width="100%" controls>
<source src="imgs/nifti-jupyter-visualization.mp4" type="video/mp4" />
Your browser does not support the video tag.
</video>

---