Note
Go to the end to download the full example code
Plot a subject#
Use torchio.Subject.plot()
to plot the images within a subject.
Downloading http://packages.bic.mni.mcgill.ca/mni-models/colin27/mni_colin27_1998_nifti.zip to /home/user/.cache/torchio/mni_colin27_1998_nifti/mni_colin27_1998_nifti.zip
0it [00:00, ?it/s]
0%| | 0/24250681 [00:00<?, ?it/s]
0%| | 8192/24250681 [00:01<05:50, 69079.94it/s]
0%| | 40960/24250681 [00:01<02:08, 189126.35it/s]
0%| | 73728/24250681 [00:01<01:45, 230048.99it/s]
0%| | 114688/24250681 [00:01<01:27, 274906.49it/s]
1%| | 155648/24250681 [00:01<01:20, 300555.13it/s]
1%| | 196608/24250681 [00:01<01:15, 316569.96it/s]
1%| | 237568/24250681 [00:01<01:13, 326781.47it/s]
1%| | 286720/24250681 [00:01<01:08, 350951.08it/s]
1%|▏ | 335872/24250681 [00:02<01:04, 370242.13it/s]
2%|▏ | 376832/24250681 [00:02<01:05, 363826.36it/s]
2%|▏ | 434176/24250681 [00:02<00:59, 398342.74it/s]
2%|▏ | 483328/24250681 [00:02<00:58, 406894.95it/s]
2%|▏ | 548864/24250681 [00:02<00:53, 444586.59it/s]
2%|▏ | 606208/24250681 [00:02<00:51, 462486.48it/s]
3%|▎ | 671744/24250681 [00:02<00:48, 489273.80it/s]
3%|▎ | 729088/24250681 [00:02<00:48, 488930.45it/s]
3%|▎ | 802816/24250681 [00:02<00:45, 520948.31it/s]
4%|▎ | 868352/24250681 [00:03<00:43, 541724.33it/s]
4%|▍ | 925696/24250681 [00:03<01:03, 365523.99it/s]
4%|▍ | 974848/24250681 [00:03<01:01, 377196.86it/s]
4%|▍ | 1032192/24250681 [00:03<00:57, 405286.92it/s]
5%|▍ | 1114112/24250681 [00:03<00:47, 482298.57it/s]
5%|▍ | 1204224/24250681 [00:03<00:41, 559770.78it/s]
5%|▌ | 1302528/24250681 [00:03<00:36, 632378.09it/s]
6%|▌ | 1392640/24250681 [00:04<00:34, 671797.77it/s]
6%|▌ | 1499136/24250681 [00:04<00:31, 728835.65it/s]
7%|▋ | 1605632/24250681 [00:04<00:28, 782409.65it/s]
7%|▋ | 1712128/24250681 [00:04<00:27, 815879.08it/s]
8%|▊ | 1826816/24250681 [00:04<00:25, 870558.70it/s]
8%|▊ | 1957888/24250681 [00:04<00:24, 927539.10it/s]
9%|▊ | 2080768/24250681 [00:04<00:22, 973061.13it/s]
9%|▉ | 2211840/24250681 [00:04<00:21, 1017780.31it/s]
10%|▉ | 2359296/24250681 [00:05<00:20, 1084203.50it/s]
10%|█ | 2506752/24250681 [00:05<00:19, 1131098.06it/s]
11%|█ | 2662400/24250681 [00:05<00:18, 1190514.13it/s]
12%|█▏ | 2826240/24250681 [00:05<00:17, 1239239.39it/s]
12%|█▏ | 2998272/24250681 [00:05<00:16, 1311140.36it/s]
13%|█▎ | 3170304/24250681 [00:05<00:15, 1361373.34it/s]
14%|█▍ | 3366912/24250681 [00:05<00:14, 1443204.69it/s]
15%|█▍ | 3563520/24250681 [00:05<00:14, 1421809.47it/s]
16%|█▌ | 3768320/24250681 [00:05<00:13, 1509713.68it/s]
16%|█▋ | 3989504/24250681 [00:06<00:12, 1612719.36it/s]
17%|█▋ | 4218880/24250681 [00:06<00:11, 1695571.43it/s]
18%|█▊ | 4448256/24250681 [00:06<00:11, 1775441.68it/s]
19%|█▉ | 4710400/24250681 [00:06<00:10, 1900488.10it/s]
21%|██ | 4972544/24250681 [00:06<00:09, 1986144.22it/s]
22%|██▏ | 5242880/24250681 [00:06<00:09, 2064507.84it/s]
23%|██▎ | 5529600/24250681 [00:06<00:08, 2168392.06it/s]
24%|██▍ | 5791744/24250681 [00:06<00:08, 2285212.21it/s]
25%|██▍ | 6045696/24250681 [00:07<00:07, 2345999.69it/s]
26%|██▌ | 6340608/24250681 [00:07<00:07, 2450466.76it/s]
27%|██▋ | 6610944/24250681 [00:07<00:07, 2512662.38it/s]
29%|██▊ | 6914048/24250681 [00:07<00:06, 2622157.05it/s]
30%|██▉ | 7258112/24250681 [00:07<00:05, 2845780.68it/s]
31%|███ | 7544832/24250681 [00:07<00:05, 2820959.97it/s]
33%|███▎ | 7905280/24250681 [00:07<00:05, 3029750.01it/s]
34%|███▍ | 8232960/24250681 [00:07<00:05, 3101108.46it/s]
36%|███▌ | 8617984/24250681 [00:07<00:04, 3202704.30it/s]
37%|███▋ | 9019392/24250681 [00:07<00:04, 3407847.87it/s]
39%|███▊ | 9379840/24250681 [00:08<00:04, 3459706.65it/s]
40%|████ | 9814016/24250681 [00:08<00:03, 3648893.30it/s]
42%|████▏ | 10264576/24250681 [00:08<00:03, 3890929.56it/s]
44%|████▍ | 10682368/24250681 [00:08<00:03, 3969525.23it/s]
46%|████▌ | 11083776/24250681 [00:08<00:03, 3980178.99it/s]
48%|████▊ | 11608064/24250681 [00:08<00:02, 4297696.92it/s]
50%|█████ | 12132352/24250681 [00:08<00:02, 4520170.38it/s]
52%|█████▏ | 12591104/24250681 [00:08<00:02, 4459384.29it/s]
54%|█████▍ | 13090816/24250681 [00:08<00:02, 4572231.55it/s]
56%|█████▋ | 13664256/24250681 [00:08<00:02, 4898435.88it/s]
58%|█████▊ | 14155776/24250681 [00:09<00:02, 4841415.70it/s]
60%|██████ | 14655488/24250681 [00:09<00:01, 4884034.83it/s]
63%|██████▎ | 15171584/24250681 [00:09<00:01, 4962200.98it/s]
65%|██████▍ | 15671296/24250681 [00:09<00:01, 4962900.58it/s]
67%|██████▋ | 16203776/24250681 [00:09<00:01, 5022457.91it/s]
69%|██████▉ | 16728064/24250681 [00:09<00:01, 5059228.69it/s]
71%|███████▏ | 17301504/24250681 [00:09<00:01, 5246099.28it/s]
74%|███████▎ | 17833984/24250681 [00:09<00:01, 5154842.93it/s]
76%|███████▌ | 18350080/24250681 [00:09<00:01, 5078064.95it/s]
78%|███████▊ | 18898944/24250681 [00:10<00:01, 5112139.39it/s]
80%|████████ | 19415040/24250681 [00:10<00:00, 5062502.42it/s]
82%|████████▏ | 19922944/24250681 [00:10<00:00, 4903911.28it/s]
85%|████████▍ | 20496384/24250681 [00:10<00:00, 4934230.40it/s]
87%|████████▋ | 21143552/24250681 [00:10<00:00, 5364258.61it/s]
89%|████████▉ | 21684224/24250681 [00:10<00:00, 5099653.94it/s]
92%|█████████▏| 22200320/24250681 [00:10<00:00, 4896872.68it/s]
94%|█████████▎| 22716416/24250681 [00:10<00:00, 4965582.07it/s]
96%|█████████▌| 23289856/24250681 [00:10<00:00, 5147975.32it/s]
98%|█████████▊| 23814144/24250681 [00:11<00:00, 4984498.49it/s]
24256512it [00:11, 2185456.27it/s]
import torchio as tio
tio.datasets.Colin27().plot()
Total running time of the script: (0 minutes 14.383 seconds)