Diff of /notebooks/ni_viewer.ipynb [000000] .. [ccb1dd]

Switch to unified view

a b/notebooks/ni_viewer.ipynb
1
{
2
 "cells": [
3
  {
4
   "cell_type": "code",
5
   "execution_count": null,
6
   "metadata": {},
7
   "outputs": [],
8
   "source": [
9
    "import nibabel as nib\n",
10
    "import os\n",
11
    "from nilearn.image import crop_img\n",
12
    "from nilearn.image import new_img_like, resample_to_img\n",
13
    "import numpy as np"
14
   ]
15
  },
16
  {
17
   "cell_type": "code",
18
   "execution_count": null,
19
   "metadata": {},
20
   "outputs": [],
21
   "source": [
22
    "!ls ../brats/prediction/35"
23
   ]
24
  },
25
  {
26
   "cell_type": "code",
27
   "execution_count": null,
28
   "metadata": {
29
    "scrolled": true
30
   },
31
   "outputs": [],
32
   "source": [
33
    "src_dir = '../brats/prediction/'\n",
34
    "subject_id = '35'\n",
35
    "vol = nib.load(os.path.join(src_dir, subject_id, 'data_volume.nii.gz'))"
36
   ]
37
  },
38
  {
39
   "cell_type": "code",
40
   "execution_count": null,
41
   "metadata": {},
42
   "outputs": [],
43
   "source": [
44
    "%matplotlib"
45
   ]
46
  },
47
  {
48
   "cell_type": "code",
49
   "execution_count": null,
50
   "metadata": {},
51
   "outputs": [],
52
   "source": [
53
    "vol.orthoview()"
54
   ]
55
  },
56
  {
57
   "cell_type": "code",
58
   "execution_count": null,
59
   "metadata": {},
60
   "outputs": [],
61
   "source": [
62
    "import sys\n",
63
    "sys.path.append('..')"
64
   ]
65
  },
66
  {
67
   "cell_type": "code",
68
   "execution_count": null,
69
   "metadata": {},
70
   "outputs": [],
71
   "source": [
72
    "from fetal_new import augment"
73
   ]
74
  },
75
  {
76
   "cell_type": "code",
77
   "execution_count": null,
78
   "metadata": {},
79
   "outputs": [],
80
   "source": [
81
    "augment.distort_image()"
82
   ]
83
  }
84
 ],
85
 "metadata": {
86
  "kernelspec": {
87
   "display_name": "Python 3",
88
   "language": "python",
89
   "name": "python3"
90
  },
91
  "language_info": {
92
   "codemirror_mode": {
93
    "name": "ipython",
94
    "version": 3
95
   },
96
   "file_extension": ".py",
97
   "mimetype": "text/x-python",
98
   "name": "python",
99
   "nbconvert_exporter": "python",
100
   "pygments_lexer": "ipython3",
101
   "version": "3.6.6"
102
  }
103
 },
104
 "nbformat": 4,
105
 "nbformat_minor": 1
106
}