Browse Source

examples/ashs.ipynb: added ashs.IntracranialVolumeFile

Fabian Peter Hammerle 4 years ago
parent
commit
91700cff1e
1 changed files with 46 additions and 11 deletions
  1. 46 11
      examples/ashs.ipynb

+ 46 - 11
examples/ashs.ipynb

@@ -17,10 +17,45 @@
     "SUBJECT = 'bert'"
    ]
   },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Intracranial Volume"
+   ]
+  },
   {
    "cell_type": "code",
    "execution_count": 2,
    "metadata": {},
+   "outputs": [
+    {
+     "name": "stdout",
+     "output_type": "stream",
+     "text": [
+      "1234560.0 mm^3\n"
+     ]
+    }
+   ],
+   "source": [
+    "from freesurfer_volume_reader.ashs import IntracranialVolumeFile\n",
+    "\n",
+    "for volume_file in IntracranialVolumeFile.find(SUBJECTS_DIR):\n",
+    "    if volume_file.subject == SUBJECT:\n",
+    "        print(volume_file.read_volume_mm3(), 'mm^3')"
+   ]
+  },
+  {
+   "cell_type": "markdown",
+   "metadata": {},
+   "source": [
+    "## Subfield Volumes"
+   ]
+  },
+  {
+   "cell_type": "code",
+   "execution_count": 3,
+   "metadata": {},
    "outputs": [
     {
      "data": {
@@ -31,7 +66,7 @@
        " 'bert_left_corr_nogray_volumes.txt']"
       ]
      },
-     "execution_count": 2,
+     "execution_count": 3,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -47,7 +82,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 3,
+   "execution_count": 4,
    "metadata": {},
    "outputs": [
     {
@@ -132,7 +167,7 @@
        "4      PHC     2345.878    bert      right     nogray"
       ]
      },
-     "execution_count": 3,
+     "execution_count": 4,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -145,7 +180,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 4,
+   "execution_count": 5,
    "metadata": {},
    "outputs": [
     {
@@ -157,7 +192,7 @@
        "Name: correction, dtype: int64"
       ]
      },
-     "execution_count": 4,
+     "execution_count": 5,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -169,7 +204,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 5,
+   "execution_count": 6,
    "metadata": {},
    "outputs": [
     {
@@ -282,7 +317,7 @@
        "SUB          457.789   457.781   457.780   457.781"
       ]
      },
-     "execution_count": 5,
+     "execution_count": 6,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -295,7 +330,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 6,
+   "execution_count": 7,
    "metadata": {},
    "outputs": [
     {
@@ -1093,10 +1128,10 @@
     {
      "data": {
       "text/plain": [
-       "<matplotlib.axes._subplots.AxesSubplot at 0x7ff6715a74e0>"
+       "<matplotlib.axes._subplots.AxesSubplot at 0x7fb6ca200208>"
       ]
      },
-     "execution_count": 6,
+     "execution_count": 7,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -1133,7 +1168,7 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.6.7"
+   "version": "3.7.3"
   }
  },
  "nbformat": 4,