Skip to content
This repository has been archived by the owner on Mar 17, 2024. It is now read-only.

Commit

Permalink
add example additive
Browse files Browse the repository at this point in the history
  • Loading branch information
kolibril13 committed Feb 21, 2024
1 parent 4be75ec commit 8f9ef1a
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions demo/additive_voxels.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from ipyniivue_experimental import AnyNiivue, SliceType\n",
"# based on https://niivue.github.io/niivue/features/additive.voxels.html\n",
"\n",
"volumes = [\n",
" { \"path\": \"../images/mni152.nii.gz\" },\n",
" {\n",
" \"path\": \"../images/narps-4965_9U7M-hypo1_unthresh.nii.gz\",\n",
" \"colormap\": \"red\",\n",
" \"cal_min\": 2,\n",
" \"cal_max\": 4,\n",
" },\n",
" {\n",
" \"path\": \"../images/narps-4735_50GV-hypo1_unthresh.nii.gz\",\n",
" \"colormap\": \"green\",\n",
" \"cal_min\": 2,\n",
" \"cal_max\": 4,\n",
" },\n",
" ]\n",
"nv = AnyNiivue()\n",
"nv.load_volumes(volumes)\n",
"nv"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"nv.volumes[0].colorbarVisible = False\n",
"nv.volumes[1].cal_min = 1"
]
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 8f9ef1a

Please sign in to comment.