Skip to content

Commit

Permalink
chore: Remove images and cleanup example notebooks (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
manzt authored Apr 19, 2024
1 parent f94fcde commit a41df96
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
node_modules
.venv
dist
images

# Python
__pycache__
.ipynb_checkpoints

src/ipyniivue/static

launch.json
launch.json
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ anywidget.
pip install ipyniivue
```

# Usage
## Usage

In a Jupyter environment:

Expand All @@ -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`
Expand Down
10 changes: 2 additions & 8 deletions demo/additive_voxels.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down Expand Up @@ -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": {
Expand All @@ -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": {
Expand Down
28 changes: 23 additions & 5 deletions demo/basic_multiplanar.ipynb
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -26,7 +37,7 @@
"outputs": [],
"source": [
"nv.volumes[0].opacity = 0.3\n",
"nv.volumes[1].colormap = \"blue\"\n"
"nv.volumes[1].colormap = \"blue\""
]
},
{
Expand All @@ -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"
},
Expand All @@ -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
}
Binary file removed images/hippo.nii.gz
Binary file not shown.

0 comments on commit a41df96

Please sign in to comment.