Skip to content

Commit

Permalink
simplify #1
Browse files Browse the repository at this point in the history
  • Loading branch information
dickscheid committed Jun 18, 2024
1 parent 2e03666 commit e3c57b4
Showing 1 changed file with 12 additions and 27 deletions.
39 changes: 12 additions & 27 deletions 01-BasicConcepts.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,6 @@
"## Import siibra"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# first off, update siibra to latest release\n",
"!pip install -U siibra"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand All @@ -25,24 +15,12 @@
"source": [
"import siibra\n",
"from packaging.version import Version\n",
"assert Version(siibra.__version__) >= Version('1.0a08')\n",
"assert Version(siibra.__version__) >= Version('1.0a11')\n",
"import os\n",
"import matplotlib\n",
"%matplotlib inline"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# We populate the cache with common data items here, so we need not wait later on.\n",
"# This is not usually needed - siibra fetches data only as needed.\n",
"with siibra.QUIET:\n",
" siibra.warm_cache()"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -191,7 +169,7 @@
"outputs": [],
"source": [
"julich_mpm = julichbrain.get_map(space=siibra.spaces.MNI_152_ICBM_2009C_NONLINEAR_ASYMMETRIC)\n",
"mpm"
"julich_mpm"
]
},
{
Expand Down Expand Up @@ -388,7 +366,7 @@
"To work with full resolution data, we typically fetch volumes of interest only.\n",
"`siibra` represents these as bounding boxes (`siibra.locations.BoundingBox`).\n",
"Bounding boxes are one type of locations provided by `siibra`, and all locations are uniquely associated to a reference space.\n",
"We construct a bounding box in BigBrain space by using the min and max point (-3.979, -61.256, 3.906) and (5.863, -55.356, -2.487):"
"We construct a bounding box in BigBrain space by using the min and max point (-2.979, -61.256, 1.906) and (2.863, -57.356, -2.087):"
]
},
{
Expand All @@ -398,8 +376,8 @@
"outputs": [],
"source": [
"voi = siibra.locations.BoundingBox(\n",
" (-3.979, -61.256, 3.906),\n",
" (5.863, -55.356, -2.487),\n",
" (-2.979, -61.256, 1.906),\n",
" (2.863, -57.356, -2.087),\n",
" space='bigbrain'\n",
")"
]
Expand Down Expand Up @@ -457,6 +435,13 @@
"mask = layermap.fetch(resolution_mm=0.16, voi=voi, fragment='left')\n",
"plotting.view_img(mask, bg_img=bigbrainchunk, opacity=.1, symmetric_cmap=False)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit e3c57b4

Please sign in to comment.