Skip to content

Commit 0325bbb

Browse files
committed
deploy: 35185e2
1 parent 10355dc commit 0325bbb

File tree

8 files changed

+937
-929
lines changed

8 files changed

+937
-929
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": "f2fd87c7",
5+
"id": "dcbee672",
66
"metadata": {},
77
"source": [
88
"# The extra mile\n",
@@ -16,7 +16,7 @@
1616
{
1717
"cell_type": "code",
1818
"execution_count": 1,
19-
"id": "f0d463a7",
19+
"id": "bfb88a24",
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
@@ -25,7 +25,7 @@
2525
},
2626
{
2727
"cell_type": "markdown",
28-
"id": "b6c44014",
28+
"id": "b6d4c34c",
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": "aae19e81",
38+
"id": "2a054276",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -46,7 +46,7 @@
4646
},
4747
{
4848
"cell_type": "markdown",
49-
"id": "ce26821f",
49+
"id": "d9efe7bf",
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": "e4343aad",
63+
"id": "17ab1283",
6464
"metadata": {},
6565
"outputs": [
6666
{
@@ -121,7 +121,7 @@
121121
},
122122
{
123123
"cell_type": "markdown",
124-
"id": "ed209848",
124+
"id": "27b6f80c",
125125
"metadata": {},
126126
"source": [
127127
"### 2. Data\n",
@@ -134,7 +134,7 @@
134134
{
135135
"cell_type": "code",
136136
"execution_count": 4,
137-
"id": "4970e36a",
137+
"id": "e53d29b4",
138138
"metadata": {
139139
"tags": [
140140
"output_scroll"
@@ -465,7 +465,7 @@
465465
},
466466
{
467467
"cell_type": "markdown",
468-
"id": "c25f90ba",
468+
"id": "afe8693d",
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": "9a4bcefc",
477+
"id": "36a36467",
478478
"metadata": {},
479479
"outputs": [
480480
{
@@ -494,7 +494,7 @@
494494
},
495495
{
496496
"cell_type": "markdown",
497-
"id": "905273e9",
497+
"id": "1408ff57",
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": "bfe44b8e",
508+
"id": "19b9ec12",
509509
"metadata": {},
510510
"outputs": [
511511
{
@@ -525,7 +525,7 @@
525525
},
526526
{
527527
"cell_type": "markdown",
528-
"id": "4d7f56ef",
528+
"id": "1e0d7624",
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": "64d75122",
539+
"id": "26de529a",
540540
"metadata": {},
541541
"outputs": [
542542
{
@@ -556,7 +556,7 @@
556556
},
557557
{
558558
"cell_type": "markdown",
559-
"id": "d29ce741",
559+
"id": "92bb2d1f",
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": "35c88f90",
570+
"id": "21539086",
571571
"metadata": {
572572
"tags": [
573573
"output_scroll"
@@ -689,7 +689,7 @@
689689
},
690690
{
691691
"cell_type": "markdown",
692-
"id": "ceee1f52",
692+
"id": "4df216af",
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": "12e0203c",
704+
"id": "3a939f9d",
705705
"metadata": {},
706706
"outputs": [
707707
{
@@ -725,7 +725,7 @@
725725
},
726726
{
727727
"cell_type": "markdown",
728-
"id": "d8692337",
728+
"id": "8431c61b",
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)