diff --git a/.gitignore b/.gitignore index 9691e1e..ced2395 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,7 @@ node_modules .venv dist +images # Python __pycache__ @@ -8,4 +9,4 @@ __pycache__ src/ipyniivue/static -launch.json \ No newline at end of file +launch.json diff --git a/README.md b/README.md index d462fef..78a93f7 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ anywidget. pip install ipyniivue ``` -# Usage +## Usage In a Jupyter environment: @@ -23,7 +23,7 @@ nv See the [basic demo](./demo/basic_multiplanar.ipynb) to learn more. -# Development +## Development **ipyniivue** uses [the recommended](https://packaging.python.org/en/latest/flow/#) `hatchling` diff --git a/demo/additive_voxels.ipynb b/demo/additive_voxels.ipynb index 7261d2d..8e9f5a4 100644 --- a/demo/additive_voxels.ipynb +++ b/demo/additive_voxels.ipynb @@ -6,6 +6,7 @@ "metadata": {}, "outputs": [], "source": [ + "!mkdir -p ../images/\n", "!wget https://github.com/niivue/niivue/raw/main/demos/images/narps-4735_50GV-hypo1_unthresh.nii.gz -P ../images/\n", "!wget https://github.com/niivue/niivue/raw/main/demos/images/narps-4965_9U7M-hypo1_unthresh.nii.gz -P ../images/\n", "!wget https://github.com/niivue/niivue/raw/main/demos/images/mni152.nii.gz -P ../images/" @@ -59,13 +60,6 @@ "ipywidgets.link((sgreen, \"value\"), (nv.volumes[2], \"cal_min\"))\n", "ipywidgets.HBox([sred, sgreen])" ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { @@ -84,7 +78,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.12.1" + "version": "3.12.2" }, "widgets": { "application/vnd.jupyter.widget-state+json": { diff --git a/demo/basic_multiplanar.ipynb b/demo/basic_multiplanar.ipynb index 16d2baf..9bc1412 100644 --- a/demo/basic_multiplanar.ipynb +++ b/demo/basic_multiplanar.ipynb @@ -1,5 +1,16 @@ { "cells": [ + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!mkdir -p ../images/\n", + "!wget https://github.com/niivue/niivue/raw/main/demos/images/mni152.nii.gz -P ../images/\n", + "!wget https://github.com/niivue/niivue/raw/main/demos/images/hippo.nii.gz -P ../images/" + ] + }, { "cell_type": "code", "execution_count": null, @@ -26,7 +37,7 @@ "outputs": [], "source": [ "nv.volumes[0].opacity = 0.3\n", - "nv.volumes[1].colormap = \"blue\"\n" + "nv.volumes[1].colormap = \"blue\"" ] }, { @@ -40,13 +51,13 @@ "nv.back_color = [1,1,1,1]\n", "nv.clip_plane_color = [0,1,1,1]\n", "nv.is_colorbar = True\n", - "nv.view_mode_hot_key = \"KeyN\"\n" + "nv.view_mode_hot_key = \"KeyN\"" ] } ], "metadata": { "kernelspec": { - "display_name": ".venv", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -60,9 +71,16 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.11.7" + "version": "3.12.2" + }, + "widgets": { + "application/vnd.jupyter.widget-state+json": { + "state": {}, + "version_major": 2, + "version_minor": 0 + } } }, "nbformat": 4, - "nbformat_minor": 2 + "nbformat_minor": 4 } diff --git a/images/hippo.nii.gz b/images/hippo.nii.gz deleted file mode 100644 index 971b839..0000000 Binary files a/images/hippo.nii.gz and /dev/null differ