6
6
"source" : [
7
7
" <img align=\" left\" style=\" padding-right:10px; width:150px;\" src=\" https://mfr.osf.io/export?url=https://osf.io/q7ym9/?action=download%26direct%26mode=render&initialWidth=673&childId=mfrIframe&format=1200x1200.jpeg\" >\n " ,
8
8
" <font size=\" 1\" >\n " ,
9
- " This jupyter notebook provides a tutorial for [Mindboggle](http://mindboggle.info), and assumes that you have `` [1]`` entered the bash shell of a docker container from your $HOST (e.g., /Users/arno) and `` [2]`` that the notebook is running within the container:\n " ,
9
+ " This jupyter notebook provides a tutorial for [Mindboggle](http://mindboggle.info), and assumes that you have [1] entered the bash shell of a docker container from your \\ $HOST (e.g., /Users/arno) and [2] that the notebook is running within the container:\n " ,
10
10
" <br>\n " ,
11
- " [1] ``docker run --rm -ti -v $HOST:/home/jovyan/work -p 8888:8888 --entrypoint /bin/bash nipy/mindboggle``<br>\n " ,
12
- " [2] ``jupyter notebook /opt/mindboggle/docs/mindboggle_tutorial.ipynb``\n " ,
11
+ " [1] docker run --rm -ti -v \\ $HOST:/home/jovyan/work -p 8888:8888 --entrypoint /bin/bash nipy/mindboggle\n " ,
13
12
" <br>\n " ,
14
- " -- <a href=\" http://binarybottle.com\" >Arno Klein</a> and Anisha Keshavan (please refer to the [Mindboggle reference](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005350#sec007))\n " ,
13
+ " [2] jupyter notebook /opt/mindboggle/docs/mindboggle_tutorial.ipynb\n " ,
14
+ " <br>\n " ,
15
+ " -- <a href=\" http://binarybottle.com\" >Arno Klein</a> and Anisha Keshavan (please refer to the [Mindboggle reference](http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1005350#sec007))\n " ,
15
16
" </font>"
16
17
]
17
18
},
179
180
"cell_type" : " code" ,
180
181
"execution_count" : null ,
181
182
"metadata" : {
182
- "collapsed" : true ,
183
183
"scrolled" : false
184
184
},
185
185
"outputs" : [],
366
366
{
367
367
"cell_type" : " code" ,
368
368
"execution_count" : null ,
369
- "metadata" : {
370
- "collapsed" : true
371
- },
369
+ "metadata" : {},
372
370
"outputs" : [],
373
371
"source" : [
374
372
" ls /opt/conda/lib/python3.5/site-packages/nbpapaya/Papaya/release/current/standard/papaya.js"
375
373
]
376
374
},
377
- {
378
- "cell_type" : " code" ,
379
- "execution_count" : null ,
380
- "metadata" : {
381
- "collapsed" : true
382
- },
383
- "outputs" : [],
384
- "source" : [
385
- " from nbpapaya import Overlay\n " ,
386
- " Overlay"
387
- ]
388
- },
389
375
{
390
376
"cell_type" : " markdown" ,
391
377
"metadata" : {},
397
383
{
398
384
"cell_type" : " code" ,
399
385
"execution_count" : null ,
400
- "metadata" : {
401
- "collapsed" : true
402
- },
386
+ "metadata" : {},
403
387
"outputs" : [],
404
388
"source" : [
405
389
" from mindboggle.mio.plots import histograms_of_lists\n " ,
421
405
{
422
406
"cell_type" : " code" ,
423
407
"execution_count" : null ,
424
- "metadata" : {
425
- "collapsed" : true
426
- },
408
+ "metadata" : {},
427
409
"outputs" : [],
428
410
"source" : [
429
411
" from mindboggle.features.folds import find_depth_threshold\n " ,
443
425
{
444
426
"cell_type" : " code" ,
445
427
"execution_count" : null ,
446
- "metadata" : {
447
- "collapsed" : true
448
- },
428
+ "metadata" : {},
449
429
"outputs" : [],
450
430
"source" : [
451
431
" from mindboggle.features.folds import extract_folds\n " ,
493
473
"cell_type" : " code" ,
494
474
"execution_count" : null ,
495
475
"metadata" : {
496
- "collapsed" : true ,
497
476
"scrolled" : false
498
477
},
499
478
"outputs" : [],
500
479
"source" : [
480
+ " import numpy as np\n " ,
501
481
" just_folds = np.ones(len(folds))\n " ,
502
482
" df = pd.DataFrame(just_folds, columns=[\" folds\" ])\n " ,
503
483
" df.to_csv('folds.csv', index=False)\n " ,
573
553
"cell_type" : " code" ,
574
554
"execution_count" : null ,
575
555
"metadata" : {
576
- "collapsed" : true ,
577
556
"scrolled" : true
578
557
},
579
558
"outputs" : [],
591
570
" n_sulci"
592
571
]
593
572
},
573
+ {
574
+ "cell_type" : " markdown" ,
575
+ "metadata" : {},
576
+ "source" : [
577
+ " Remove all vertices but the sulci:"
578
+ ]
579
+ },
580
+ {
581
+ "cell_type" : " code" ,
582
+ "execution_count" : null ,
583
+ "metadata" : {},
584
+ "outputs" : [],
585
+ "source" : [
586
+ " #from mindboggle.mio.vtks import rewrite_scalars\n " ,
587
+ " #rewrite_scalars(input_vtk=depth_file,\n " ,
588
+ " # output_vtk='sulci_depth.vtk',\n " ,
589
+ " # new_scalars=[depths, sulci],\n " ,
590
+ " # new_scalar_names=['depth', 'sulci'],\n " ,
591
+ " # filter_scalars=sulci,\n " ,
592
+ " # background_value=1)"
593
+ ]
594
+ },
595
+ {
596
+ "cell_type" : " code" ,
597
+ "execution_count" : null ,
598
+ "metadata" : {},
599
+ "outputs" : [],
600
+ "source" : [
601
+ " #sulci_depths = [depths[i] for i,x in enumerate(depths) if sulci[i] != -1]"
602
+ ]
603
+ },
594
604
{
595
605
"cell_type" : " markdown" ,
596
606
"metadata" : {},
602
612
"cell_type" : " code" ,
603
613
"execution_count" : null ,
604
614
"metadata" : {
605
- "collapsed" : true ,
606
615
"scrolled" : false
607
616
},
608
617
"outputs" : [],
609
618
"source" : [
610
- " df = pd.DataFrame(sulci , columns=[\" sulci\" ])\n " ,
619
+ " df = pd.DataFrame(depths , columns=[\" sulci\" ])\n " ,
611
620
" df.to_csv('sulci.csv', index=False)\n " ,
612
- " MeshOpts = getMeshOpts('sulci.vtk' , \" sulci.csv\" , 1,10,1)\n " ,
621
+ " MeshOpts = getMeshOpts(sulci_file , \" sulci.csv\" , 1,10,1)\n " ,
613
622
" Overlay(MeshOpts)"
614
623
]
615
624
},
623
632
{
624
633
"cell_type" : " code" ,
625
634
"execution_count" : null ,
626
- "metadata" : {
627
- "collapsed" : true
628
- },
635
+ "metadata" : {},
629
636
"outputs" : [],
630
637
"source" : [
631
638
" from mindboggle.mio.tables import write_shape_stats\n " ,
653
660
{
654
661
"cell_type" : " code" ,
655
662
"execution_count" : null ,
656
- "metadata" : {
657
- "collapsed" : true
658
- },
663
+ "metadata" : {},
659
664
"outputs" : [],
660
665
"source" : [
661
666
" pd.read_csv(sulcus_table)"
673
678
"language_info" : {
674
679
"codemirror_mode" : {
675
680
"name" : " ipython" ,
676
- "version" : 3.0
681
+ "version" : 3
677
682
},
678
683
"file_extension" : " .py" ,
679
684
"mimetype" : " text/x-python" ,
684
689
}
685
690
},
686
691
"nbformat" : 4 ,
687
- "nbformat_minor" : 0
688
- }
692
+ "nbformat_minor" : 1
693
+ }
0 commit comments