Skip to content

Commit 230d309

Browse files
committed
deploy: 57d080e
1 parent 28b6383 commit 230d309

File tree

8 files changed

+955
-949
lines changed

8 files changed

+955
-949
lines changed

_sources/extra/nifti.ipynb

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "971a7179",
5+
"id": "bd8e1b60",
66
"metadata": {},
77
"source": [
88
"# The extra mile\n",
@@ -16,7 +16,7 @@
1616
{
1717
"cell_type": "code",
1818
"execution_count": 1,
19-
"id": "f93f15d0",
19+
"id": "625c23dc",
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"cell_type": "markdown",
28-
"id": "a36d3aeb",
28+
"id": "1ccbd3fc",
2929
"metadata": {},
3030
"source": [
3131
"First, use the `load()` function to create a NiBabel image object from a NIfTI file.\n",
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": 2,
38-
"id": "195eacf4",
38+
"id": "5774ecdf",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"cell_type": "markdown",
49-
"id": "a5b43c2b",
49+
"id": "5f1112c4",
5050
"metadata": {},
5151
"source": [
5252
"Loading in a NIfTI file with `NiBabel` gives us a special type of data object which encodes all the information in the file.\n",
@@ -60,7 +60,7 @@
6060
{
6161
"cell_type": "code",
6262
"execution_count": 3,
63-
"id": "108a7333",
63+
"id": "2fe282e7",
6464
"metadata": {},
6565
"outputs": [
6666
{
@@ -121,7 +121,7 @@
121121
},
122122
{
123123
"cell_type": "markdown",
124-
"id": "7fcf473e",
124+
"id": "9e93bdcc",
125125
"metadata": {},
126126
"source": [
127127
"### 2. Data\n",
@@ -134,7 +134,7 @@
134134
{
135135
"cell_type": "code",
136136
"execution_count": 4,
137-
"id": "19cf993d",
137+
"id": "c48586f4",
138138
"metadata": {
139139
"tags": [
140140
"output_scroll"
@@ -465,7 +465,7 @@
465465
},
466466
{
467467
"cell_type": "markdown",
468-
"id": "6646221a",
468+
"id": "c45e8656",
469469
"metadata": {},
470470
"source": [
471471
"What type of data is this exactly? We can determine this by calling the `type()` function on `dwi_data`."
@@ -474,7 +474,7 @@
474474
{
475475
"cell_type": "code",
476476
"execution_count": 5,
477-
"id": "6aa4099c",
477+
"id": "569073ed",
478478
"metadata": {},
479479
"outputs": [
480480
{
@@ -494,7 +494,7 @@
494494
},
495495
{
496496
"cell_type": "markdown",
497-
"id": "8a15078f",
497+
"id": "f888ec95",
498498
"metadata": {},
499499
"source": [
500500
"The data is a multidimensional **array** representing the image data.\n",
@@ -505,7 +505,7 @@
505505
{
506506
"cell_type": "code",
507507
"execution_count": 6,
508-
"id": "14f3fcec",
508+
"id": "b4181d45",
509509
"metadata": {},
510510
"outputs": [
511511
{
@@ -525,7 +525,7 @@
525525
},
526526
{
527527
"cell_type": "markdown",
528-
"id": "dc0de672",
528+
"id": "8157e259",
529529
"metadata": {},
530530
"source": [
531531
"As expected, the data contains 4 dimensions (*i, j, k* and gradient number).\n",
@@ -536,7 +536,7 @@
536536
{
537537
"cell_type": "code",
538538
"execution_count": 7,
539-
"id": "30b6f882",
539+
"id": "a4cafe5e",
540540
"metadata": {},
541541
"outputs": [
542542
{
@@ -556,7 +556,7 @@
556556
},
557557
{
558558
"cell_type": "markdown",
559-
"id": "b6c0f71f",
559+
"id": "2d29d8dc",
560560
"metadata": {},
561561
"source": [
562562
"This tells us that the image is 128, 128, 66\n",
@@ -567,7 +567,7 @@
567567
{
568568
"cell_type": "code",
569569
"execution_count": 8,
570-
"id": "1bf92038",
570+
"id": "f798998d",
571571
"metadata": {
572572
"tags": [
573573
"output_scroll"
@@ -689,7 +689,7 @@
689689
},
690690
{
691691
"cell_type": "markdown",
692-
"id": "e3e603bf",
692+
"id": "0e37b08a",
693693
"metadata": {},
694694
"source": [
695695
"### 3. [Affine](https://nipy.org/nibabel/coordinate_systems.html): tells the position of the image array data in a reference space\n",
@@ -701,7 +701,7 @@
701701
{
702702
"cell_type": "code",
703703
"execution_count": 9,
704-
"id": "29fd4aa5",
704+
"id": "578c4ba5",
705705
"metadata": {},
706706
"outputs": [
707707
{
@@ -725,7 +725,7 @@
725725
},
726726
{
727727
"cell_type": "markdown",
728-
"id": "01c9d8cb",
728+
"id": "66451ad0",
729729
"metadata": {},
730730
"source": [
731731
"To explain this concept, recall that we referred to coordinates in our data as *voxel coordinates (i,j,k)* coordinates such that:\n",

0 commit comments

Comments
 (0)