-
Notifications
You must be signed in to change notification settings - Fork 12
/
index.html
948 lines (910 loc) · 86.6 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta property="og:title" content="9. Nilearn usage examples" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://nilearn.github.io/auto_examples/index.html" />
<meta property="og:site_name" content="Nilearn" />
<meta property="og:description" content="Contents: Tutorial examples, Visualization of brain images, Decoding and predicting from brain images, Functional connectivity, GLM: First level analysis examples, GLM : Second level analysis examp..." />
<meta property="og:image" content="../_images/sphx_glr_plot_python_101_thumb.png" />
<meta property="og:image:alt" content="Basic numerics and plotting with Python" />
<title>Nilearn: Statistical Analysis for NeuroImaging in Python — Machine learning for NeuroImaging</title>
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/nature.css" />
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery.css" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-binder.css" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-dataframe.css" />
<link rel="stylesheet" type="text/css" href="../_static/sg_gallery-rendered-html.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script src="../_static/clipboard.min.js"></script>
<script src="../_static/copybutton.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="9.1.1. Basic numerics and plotting with Python" href="plot_python_101.html" />
<link rel="prev" title="8.15.3. nilearn.surface.vol_to_surf" href="../modules/generated/nilearn.surface.vol_to_surf.html" />
<meta content="True" name="HandheldFriendly">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="keywords" content="nilearn, neuroimaging, python, neuroscience, machinelearning">
<script type="text/javascript">
function updateTopMenuPosition(height, width) {
if($(window).scrollTop() > height && $(window).outerWidth() > 1024) {
//begin to scroll
$('.related-wrapper').css("z-index", 1000);
$('.related-wrapper').css("position", "sticky");
$('.related-wrapper').css("top", 0);
$('.related-wrapper').css("width", width)
} else {
//lock it back into place
$('.related-wrapper').css("position", "relative");
$('.related-wrapper').css("top", 0)
}
}
$(function() {
var banner_height = $('#logo-banner').outerHeight();
var banner_width = $('#logo-banner').outerWidth();
var width = $('.related-wrapper').css("height", $('.related').outerHeight());
updateTopMenuPosition(banner_height, width);
$(window).scroll(function(event) {
updateTopMenuPosition(banner_height, width)
});
$(window).resize(function(event) {
var banner_width = $('#logo-banner').outerWidth();
var menu_height = $('.related').outerHeight();
$('.related').css("width", banner_width);
$('.related-wrapper').css("height", menu_height);
updateTopMenuPosition(banner_height, width)
})
});
</script>
<script type="text/javascript">
function updateSideBarPosition(top, offset, sections) {
var pos = $(window).scrollTop();
// Lock the table of content to a fixed position once we scroll enough
var topShift = 2 * offset;
if(pos > top + topShift + 1) {
// begin to scroll with sticky menu bar
var topShift = -topShift + 1;
if ($(window).outerWidth() < 1024) {
// compensate top menu that disappears
topShift -= offset + 1
}
$('.sphinxsidebarwrapper').css("position", "fixed");
$('.sphinxsidebarwrapper').css("top", topShift)
}
else {
//lock it back into place
$('.sphinxsidebarwrapper').css("position", "relative");
$('.sphinxsidebarwrapper').css("top",0)
}
// Highlight the current section
i = 0;
current_section = 0;
$('a.internal').removeClass('active');
for(i in sections) {
if(sections[i] > pos) {
break
}
if($('a.internal[href$="' + i + '"]').is(':visible')){
current_section = i
}
}
$('a.internal[href$="' + current_section + '"]').addClass('active');
$('a.internal[href$="' + current_section + '"]').parent().addClass('active')
}
$(function () {
// Lock the table of content to a fixed position once we scroll enough
var tocOffset = $('.related-wrapper').outerHeight();
var marginTop = parseFloat($('.sphinxsidebarwrapper').css('margin-top').replace(/auto/, 0));
var top = $('.sphinxsidebarwrapper').offset().top - marginTop;
sections = {};
url = document.URL.replace(/#.*$/, "");
// Grab positions of our sections
$('.headerlink').each(function(){
sections[this.href.replace(url, '')] = $(this).offset().top - 50
});
updateSideBarPosition(top, tocOffset, sections);
$(window).scroll(function(event) {
updateSideBarPosition(top, tocOffset, sections)
});
$(window).resize(function(event) {
tocOffset = $('.related-wrapper').outerHeight();
updateSideBarPosition(top, tocOffset, sections)
});
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-41920728-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head><body>
<div id="logo-banner">
<div class="logo">
<a href="../index.html">
<img src="../_static/nilearn-logo.png" alt="Nilearn logo" border="0" />
</a>
</div>
<!-- A tag cloud to make it easy for people to find what they are
looking for -->
<div class="tags">
<ul>
<li>
<big><a href="decoding/plot_haxby_anova_svm.html">SVM</a></big>
</li>
<li>
<small><a href="../connectivity/parcellating.html">Ward
clustering</a></small>
</li>
<li>
<a href="../decoding/searchlight.html">Searchlight</a>
</li>
<li>
<big><a href="../connectivity/resting_state_networks.html">ICA</a></big>
</li>
<li>
<a href="../manipulating_images/data_preparation.html">Nifti IO</a>
</li>
<li>
<a href="../modules/reference.html#module-nilearn.datasets">Datasets</a>
</li>
</ul>
</div>
<div class="banner">
<h1>Nilearn:</h1>
<h2>Statistics for NeuroImaging in Python</h2>
</div>
<div class="search_form">
<div class="gcse-search" id="cse" style="width: 100%;"></div>
<script>
(function() {
var cx = '017289614950330089114:elrt9qoutrq';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
</div>
</div>
<div class=related-wrapper>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../py-modindex.html" title="Python Module Index"
>modules</a></li>
<li class="right" >
<a href="plot_python_101.html" title="9.1.1. Basic numerics and plotting with Python"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="../modules/generated/nilearn.surface.vol_to_surf.html" title="8.15.3. nilearn.surface.vol_to_surf"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">Nilearn Home</a> | </li>
<li><a href="../user_guide.html">User Guide</a> | </li>
<li><a href="#">Examples</a> | </li>
<li><a href="../modules/reference.html">Reference</a> | </li>
<li id="navbar-about"><a href="../authors.html">About</a>| </li>
<li><a href="../glossary.html">Glossary</a>| </li>
<li><a href="../bibliography.html">Bibliography</a>| </li>
<li id="navbar-ecosystem"><a href="http://www.nipy.org/">Nipy ecosystem</a></li>
<li class="nav-item nav-item-1"><a href="../user_guide.html" accesskey="U">User guide: table of contents</a> »</li>
<li class="nav-item nav-item-this"><a href="">Nilearn: Statistical Analysis for NeuroImaging in Python</a></li>
</ul>
</div>
</div>
<div class="stable-banner">
This is the <em>stable</em> documentation for the latest release of Nilearn,
the current development version is available <a href="https://nilearn.github.io/dev/index.html">here</a>.
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="nilearn-usage-examples">
<span id="sphx-glr-auto-examples"></span><h1><span class="section-number">9. </span>Nilearn usage examples<a class="headerlink" href="#nilearn-usage-examples" title="Permalink to this headline">¶</a></h1>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>If you want to run the examples, make sure you execute them in a directory
where you have write permissions, or you copy the examples into such a
directory. If you install nilearn manually, make sure you have followed
<a class="reference internal" href="../introduction.html#installation"><span class="std std-ref">the instructions</span></a>.</p>
</div>
<div class="contents local topic" id="contents">
<p class="topic-title"><strong>Contents</strong></p>
<ul class="simple">
<li><p><a class="reference internal" href="#tutorial-examples" id="id95">Tutorial examples</a></p></li>
<li><p><a class="reference internal" href="#visualization-of-brain-images" id="id96">Visualization of brain images</a></p></li>
<li><p><a class="reference internal" href="#decoding-and-predicting-from-brain-images" id="id97">Decoding and predicting from brain images</a></p></li>
<li><p><a class="reference internal" href="#functional-connectivity" id="id98">Functional connectivity</a></p></li>
<li><p><a class="reference internal" href="#glm-first-level-analysis-examples" id="id99">GLM: First level analysis examples</a></p></li>
<li><p><a class="reference internal" href="#glm-second-level-analysis-examples" id="id100">GLM : Second level analysis examples</a></p></li>
<li><p><a class="reference internal" href="#manipulating-brain-image-volumes" id="id101">Manipulating brain image volumes</a></p></li>
<li><p><a class="reference internal" href="#advanced-statistical-analysis-of-brain-images" id="id102">Advanced statistical analysis of brain images</a></p></li>
</ul>
</div>
<div class="section" id="tutorial-examples">
<span id="id1"></span><h2><a class="toc-backref" href="#id95"><span class="section-number">9.1. </span>Tutorial examples</a><a class="headerlink" href="#tutorial-examples" title="Permalink to this headline">¶</a></h2>
<p>Introductory examples that teach how to use nilearn.</p>
<div class="sphx-glr-thumbcontainer" tooltip="A simple example of basic Python numerics and how to plot it."><div class="figure align-default" id="id2">
<img alt="Basic numerics and plotting with Python" src="../_images/sphx_glr_plot_python_101_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_python_101.html#sphx-glr-auto-examples-plot-python-101-py"><span class="std std-ref">Basic numerics and plotting with Python</span></a></span><a class="headerlink" href="#id2" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A simple example showing how to load an existing Nifti file and use basic nilearn functionaliti..."><div class="figure align-default" id="id3">
<img alt="Basic nilearn example: manipulating and looking at data" src="../_images/sphx_glr_plot_nilearn_101_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_nilearn_101.html#sphx-glr-auto-examples-plot-nilearn-101-py"><span class="std std-ref">Basic nilearn example: manipulating and looking at data</span></a></span><a class="headerlink" href="#id3" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we discover how to work with 3D and 4D niimgs."><div class="figure align-default" id="id4">
<img alt="3D and 4D niimgs: handling and visualizing" src="../_images/sphx_glr_plot_3d_and_4d_niimg_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_3d_and_4d_niimg.html#sphx-glr-auto-examples-plot-3d-and-4d-niimg-py"><span class="std std-ref">3D and 4D niimgs: handling and visualizing</span></a></span><a class="headerlink" href="#id4" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here is a simple tutorial on decoding with nilearn. It reproduces the Haxby 2001 study on a fac..."><div class="figure align-default" id="id5">
<img alt="A introduction tutorial to fMRI decoding" src="../_images/sphx_glr_plot_decoding_tutorial_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_decoding_tutorial.html#sphx-glr-auto-examples-plot-decoding-tutorial-py"><span class="std std-ref">A introduction tutorial to fMRI decoding</span></a></span><a class="headerlink" href="#id5" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this tutorial, we use a General Linear Model (:term:`GLM`) to compare the fMRI signal during..."><div class="figure align-default" id="id6">
<img alt="Intro to GLM Analysis: a single-session, single-subject fMRI dataset" src="../_images/sphx_glr_plot_single_subject_single_run_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="plot_single_subject_single_run.html#sphx-glr-auto-examples-plot-single-subject-single-run-py"><span class="std std-ref">Intro to GLM Analysis: a single-session, single-subject fMRI dataset</span></a></span><a class="headerlink" href="#id6" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="visualization-of-brain-images">
<span id="sphx-glr-auto-examples-01-plotting"></span><h2><a class="toc-backref" href="#id96"><span class="section-number">9.2. </span>Visualization of brain images</a><a class="headerlink" href="#visualization-of-brain-images" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="../plotting/index.html#plotting"><span class="std std-ref">Plotting brain images</span></a> for more details.</p>
<div class="sphx-glr-thumbcontainer" tooltip="See plotting for more plotting functionalities."><div class="figure align-default" id="id7">
<img alt="Glass brain plotting in nilearn" src="../_images/sphx_glr_plot_demo_glass_brain_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_demo_glass_brain.html#sphx-glr-auto-examples-01-plotting-plot-demo-glass-brain-py"><span class="std std-ref">Glass brain plotting in nilearn</span></a></span><a class="headerlink" href="#id7" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to fetch network matrices data from HCP beta-release of the Functional C..."><div class="figure align-default" id="id8">
<img alt="Visualizing Megatrawls Network Matrices from Human Connectome Project" src="../_images/sphx_glr_plot_visualize_megatrawls_netmats_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_visualize_megatrawls_netmats.html#sphx-glr-auto-examples-01-plotting-plot-visualize-megatrawls-netmats-py"><span class="std std-ref">Visualizing Megatrawls Network Matrices from Human Connectome Project</span></a></span><a class="headerlink" href="#id8" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Plot the regions of a reference atlas (Harvard-Oxford and Juelich atlases)."><div class="figure align-default" id="id9">
<img alt="Basic Atlas plotting" src="../_images/sphx_glr_plot_atlas_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_atlas.html#sphx-glr-auto-examples-01-plotting-plot-atlas-py"><span class="std std-ref">Basic Atlas plotting</span></a></span><a class="headerlink" href="#id9" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to download and fetch brain parcellations of multiple networks using nil..."><div class="figure align-default" id="id10">
<img alt="Visualizing multiscale functional brain parcellations" src="../_images/sphx_glr_plot_multiscale_parcellations_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_multiscale_parcellations.html#sphx-glr-auto-examples-01-plotting-plot-multiscale-parcellations-py"><span class="std std-ref">Visualizing multiscale functional brain parcellations</span></a></span><a class="headerlink" href="#id10" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Visualize HCP connectome workbench color maps shipped with Nilearn which can be used for plotti..."><div class="figure align-default" id="id11">
<img alt="Matplotlib colormaps in Nilearn" src="../_images/sphx_glr_plot_colormaps_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_colormaps.html#sphx-glr-auto-examples-01-plotting-plot-colormaps-py"><span class="std std-ref">Matplotlib colormaps in Nilearn</span></a></span><a class="headerlink" href="#id11" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Visualizing a probabilistic atlas requires visualizing the different maps that compose it."><div class="figure align-default" id="id12">
<img alt="Visualizing a probabilistic atlas: the default mode in the MSDL atlas" src="../_images/sphx_glr_plot_overlay_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_overlay.html#sphx-glr-auto-examples-01-plotting-plot-overlay-py"><span class="std std-ref">Visualizing a probabilistic atlas: the default mode in the MSDL atlas</span></a></span><a class="headerlink" href="#id12" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The dim argument controls the contrast of the background."><div class="figure align-default" id="id13">
<img alt="Controlling the contrast of the background when plotting" src="../_images/sphx_glr_plot_dim_plotting_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_dim_plotting.html#sphx-glr-auto-examples-01-plotting-plot-dim-plotting-py"><span class="std std-ref">Controlling the contrast of the background when plotting</span></a></span><a class="headerlink" href="#id13" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Simple example to show Nifti data visualization."><div class="figure align-default" id="id14">
<img alt="NeuroImaging volumes visualization" src="../_images/sphx_glr_plot_visualization_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_visualization.html#sphx-glr-auto-examples-01-plotting-plot-visualization-py"><span class="std std-ref">NeuroImaging volumes visualization</span></a></span><a class="headerlink" href="#id14" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A common quality control step for functional MRI data is to visualize the data over time in a c..."><div class="figure align-default" id="id15">
<img alt="Visualizing global patterns with a carpet plot" src="../_images/sphx_glr_plot_carpet_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_carpet.html#sphx-glr-auto-examples-01-plotting-plot-carpet-py"><span class="std std-ref">Visualizing global patterns with a carpet plot</span></a></span><a class="headerlink" href="#id15" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Small script to plot the masks of the Haxby dataset."><div class="figure align-default" id="id16">
<img alt="Plot Haxby masks" src="../_images/sphx_glr_plot_haxby_masks_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_haxby_masks.html#sphx-glr-auto-examples-01-plotting-plot-haxby-masks-py"><span class="std std-ref">Plot Haxby masks</span></a></span><a class="headerlink" href="#id16" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In nilearn, nilearn.surface.vol_to_surf allows us to measure values of a 3d volume at the nodes..."><div class="figure align-default" id="id17">
<img alt="Technical point: Illustration of the volume to surface sampling schemes" src="../_images/sphx_glr_plot_surface_projection_strategies_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_surface_projection_strategies.html#sphx-glr-auto-examples-01-plotting-plot-surface-projection-strategies-py"><span class="std std-ref">Technical point: Illustration of the volume to surface sampling schemes</span></a></span><a class="headerlink" href="#id17" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Nilearn comes with a set of plotting functions for easy visualization of Nifti-like images such..."><div class="figure align-default" id="id18">
<img alt="Plotting tools in nilearn" src="../_images/sphx_glr_plot_demo_plotting_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_demo_plotting.html#sphx-glr-auto-examples-01-plotting-plot-demo-plotting-py"><span class="std std-ref">Plotting tools in nilearn</span></a></span><a class="headerlink" href="#id18" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to visualize probabilistic atlases made of 4D images. There are 3 differ..."><div class="figure align-default" id="id19">
<img alt="Visualizing 4D probabilistic atlas maps" src="../_images/sphx_glr_plot_prob_atlas_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_prob_atlas.html#sphx-glr-auto-examples-01-plotting-plot-prob-atlas-py"><span class="std std-ref">Visualizing 4D probabilistic atlas maps</span></a></span><a class="headerlink" href="#id19" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The dataset that is a subset of the enhanced NKI Rockland sample (http://fcon_1000.projects.nit..."><div class="figure align-default" id="id20">
<img alt="Seed-based connectivity on the surface" src="../_images/sphx_glr_plot_surf_stat_map_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_surf_stat_map.html#sphx-glr-auto-examples-01-plotting-plot-surf-stat-map-py"><span class="std std-ref">Seed-based connectivity on the surface</span></a></span><a class="headerlink" href="#id20" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The Destrieux parcellation (Destrieux et al, 2010) in fsaverage5 space as distributed with Free..."><div class="figure align-default" id="id21">
<img alt="Loading and plotting of a cortical surface atlas" src="../_images/sphx_glr_plot_surf_atlas_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_surf_atlas.html#sphx-glr-auto-examples-01-plotting-plot-surf-atlas-py"><span class="std std-ref">Loading and plotting of a cortical surface atlas</span></a></span><a class="headerlink" href="#id21" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we will project a 3D statistical map onto a cortical mesh using vol_to_surf, d..."><div class="figure align-default" id="id22">
<img alt="Making a surface plot of a 3D statistical map" src="../_images/sphx_glr_plot_3d_map_to_surface_projection_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_3d_map_to_surface_projection.html#sphx-glr-auto-examples-01-plotting-plot-3d-map-to-surface-projection-py"><span class="std std-ref">Making a surface plot of a 3D statistical map</span></a></span><a class="headerlink" href="#id22" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The first part of this example goes through different options of the plot_glass_brain function ..."><div class="figure align-default" id="id23">
<img alt="Glass brain plotting in nilearn (all options)" src="../_images/sphx_glr_plot_demo_glass_brain_extensive_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_demo_glass_brain_extensive.html#sphx-glr-auto-examples-01-plotting-plot-demo-glass-brain-extensive-py"><span class="std std-ref">Glass brain plotting in nilearn (all options)</span></a></span><a class="headerlink" href="#id23" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we show how to use some plotting options available with plotting functions of ..."><div class="figure align-default" id="id24">
<img alt="More plotting tools from nilearn" src="../_images/sphx_glr_plot_demo_more_plotting_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="01_plotting/plot_demo_more_plotting.html#sphx-glr-auto-examples-01-plotting-plot-demo-more-plotting-py"><span class="std std-ref">More plotting tools from nilearn</span></a></span><a class="headerlink" href="#id24" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="decoding-and-predicting-from-brain-images">
<span id="sphx-glr-auto-examples-02-decoding"></span><h2><a class="toc-backref" href="#id97"><span class="section-number">9.3. </span>Decoding and predicting from brain images</a><a class="headerlink" href="#decoding-and-predicting-from-brain-images" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="../decoding/index.html#decoding"><span class="std std-ref">Decoding and MVPA: predicting from brain images</span></a> for more details.</p>
<div class="sphx-glr-thumbcontainer" tooltip="In this script we plot an overview of the stimuli used in "Distributed and Overlapping Represen..."><div class="figure align-default" id="id25">
<img alt="Show stimuli of Haxby et al. dataset" src="../_images/sphx_glr_plot_haxby_stimuli_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_stimuli.html#sphx-glr-auto-examples-02-decoding-plot-haxby-stimuli-py"><span class="std std-ref">Show stimuli of Haxby et al. dataset</span></a></span><a class="headerlink" href="#id25" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, we use fast ensembling of regularized models (FREM) to solve a regression prob..."><div class="figure align-default" id="id26">
<img alt="FREM on Jimura et al "mixed gambles" dataset." src="../_images/sphx_glr_plot_mixed_gambles_frem_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_mixed_gambles_frem.html#sphx-glr-auto-examples-02-decoding-plot-mixed-gambles-frem-py"><span class="std std-ref">FREM on Jimura et al “mixed gambles” dataset.</span></a></span><a class="headerlink" href="#id26" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example uses fast ensembling of regularized models (FREM) to decode a face vs house discri..."><div class="figure align-default" id="id27">
<img alt="Decoding with FREM: face vs house object recognition" src="../_images/sphx_glr_plot_haxby_frem_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_frem.html#sphx-glr-auto-examples-02-decoding-plot-haxby-frem-py"><span class="std std-ref">Decoding with FREM: face vs house object recognition</span></a></span><a class="headerlink" href="#id27" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Predicting age from gray-matter concentration maps from OASIS dataset. Note that age is a conti..."><div class="figure align-default" id="id28">
<img alt="Voxel-Based Morphometry on Oasis dataset with Space-Net prior" src="../_images/sphx_glr_plot_oasis_vbm_space_net_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_oasis_vbm_space_net.html#sphx-glr-auto-examples-02-decoding-plot-oasis-vbm-space-net-py"><span class="std std-ref">Voxel-Based Morphometry on Oasis dataset with Space-Net prior</span></a></span><a class="headerlink" href="#id28" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example does a simple but efficient decoding on the Haxby dataset: using a feature selecti..."><div class="figure align-default" id="id29">
<img alt="Decoding with ANOVA + SVM: face vs house in the Haxby dataset" src="../_images/sphx_glr_plot_haxby_anova_svm_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_anova_svm.html#sphx-glr-auto-examples-02-decoding-plot-haxby-anova-svm-py"><span class="std std-ref">Decoding with ANOVA + SVM: face vs house in the Haxby dataset</span></a></span><a class="headerlink" href="#id29" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This is a demo for surface-based searchlight decoding, as described in: Chen, Y., Namburi, P., ..."><div class="figure align-default" id="id30">
<img alt="Cortical surface-based searchlight decoding" src="../_images/sphx_glr_plot_haxby_searchlight_surface_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_searchlight_surface.html#sphx-glr-auto-examples-02-decoding-plot-haxby-searchlight-surface-py"><span class="std std-ref">Cortical surface-based searchlight decoding</span></a></span><a class="headerlink" href="#id30" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="We compare one vs all and one vs one multi-class strategies: the overall cross-validated accura..."><div class="figure align-default" id="id31">
<img alt="The haxby dataset: different multi-class strategies" src="../_images/sphx_glr_plot_haxby_multiclass_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_multiclass.html#sphx-glr-auto-examples-02-decoding-plot-haxby-multiclass-py"><span class="std std-ref">The haxby dataset: different multi-class strategies</span></a></span><a class="headerlink" href="#id31" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Searchlight analysis requires fitting a classifier a large amount of times. As a result, it is ..."><div class="figure align-default" id="id32">
<img alt="Searchlight analysis of face vs house recognition" src="../_images/sphx_glr_plot_haxby_searchlight_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_searchlight.html#sphx-glr-auto-examples-02-decoding-plot-haxby-searchlight-py"><span class="std std-ref">Searchlight analysis of face vs house recognition</span></a></span><a class="headerlink" href="#id32" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Full step-by-step example of fitting a GLM to perform a decoding experiment. We use the data fr..."><div class="figure align-default" id="id33">
<img alt="Decoding of a dataset after GLM fit for signal extraction" src="../_images/sphx_glr_plot_haxby_glm_decoding_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_glm_decoding.html#sphx-glr-auto-examples-02-decoding-plot-haxby-glm-decoding-py"><span class="std std-ref">Decoding of a dataset after GLM fit for signal extraction</span></a></span><a class="headerlink" href="#id33" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we set the number of features selected in an Anova-SVC approach to maximize the cross-vali..."><div class="figure align-default" id="id34">
<img alt="Setting a parameter by cross-validation" src="../_images/sphx_glr_plot_haxby_grid_search_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_grid_search.html#sphx-glr-auto-examples-02-decoding-plot-haxby-grid-search-py"><span class="std std-ref">Setting a parameter by cross-validation</span></a></span><a class="headerlink" href="#id34" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this script we reproduce the data analysis conducted by Haxby et al. in "Distributed and Ove..."><div class="figure align-default" id="id35">
<img alt="ROI-based decoding analysis in Haxby et al. dataset" src="../_images/sphx_glr_plot_haxby_full_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_full_analysis.html#sphx-glr-auto-examples-02-decoding-plot-haxby-full-analysis-py"><span class="std std-ref">ROI-based decoding analysis in Haxby et al. dataset</span></a></span><a class="headerlink" href="#id35" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we compare different classifiers on a visual object recognition decoding task."><div class="figure align-default" id="id36">
<img alt="Different classifiers in decoding the Haxby dataset" src="../_images/sphx_glr_plot_haxby_different_estimators_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_haxby_different_estimators.html#sphx-glr-auto-examples-02-decoding-plot-haxby-different-estimators-py"><span class="std std-ref">Different classifiers in decoding the Haxby dataset</span></a></span><a class="headerlink" href="#id36" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example uses Voxel-Based Morphometry (VBM) to study the relationship between aging and gra..."><div class="figure align-default" id="id37">
<img alt="Voxel-Based Morphometry on Oasis dataset" src="../_images/sphx_glr_plot_oasis_vbm_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_oasis_vbm.html#sphx-glr-auto-examples-02-decoding-plot-oasis-vbm-py"><span class="std std-ref">Voxel-Based Morphometry on Oasis dataset</span></a></span><a class="headerlink" href="#id37" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example simulates data according to a very simple sketch of brain imaging data and applies..."><div class="figure align-default" id="id38">
<img alt="Example of pattern recognition on simulated data" src="../_images/sphx_glr_plot_simulated_data_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_simulated_data.html#sphx-glr-auto-examples-02-decoding-plot-simulated-data-py"><span class="std std-ref">Example of pattern recognition on simulated data</span></a></span><a class="headerlink" href="#id38" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example partly reproduces the encoding model presented in `Visual image reconstruction..."><div class="figure align-default" id="id39">
<img alt="Encoding models for visual stimuli from Miyawaki et al. 2008" src="../_images/sphx_glr_plot_miyawaki_encoding_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_miyawaki_encoding.html#sphx-glr-auto-examples-02-decoding-plot-miyawaki-encoding-py"><span class="std std-ref">Encoding models for visual stimuli from Miyawaki et al. 2008</span></a></span><a class="headerlink" href="#id39" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example reproduces the experiment presented in `Visual image reconstruction from human..."><div class="figure align-default" id="id40">
<img alt="Reconstruction of visual stimuli from Miyawaki et al. 2008" src="../_images/sphx_glr_plot_miyawaki_reconstruction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="02_decoding/plot_miyawaki_reconstruction.html#sphx-glr-auto-examples-02-decoding-plot-miyawaki-reconstruction-py"><span class="std std-ref">Reconstruction of visual stimuli from Miyawaki et al. 2008</span></a></span><a class="headerlink" href="#id40" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="functional-connectivity">
<span id="sphx-glr-auto-examples-03-connectivity"></span><h2><a class="toc-backref" href="#id98"><span class="section-number">9.4. </span>Functional connectivity</a><a class="headerlink" href="#functional-connectivity" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="../connectivity/parcellating.html#parcellating-brain"><span class="std std-ref">Clustering to parcellate the brain in regions</span></a>, <a class="reference internal" href="../connectivity/resting_state_networks.html#extracting-rsn"><span class="std std-ref">Extracting functional brain networks: ICA and related</span></a> or
<a class="reference internal" href="../connectivity/functional_connectomes.html#functional-connectomes"><span class="std std-ref">Extracting times series to build a functional connectome</span></a> for more details.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example extracts the signal on regions defined via a probabilistic atlas, to construct a f..."><div class="figure align-default" id="id41">
<img alt="Extracting signals of a probabilistic atlas of functional regions" src="../_images/sphx_glr_plot_probabilistic_atlas_extraction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_probabilistic_atlas_extraction.html#sphx-glr-auto-examples-03-connectivity-plot-probabilistic-atlas-extraction-py"><span class="std std-ref">Extracting signals of a probabilistic atlas of functional regions</span></a></span><a class="headerlink" href="#id41" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example constructs a functional connectome using the sparse inverse covariance."><div class="figure align-default" id="id42">
<img alt="Computing a connectome with sparse inverse covariance" src="../_images/sphx_glr_plot_inverse_covariance_connectome_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_inverse_covariance_connectome.html#sphx-glr-auto-examples-03-connectivity-plot-inverse-covariance-connectome-py"><span class="std std-ref">Computing a connectome with sparse inverse covariance</span></a></span><a class="headerlink" href="#id42" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows a comparison of graph lasso and group-sparse covariance estimation of connec..."><div class="figure align-default" id="id43">
<img alt="Connectivity structure estimation on simulated data" src="../_images/sphx_glr_plot_simulated_connectome_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_simulated_connectome.html#sphx-glr-auto-examples-03-connectivity-plot-simulated-connectome-py"><span class="std std-ref">Connectivity structure estimation on simulated data</span></a></span><a class="headerlink" href="#id43" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Various approaches exist to derive spatial maps or networks from group fmr data. The methods ex..."><div class="figure align-default" id="id44">
<img alt="Deriving spatial maps from group fMRI data using ICA and Dictionary Learning" src="../_images/sphx_glr_plot_compare_decomposition_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_compare_decomposition.html#sphx-glr-auto-examples-03-connectivity-plot-compare-decomposition-py"><span class="std std-ref">Deriving spatial maps from group fMRI data using ICA and Dictionary Learning</span></a></span><a class="headerlink" href="#id44" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to produce seed-to-:term:`voxel` correlation maps for a single subject b..."><div class="figure align-default" id="id45">
<img alt="Producing single subject maps of seed-to-voxel correlation" src="../_images/sphx_glr_plot_seed_to_voxel_correlation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_seed_to_voxel_correlation.html#sphx-glr-auto-examples-03-connectivity-plot-seed-to-voxel-correlation-py"><span class="std std-ref">Producing single subject maps of seed-to-voxel correlation</span></a></span><a class="headerlink" href="#id45" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to estimate a connectome on a group of subjects using the group sparse i..."><div class="figure align-default" id="id46">
<img alt="Group Sparse inverse covariance for multi-subject connectome" src="../_images/sphx_glr_plot_multi_subject_connectome_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_multi_subject_connectome.html#sphx-glr-auto-examples-03-connectivity-plot-multi-subject-connectome-py"><span class="std std-ref">Group Sparse inverse covariance for multi-subject connectome</span></a></span><a class="headerlink" href="#id46" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use nilearn.regions.RegionExtractor to extract spatially constrained ..."><div class="figure align-default" id="id47">
<img alt="Regions extraction using :term:`Dictionary learning` and functional connectomes" src="../_images/sphx_glr_plot_extract_regions_dictlearning_maps_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_extract_regions_dictlearning_maps.html#sphx-glr-auto-examples-03-connectivity-plot-extract-regions-dictlearning-maps-py"><span class="std std-ref">Regions extraction using Dictionary learning and functional connectomes</span></a></span><a class="headerlink" href="#id47" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This examples shows how to turn a parcellation into connectome for visualization. This requires..."><div class="figure align-default" id="id48">
<img alt="Comparing connectomes on different reference atlases" src="../_images/sphx_glr_plot_atlas_comparison_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_atlas_comparison.html#sphx-glr-auto-examples-03-connectivity-plot-atlas-comparison-py"><span class="std std-ref">Comparing connectomes on different reference atlases</span></a></span><a class="headerlink" href="#id48" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example compares different kinds of functional connectivity between regions of interest : ..."><div class="figure align-default" id="id49">
<img alt="Classification of age groups using functional connectivity" src="../_images/sphx_glr_plot_group_level_connectivity_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_group_level_connectivity.html#sphx-glr-auto-examples-03-connectivity-plot-group-level-connectivity-py"><span class="std std-ref">Classification of age groups using functional connectivity</span></a></span><a class="headerlink" href="#id49" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we show how to extract signals from a brain parcellation and compute a correlation matrix."><div class="figure align-default" id="id50">
<img alt="Extracting signals from a brain parcellation" src="../_images/sphx_glr_plot_signal_extraction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_signal_extraction.html#sphx-glr-auto-examples-03-connectivity-plot-signal-extraction-py"><span class="std std-ref">Extracting signals from a brain parcellation</span></a></span><a class="headerlink" href="#id50" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to extract signals from spherical regions. We show how to build spheres ..."><div class="figure align-default" id="id51">
<img alt="Extract signals on spheres and plot a connectome" src="../_images/sphx_glr_plot_sphere_based_connectome_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_sphere_based_connectome.html#sphx-glr-auto-examples-03-connectivity-plot-sphere-based-connectome-py"><span class="std std-ref">Extract signals on spheres and plot a connectome</span></a></span><a class="headerlink" href="#id51" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="We use spatially-constrained Ward-clustering, KMeans, Hierarchical KMeans and Recursive Neighbo..."><div class="figure align-default" id="id52">
<img alt="Clustering methods to learn a brain parcellation from fMRI" src="../_images/sphx_glr_plot_data_driven_parcellations_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="03_connectivity/plot_data_driven_parcellations.html#sphx-glr-auto-examples-03-connectivity-plot-data-driven-parcellations-py"><span class="std std-ref">Clustering methods to learn a brain parcellation from fMRI</span></a></span><a class="headerlink" href="#id52" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="glm-first-level-analysis-examples">
<span id="sphx-glr-auto-examples-04-glm-first-level"></span><h2><a class="toc-backref" href="#id99"><span class="section-number">9.5. </span>GLM: First level analysis examples</a><a class="headerlink" href="#glm-first-level-analysis-examples" title="Permalink to this headline">¶</a></h2>
<p>These are examples focused on showcasing first level models functionality and single subject analysis.</p>
<p>See <a class="reference internal" href="../glm/index.html#glm"><span class="std std-ref">Analyzing fMRI using GLMs</span></a> for more details.</p>
<div class="sphx-glr-thumbcontainer" tooltip="Create a BIDS-compatible events.tsv file from onset/trial-type information."><div class="figure align-default" id="id53">
<img alt="Generate an events.tsv file for the NeuroSpin localizer task" src="../_images/sphx_glr_plot_write_events_file_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_write_events_file.html#sphx-glr-auto-examples-04-glm-first-level-plot-write-events-file-py"><span class="std std-ref">Generate an events.tsv file for the NeuroSpin localizer task</span></a></span><a class="headerlink" href="#id53" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example illustrates how to run a fixed effects model based on pre-computed statistics. Thi..."><div class="figure align-default" id="id54">
<img alt="Example of explicit fixed effects fMRI model fitting" src="../_images/sphx_glr_plot_fixed_effects_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_fixed_effects.html#sphx-glr-auto-examples-04-glm-first-level-plot-fixed-effects-py"><span class="std std-ref">Example of explicit fixed effects fMRI model fitting</span></a></span><a class="headerlink" href="#id54" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows a full step-by-step workflow of fitting a GLM to data extracted from a seed ..."><div class="figure align-default" id="id55">
<img alt="Default Mode Network extraction of AHDH dataset" src="../_images/sphx_glr_plot_adhd_dmn_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_adhd_dmn.html#sphx-glr-auto-examples-04-glm-first-level-plot-adhd-dmn-py"><span class="std std-ref">Default Mode Network extraction of AHDH dataset</span></a></span><a class="headerlink" href="#id55" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Three examples of design matrices specification and computation for first-level fMRI data analy..."><div class="figure align-default" id="id56">
<img alt="Examples of design matrices" src="../_images/sphx_glr_plot_design_matrix_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_design_matrix.html#sphx-glr-auto-examples-04-glm-first-level-plot-design-matrix-py"><span class="std std-ref">Examples of design matrices</span></a></span><a class="headerlink" href="#id56" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="FIR models are used to estimate the hemodyamic response non-parametrically. The example below s..."><div class="figure align-default" id="id57">
<img alt="Analysis of an fMRI dataset with a Finite Impule Response (FIR) model" src="../_images/sphx_glr_plot_fir_model_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_fir_model.html#sphx-glr-auto-examples-04-glm-first-level-plot-fir-model-py"><span class="std std-ref">Analysis of an fMRI dataset with a Finite Impule Response (FIR) model</span></a></span><a class="headerlink" href="#id57" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The example shows the analysis of an SPM dataset studying face perception. The analysis is per..."><div class="figure align-default" id="id58">
<img alt="Single-subject data (two sessions) in native space" src="../_images/sphx_glr_plot_spm_multimodal_faces_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_spm_multimodal_faces.html#sphx-glr-auto-examples-04-glm-first-level-plot-spm-multimodal-faces-py"><span class="std std-ref">Single-subject data (two sessions) in native space</span></a></span><a class="headerlink" href="#id58" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Within this example we are going to plot the hemodynamic response function (:term:`HRF`) model ..."><div class="figure align-default" id="id59">
<img alt="Example of MRI response functions" src="../_images/sphx_glr_plot_hrf_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_hrf.html#sphx-glr-auto-examples-04-glm-first-level-plot-hrf-py"><span class="std std-ref">Example of MRI response functions</span></a></span><a class="headerlink" href="#id59" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here, we will go through a full step-by-step example of fitting a GLM to experimental data and ..."><div class="figure align-default" id="id60">
<img alt="Simple example of two-session fMRI model fitting" src="../_images/sphx_glr_plot_fiac_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_fiac_analysis.html#sphx-glr-auto-examples-04-glm-first-level-plot-fiac-analysis-py"><span class="std std-ref">Simple example of two-session fMRI model fitting</span></a></span><a class="headerlink" href="#id60" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip=" Full step-by-step example of fitting a GLM to perform a first level analysis in an openneuro B..."><div class="figure align-default" id="id61">
<img alt="First level analysis of a complete BIDS dataset from openneuro" src="../_images/sphx_glr_plot_bids_features_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_bids_features.html#sphx-glr-auto-examples-04-glm-first-level-plot-bids-features-py"><span class="std std-ref">First level analysis of a complete BIDS dataset from openneuro</span></a></span><a class="headerlink" href="#id61" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we fit a First Level GLM with the minimize_memory-argument set to False. By doing so, the ..."><div class="figure align-default" id="id62">
<img alt="Predicted time series and residuals" src="../_images/sphx_glr_plot_predictions_residuals_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_predictions_residuals.html#sphx-glr-auto-examples-04-glm-first-level-plot-predictions-residuals-py"><span class="std std-ref">Predicted time series and residuals</span></a></span><a class="headerlink" href="#id62" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A full step-by-step example of fitting a GLM to experimental data sampled on the cortical surfa..."><div class="figure align-default" id="id63">
<img alt="Example of surface-based first-level analysis" src="../_images/sphx_glr_plot_localizer_surface_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_localizer_surface_analysis.html#sphx-glr-auto-examples-04-glm-first-level-plot-localizer-surface-analysis-py"><span class="std std-ref">Example of surface-based first-level analysis</span></a></span><a class="headerlink" href="#id63" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this tutorial, we study how first-level models are parametrized for fMRI data analysis and c..."><div class="figure align-default" id="id64">
<img alt="Understanding parameters of the first-level model" src="../_images/sphx_glr_plot_first_level_details_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="04_glm_first_level/plot_first_level_details.html#sphx-glr-auto-examples-04-glm-first-level-plot-first-level-details-py"><span class="std std-ref">Understanding parameters of the first-level model</span></a></span><a class="headerlink" href="#id64" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="glm-second-level-analysis-examples">
<span id="sphx-glr-auto-examples-05-glm-second-level"></span><h2><a class="toc-backref" href="#id100"><span class="section-number">9.6. </span>GLM : Second level analysis examples</a><a class="headerlink" href="#glm-second-level-analysis-examples" title="Permalink to this headline">¶</a></h2>
<p>These are examples focused on showcasing second level models functionality and group level analysis.</p>
<p>See <a class="reference internal" href="../glm/index.html#glm"><span class="std std-ref">Analyzing fMRI using GLMs</span></a> for more details.</p>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how a second-level design matrix is specified: assuming that the data refer ..."><div class="figure align-default" id="id65">
<img alt="Example of second level design matrix" src="../_images/sphx_glr_plot_second_level_design_matrix_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_second_level_design_matrix.html#sphx-glr-auto-examples-05-glm-second-level-plot-second-level-design-matrix-py"><span class="std std-ref">Example of second level design matrix</span></a></span><a class="headerlink" href="#id65" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This script showcases the so-called "All resolution inference" procedure, in which the proporti..."><div class="figure align-default" id="id66">
<img alt="Second-level fMRI model: true positive proportion in clusters" src="../_images/sphx_glr_plot_proportion_activated_voxels_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_proportion_activated_voxels.html#sphx-glr-auto-examples-05-glm-second-level-plot-proportion-activated-voxels-py"><span class="std std-ref">Second-level fMRI model: true positive proportion in clusters</span></a></span><a class="headerlink" href="#id66" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Perform a one-sample t-test on a bunch of images (a.k.a. second-level analysis in fMRI) and thr..."><div class="figure align-default" id="id67">
<img alt="Statistical testing of a second-level analysis" src="../_images/sphx_glr_plot_thresholding_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_thresholding.html#sphx-glr-auto-examples-05-glm-second-level-plot-thresholding-py"><span class="std std-ref">Statistical testing of a second-level analysis</span></a></span><a class="headerlink" href="#id67" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example uses Voxel-Based Morphometry (VBM) to study the relationship between aging, sex an..."><div class="figure align-default" id="id68">
<img alt="Voxel-Based Morphometry on Oasis dataset" src="../_images/sphx_glr_plot_oasis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_oasis.html#sphx-glr-auto-examples-05-glm-second-level-plot-oasis-py"><span class="std std-ref">Voxel-Based Morphometry on Oasis dataset</span></a></span><a class="headerlink" href="#id68" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Full step-by-step example of fitting a GLM to perform a second level analysis in experimental d..."><div class="figure align-default" id="id69">
<img alt="Second-level fMRI model: two-sample test, unpaired and paired" src="../_images/sphx_glr_plot_second_level_two_sample_test_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_second_level_two_sample_test.html#sphx-glr-auto-examples-05-glm-second-level-plot-second-level-two-sample-test-py"><span class="std std-ref">Second-level fMRI model: two-sample test, unpaired and paired</span></a></span><a class="headerlink" href="#id69" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Full step-by-step example of fitting a GLM to perform a second-level analysis (one-sample test)..."><div class="figure align-default" id="id70">
<img alt="Second-level fMRI model: one sample test" src="../_images/sphx_glr_plot_second_level_one_sample_test_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_second_level_one_sample_test.html#sphx-glr-auto-examples-05-glm-second-level-plot-second-level-one-sample-test-py"><span class="std std-ref">Second-level fMRI model: one sample test</span></a></span><a class="headerlink" href="#id70" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows the results obtained in a group analysis using a more complex contrast than ..."><div class="figure align-default" id="id71">
<img alt="Example of generic design in second-level models" src="../_images/sphx_glr_plot_second_level_association_test_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="05_glm_second_level/plot_second_level_association_test.html#sphx-glr-auto-examples-05-glm-second-level-plot-second-level-association-test-py"><span class="std std-ref">Example of generic design in second-level models</span></a></span><a class="headerlink" href="#id71" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="manipulating-brain-image-volumes">
<span id="sphx-glr-auto-examples-06-manipulating-images"></span><h2><a class="toc-backref" href="#id101"><span class="section-number">9.7. </span>Manipulating brain image volumes</a><a class="headerlink" href="#manipulating-brain-image-volumes" title="Permalink to this headline">¶</a></h2>
<p>See <a class="reference internal" href="../manipulating_images/manipulating_images.html#data-manipulation"><span class="std std-ref">Manipulating images: resampling, smoothing, masking, ROIs…</span></a> for more details.</p>
<div class="sphx-glr-thumbcontainer" tooltip="The goal of this example is to illustrate the use of the function nilearn.image.math_img on T-m..."><div class="figure align-default" id="id72">
<img alt="Negating an image with math_img" src="../_images/sphx_glr_plot_negate_image_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_negate_image.html#sphx-glr-auto-examples-06-manipulating-images-plot-negate-image-py"><span class="std std-ref">Negating an image with math_img</span></a></span><a class="headerlink" href="#id72" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The goal of this example is to illustrate the use of the function nilearn.image.math_img with a..."><div class="figure align-default" id="id73">
<img alt="Comparing the means of 2 images" src="../_images/sphx_glr_plot_compare_mean_image_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_compare_mean_image.html#sphx-glr-auto-examples-06-manipulating-images-plot-compare-mean-image-py"><span class="std std-ref">Comparing the means of 2 images</span></a></span><a class="headerlink" href="#id73" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here we smooth a mean EPI image and plot the result"><div class="figure align-default" id="id74">
<img alt="Smoothing an image" src="../_images/sphx_glr_plot_smooth_mean_image_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_smooth_mean_image.html#sphx-glr-auto-examples-06-manipulating-images-plot-smooth-mean-image-py"><span class="std std-ref">Smoothing an image</span></a></span><a class="headerlink" href="#id74" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This simple example shows how to extract regions from Smith atlas resting state networks."><div class="figure align-default" id="id75">
<img alt="Regions Extraction of Default Mode Networks using Smith Atlas" src="../_images/sphx_glr_plot_extract_rois_smith_atlas_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_extract_rois_smith_atlas.html#sphx-glr-auto-examples-06-manipulating-images-plot-extract-rois-smith-atlas-py"><span class="std std-ref">Regions Extraction of Default Mode Networks using Smith Atlas</span></a></span><a class="headerlink" href="#id75" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use nilearn.regions.connected_label_regions to assign each spatially-..."><div class="figure align-default" id="id76">
<img alt="Breaking an atlas of labels in separated regions" src="../_images/sphx_glr_plot_extract_regions_labels_image_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_extract_regions_labels_image.html#sphx-glr-auto-examples-06-manipulating-images-plot-extract-regions-labels-image-py"><span class="std std-ref">Breaking an atlas of labels in separated regions</span></a></span><a class="headerlink" href="#id76" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="The goal of this example is to illustrate the use of the function nilearn.image.resample_to_img..."><div class="figure align-default" id="id77">
<img alt="Resample an image to a template" src="../_images/sphx_glr_plot_resample_to_template_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_resample_to_template.html#sphx-glr-auto-examples-06-manipulating-images-plot-resample-to-template-py"><span class="std std-ref">Resample an image to a template</span></a></span><a class="headerlink" href="#id77" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Here is a simple example of automatic mask computation using the nifti masker. The mask is comp..."><div class="figure align-default" id="id78">
<img alt="Simple example of NiftiMasker use" src="../_images/sphx_glr_plot_nifti_simple_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_nifti_simple.html#sphx-glr-auto-examples-06-manipulating-images-plot-nifti-simple-py"><span class="std std-ref">Simple example of NiftiMasker use</span></a></span><a class="headerlink" href="#id78" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This simple example shows how to extract signals from functional fMRI data and brain regions de..."><div class="figure align-default" id="id79">
<img alt="Extracting signals from brain regions using the NiftiLabelsMasker" src="../_images/sphx_glr_plot_nifti_labels_simple_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_nifti_labels_simple.html#sphx-glr-auto-examples-06-manipulating-images-plot-nifti-labels-simple-py"><span class="std std-ref">Extracting signals from brain regions using the NiftiLabelsMasker</span></a></span><a class="headerlink" href="#id79" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to extract regions or separate the regions from a statistical map."><div class="figure align-default" id="id80">
<img alt="Region Extraction using a t-statistical map (3D)" src="../_images/sphx_glr_plot_extract_rois_statistical_maps_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_extract_rois_statistical_maps.html#sphx-glr-auto-examples-06-manipulating-images-plot-extract-rois-statistical-maps-py"><span class="std std-ref">Region Extraction using a t-statistical map (3D)</span></a></span><a class="headerlink" href="#id80" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="In this example, the Nifti masker is used to automatically compute a mask."><div class="figure align-default" id="id81">
<img alt="Understanding NiftiMasker and mask computation" src="../_images/sphx_glr_plot_mask_computation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_mask_computation.html#sphx-glr-auto-examples-06-manipulating-images-plot-mask-computation-py"><span class="std std-ref">Understanding NiftiMasker and mask computation</span></a></span><a class="headerlink" href="#id81" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how an affine resampling works."><div class="figure align-default" id="id82">
<img alt="Visualization of affine resamplings" src="../_images/sphx_glr_plot_affine_transformation_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_affine_transformation.html#sphx-glr-auto-examples-06-manipulating-images-plot-affine-transformation-py"><span class="std std-ref">Visualization of affine resamplings</span></a></span><a class="headerlink" href="#id82" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows manual steps to create and further modify an ROI spatial mask. They represen..."><div class="figure align-default" id="id83">
<img alt="Computing a Region of Interest (ROI) mask manually" src="../_images/sphx_glr_plot_roi_extraction_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="06_manipulating_images/plot_roi_extraction.html#sphx-glr-auto-examples-06-manipulating-images-plot-roi-extraction-py"><span class="std std-ref">Computing a Region of Interest (ROI) mask manually</span></a></span><a class="headerlink" href="#id83" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div></div>
<div class="section" id="advanced-statistical-analysis-of-brain-images">
<span id="sphx-glr-auto-examples-07-advanced"></span><h2><a class="toc-backref" href="#id102"><span class="section-number">9.8. </span>Advanced statistical analysis of brain images</a><a class="headerlink" href="#advanced-statistical-analysis-of-brain-images" title="Permalink to this headline">¶</a></h2>
<div class="sphx-glr-thumbcontainer" tooltip=" This example is meant to demonstrate nilearn as a low-level tools used to combine feature extr..."><div class="figure align-default" id="id84">
<img alt="Multivariate decompositions: Independent component analysis of fMRI" src="../_images/sphx_glr_plot_ica_resting_state_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_ica_resting_state.html#sphx-glr-auto-examples-07-advanced-plot-ica-resting-state-py"><span class="std std-ref">Multivariate decompositions: Independent component analysis of fMRI</span></a></span><a class="headerlink" href="#id84" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to use the Localizer dataset in a basic analysis. A standard Anova is pe..."><div class="figure align-default" id="id85">
<img alt="Massively univariate analysis of a calculation task from the Localizer dataset" src="../_images/sphx_glr_plot_localizer_simple_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_localizer_simple_analysis.html#sphx-glr-auto-examples-07-advanced-plot-localizer-simple-analysis-py"><span class="std std-ref">Massively univariate analysis of a calculation task from the Localizer dataset</span></a></span><a class="headerlink" href="#id85" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip=" Full step-by-step example of fitting a GLM to perform a first and second level analysis in a B..."><div class="figure align-default" id="id86">
<img alt="BIDS dataset first and second level analysis" src="../_images/sphx_glr_plot_bids_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_bids_analysis.html#sphx-glr-auto-examples-07-advanced-plot-bids-analysis-py"><span class="std std-ref">BIDS dataset first and second level analysis</span></a></span><a class="headerlink" href="#id86" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example compares different kinds of functional connectivity between regions of interest : ..."><div class="figure align-default" id="id87">
<img alt="Functional connectivity predicts age group" src="../_images/sphx_glr_plot_age_group_prediction_cross_val_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_age_group_prediction_cross_val.html#sphx-glr-auto-examples-07-advanced-plot-age-group-prediction-cross-val-py"><span class="std std-ref">Functional connectivity predicts age group</span></a></span><a class="headerlink" href="#id87" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to download statistical maps from NeuroVault"><div class="figure align-default" id="id88">
<img alt="NeuroVault meta-analysis of stop-go paradigm studies." src="../_images/sphx_glr_plot_neurovault_meta_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_neurovault_meta_analysis.html#sphx-glr-auto-examples-07-advanced-plot-neurovault-meta-analysis-py"><span class="std std-ref">NeuroVault meta-analysis of stop-go paradigm studies.</span></a></span><a class="headerlink" href="#id88" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip=" Full step-by-step example of fitting a GLM (first and second level analysis) in a 10-subjects ..."><div class="figure align-default" id="id89">
<img alt="Surface-based dataset first and second level analysis of a dataset" src="../_images/sphx_glr_plot_surface_bids_analysis_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_surface_bids_analysis.html#sphx-glr-auto-examples-07-advanced-plot-surface-bids-analysis-py"><span class="std std-ref">Surface-based dataset first and second level analysis of a dataset</span></a></span><a class="headerlink" href="#id89" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows the results obtained in a massively univariate analysis performed at the int..."><div class="figure align-default" id="id90">
<img alt="Massively univariate analysis of a motor task from the Localizer dataset" src="../_images/sphx_glr_plot_localizer_mass_univariate_methods_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_localizer_mass_univariate_methods.html#sphx-glr-auto-examples-07-advanced-plot-localizer-mass-univariate-methods-py"><span class="std std-ref">Massively univariate analysis of a motor task from the Localizer dataset</span></a></span><a class="headerlink" href="#id90" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This example shows how to download statistical maps from NeuroVault, label them with NeuroSynth..."><div class="figure align-default" id="id91">
<img alt="NeuroVault cross-study ICA maps." src="../_images/sphx_glr_plot_ica_neurovault_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_ica_neurovault.html#sphx-glr-auto-examples-07-advanced-plot-ica-neurovault-py"><span class="std std-ref">NeuroVault cross-study ICA maps.</span></a></span><a class="headerlink" href="#id91" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="A permuted Ordinary Least Squares algorithm is run at each voxel in order to determine whether ..."><div class="figure align-default" id="id92">
<img alt="Massively univariate analysis of face vs house recognition" src="../_images/sphx_glr_plot_haxby_mass_univariate_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_haxby_mass_univariate.html#sphx-glr-auto-examples-07-advanced-plot-haxby-mass-univariate-py"><span class="std std-ref">Massively univariate analysis of face vs house recognition</span></a></span><a class="headerlink" href="#id92" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="This tutorial opens the box of decoding pipelines to bridge integrated functionalities provided..."><div class="figure align-default" id="id93">
<img alt="Advanced decoding using scikit learn" src="../_images/sphx_glr_plot_advanced_decoding_scikit_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_advanced_decoding_scikit.html#sphx-glr-auto-examples-07-advanced-plot-advanced-decoding-scikit-py"><span class="std std-ref">Advanced decoding using scikit learn</span></a></span><a class="headerlink" href="#id93" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-thumbcontainer" tooltip="Beta series models fit trial-wise conditions, which allow users to create "time series" of thes..."><div class="figure align-default" id="id94">
<img alt="Beta-Series Modeling for Task-Based Functional Connectivity and Decoding" src="../_images/sphx_glr_plot_beta_series_thumb.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="07_advanced/plot_beta_series.html#sphx-glr-auto-examples-07-advanced-plot-beta-series-py"><span class="std std-ref">Beta-Series Modeling for Task-Based Functional Connectivity and Decoding</span></a></span><a class="headerlink" href="#id94" title="Permalink to this image">¶</a></p>
</div>
</div><div class="toctree-wrapper compound">
</div>
<div class="sphx-glr-clear"></div><div class="sphx-glr-footer class sphx-glr-footer-gallery docutils container">
<div class="sphx-glr-download sphx-glr-download-python docutils container">
<p><a class="reference download internal" download="" href="../_downloads/07fcc19ba03226cd3d83d4e40ec44385/auto_examples_python.zip"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">all</span> <span class="pre">examples</span> <span class="pre">in</span> <span class="pre">Python</span> <span class="pre">source</span> <span class="pre">code:</span> <span class="pre">auto_examples_python.zip</span></code></a></p>
</div>
<div class="sphx-glr-download sphx-glr-download-jupyter docutils container">
<p><a class="reference download internal" download="" href="../_downloads/6f1e7a639e0699d6164445b55e6c116d/auto_examples_jupyter.zip"><code class="xref download docutils literal notranslate"><span class="pre">Download</span> <span class="pre">all</span> <span class="pre">examples</span> <span class="pre">in</span> <span class="pre">Jupyter</span> <span class="pre">notebooks:</span> <span class="pre">auto_examples_jupyter.zip</span></code></a></p>
</div>
</div>
<p class="sphx-glr-signature"><a class="reference external" href="https://sphinx-gallery.github.io">Gallery generated by Sphinx-Gallery</a></p>
</div>
</div>
<div class="clearer"></div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4> Giving credit </h4>
<ul class="simple">
<li><p>Please consider <a href="../authors.html#citing">citing the
papers</a>.</p></li>
</ul>
<h3><a href="../index.html">Table of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#">9. Nilearn usage examples</a><ul>
<li><a class="reference internal" href="#tutorial-examples">9.1. Tutorial examples</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#visualization-of-brain-images">9.2. Visualization of brain images</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#decoding-and-predicting-from-brain-images">9.3. Decoding and predicting from brain images</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#functional-connectivity">9.4. Functional connectivity</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#glm-first-level-analysis-examples">9.5. GLM: First level analysis examples</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#glm-second-level-analysis-examples">9.6. GLM : Second level analysis examples</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#manipulating-brain-image-volumes">9.7. Manipulating brain image volumes</a><ul>
</ul>
</li>
<li><a class="reference internal" href="#advanced-statistical-analysis-of-brain-images">9.8. Advanced statistical analysis of brain images</a><ul>
</ul>
</li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="../modules/generated/nilearn.surface.vol_to_surf.html"
title="previous chapter"><span class="section-number">8.15.3. </span>nilearn.surface.vol_to_surf</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="plot_python_101.html"
title="next chapter"><span class="section-number">9.1.1. </span>Basic numerics and plotting with Python</a></p>
<div id="searchbox" style="display: none" role="search">
<h3 id="searchlabel">Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<input type="text" name="q" aria-labelledby="searchlabel" />
<input type="submit" value="Go" />
</form>
</div>
</div>
<script>$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="footer">
© The nilearn developers 2010-2022.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 4.0.2.
<span style="padding-left: 5ex;">
<a href="../_sources/auto_examples/index.rst.txt"
rel="nofollow">Show this page source</a>
</span>
</div>
</body>
</html>