@@ -40,32 +40,41 @@ please refer to the [documentation](https://teanijarv.github.io/yabplot/) for mo
4040import yabplot as yab
4141import numpy as np
4242
43- # see available cortical atlases
44- atlases = yab.get_available_resources(category = ' cortical' )
45-
46- # see the region names within the aseg atlas
47- regions = yab.get_atlas_regions(atlas = ' aseg' , category = ' subcortical' )
48-
49- # plot data on cortical regions
50- data = np.arange(0 , 1 , 0.001 )
51- yab.plot_cortical(data = data, atlas = ' schaefer_1000' , figsize = (600 , 300 ),
52- cmap = ' viridis' , vminmax = [0 , 1 ], style = ' default' ,
53- views = [' left_lateral' , ' superior' , ' right_lateral' ])
54-
55-
56- # plot values for specific subcortical regions
57- data = {' Left_Amygdala' : 0.8 , ' Right_Hippocampus' : 0.5 ,
58- ' Right_Thalamus' : - 0.5 , ' Left_Putamen' : - 1 }
59- yab.plot_subcortical(data = data, atlas = ' aseg' , figsize = (600 , 450 ), layout = (2 , 2 ),
60- views = [' superior' , ' anterior' , ' left_lateral' , ' right_lateral' ],
61- cmap = ' coolwarm' , vminmax = [- 1 , 1 ], style = ' matte' )
62-
63- # plot data on white matter bundles
64- regions = yab.get_atlas_regions(atlas = ' xtract_tiny' , category = ' tracts' )
65- data = np.arange(0 , len (regions))
66- yab.plot_tracts(data = data, atlas = ' xtract_tiny' , figsize = (600 , 300 ),
67- views = [' superior' , ' anterior' , ' left_lateral' ], nan_color = ' #cccccc' ,
68- bmesh_type = ' fsaverage' , style = ' default' , cmap = ' plasma' )
43+ # check that you have the latest version
44+ print (yab.__version__ )
45+
46+ # see available atlases and brain meshes
47+ print (yab.get_available_resources())
48+
49+ # see the region names for a specific atlas
50+ print (yab.get_atlas_regions(atlas = ' aseg' , category = ' subcortical' ))
51+
52+ # cortical surfaces
53+ atlas = ' aparc'
54+ dmap1 = {' L_lateraloccipital' : 0.265 , ' L_postcentral' : 0.086 , ... }
55+ dmap2 = {' L_fusiform' : 0.218 , ' L_supramarginal' : 0.119 , ... }
56+ yab.plot_cortical(data = dmap1, atlas = atlas, vminmax = [- 0.1 , 0.3 ],
57+ bmesh_type = ' midthickness' , views = [' left_lateral' , ' left_medial' ],
58+ figsize = (600 , 300 ), cmap = ' viridis' , proc_vertices = ' sharp' )
59+ yab.plot_cortical(data = dmap2, atlas = atlas, vminmax = [- 0.1 , 0.3 ],
60+ bmesh_type = ' swm' , views = [' left_lateral' , ' left_medial' ],
61+ figsize = (1200 , 600 ), cmap = ' viridis' , proc_vertices = ' sharp' )
62+
63+ # subcortical structures
64+ atlas = ' aseg'
65+ regs = yab.get_atlas_regions(atlas = atlas, category = ' subcortical' )
66+ data = np.arange(1 , len (regs)+ 1 )
67+ yab.plot_subcortical(data = data, atlas = atlas, vminmax = [2 , 14 ],
68+ views = [' left_lateral' , ' superior' , ' right_lateral' ],
69+ bmesh_alpha = 0.1 , figsize = (600 , 300 ), cmap = ' viridis' )
70+
71+ # white matter bundles
72+ atlas = ' xtract_tiny'
73+ regs = yab.get_atlas_regions(atlas = atlas, category = ' tracts' )
74+ data = {reg: np.sin(i) for i, reg in enumerate (regs)}
75+ yab.plot_tracts(data = data, atlas = atlas, style = ' matte' ,
76+ views = [' left_lateral' , ' anterior' , ' superior' ], bmesh_type = ' pial' ,
77+ bmesh_alpha = 0.1 , figsize = (1600 , 800 ), cmap = ' viridis' )
6978
7079```
7180
0 commit comments