def visualize_axial(niidir, savedir, min=0.75, max=1.0): gl.viewaxial(1) for method in ['grad', 'cam']: for network in ['Vis', 'SomMot', 'DorsAttn', 'SalVentAttn', 'Limbic', 'Cont', 'Default']: for gender in ['female', 'male']: gl.overlayload(os.path.join(niidir, 'network', 'saliency_{}_{}_top20_{}_lh'.format(method, gender, network))) gl.overlayload(os.path.join(niidir, 'network', 'saliency_{}_{}_top20_{}_rh'.format(method, gender, network))) gl.minmax(1, min, max) gl.minmax(2, min, max) gl.colorname(1, colorname) gl.colorname(2, colorname) gl.savebmp(os.path.join(savedir, '{}_{}_{}_axial.png'.format(method, network, gender))) gl.overlaycloseall()
def visualize_sagittal(niidir, savedir, min=0.75, max=1.0): for hemisphere in ['lh', 'rh']: if hemisphere =='lh': gl.clipazimuthelevation(0.49, 90, 0) elif hemisphere =='rh': gl.clipazimuthelevation(0.49, 270, 0) for network in ['Vis', 'SomMot', 'DorsAttn', 'SalVentAttn', 'Limbic', 'Cont', 'Default']: for gender in ['female', 'male']: gl.overlayload(os.path.join(niidir, 'network', 'saliency_{}_top20_{}_{}'.format(method, gender, network, hemisphere))) gl.minmax(1, min, max) gl.colorname(1, colorname) gl.viewsagittal(1) gl.savebmp(os.path.join(savedir, '{}_{}_sagittal_{}_lt.png'.format(network, gender, hemisphere))) gl.viewsagittal(0) gl.savebmp(os.path.join(savedir, '{}_{}_sagittal_{}_rt.png'.format(network, gender, hemisphere))) gl.overlaycloseall()
# gl.colorname (1,"8redyell") # gl.opacity(1,80) # #gl.mosaic('l+ h -0.3 v -0.1 a 55 s x r 0') # gl.mosaic('a 55') # gl.colorbarposition(0) # #gl.linewidth(5) # gl.savebmp(OAc_filenames[this_index]) OAi_filenames=['C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/OAi_Flat', \ 'C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/OAi_Low', \ 'C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/OAi_Med', \ 'C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/OAi_Hard' ] for this_index in range(0, len(OAi_filenames)): gl.overlaycloseall() gl.overlayload(OAi_filenames[this_index]) gl.minmax(1, 0, 5) gl.colorname(1, "8redyell") gl.opacity(1, 80) #gl.mosaic('l+ h -0.3 v -0.1 a 55 s x r 0') gl.mosaic('a 55') gl.colorbarposition(0) #gl.linewidth(5) gl.savebmp(OAi_filenames[this_index]) # YA_filenames=['C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/YA_Flat', \ # 'C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/YA_Low', \ # 'C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/YA_Med', \ # 'C:/Users/tfettrow/Dropbox (UFL)/CrunchReview/Tables_and_Figs/YA_Hard' ] # for this_index in range(0,len(YA_filenames)):
import gl gl.resetdefaults() #opacity adjusts whether overlays are translucent (0) opacity = 50 pth = '/Users/chris/Downloads/sf/' gl.meshload('BrainMesh_ICBM152_smoothed.mz3') gl.overlayload(pth + 'region.mz3') gl.overlayload(pth + 'stat.mz3') gl.overlayoverlapoverwrite(0)
import gl gl.resetdefaults() gl.backcolor(0, 0, 0) gl.colorbarsize(0.02) gl.cameradistance(0.6) # load main image gl.loadimage('./outputs/LCT1/LCT1_brain.nii.gz') gl.shadername('Standard') gl.shaderadjust('surfaceColor', 1) gl.shaderadjust('brighten', 5) # load overlay 1 gl.overlayload( '/Users/Bryce/Desktop/Postdoc_Scripts/GitHub/04_mosaics_data/00_Multiple_files/outputs/LCT1/LCT1_heatmap.nii.gz' ) gl.overlayloadsmooth(1) gl.minmax(1, 1, 50) gl.colorname(1, "4hot") gl.shaderadjust('overlayDepth', 0.35) # #load overlay 2 gl.overlayload('./outputs/LCT1/LCT1_responses.nii.gz') gl.overlayloadsmooth(1) gl.minmax(2, 0, 50) gl.colorname(2, "2green") gl.shaderadjust('overlayDepth', 0.35) # #open background image # gl.loadimage('spm152')
import gl gl.meshload('lh.pial') gl.overlayload('motor_4t95vol.nii.gz') gl.overlayminmax(gl.overlaycount(), -2, -3) gl.overlayopacity(gl.overlaycount(), 20) #create new overlay based on contour of motor map: gl.contour(gl.overlaycount()) #next line: make border thicker #gl.overlayminmax(gl.overlaycount(),0.1,0.1) #next line: make border a gradient #gl.overlayminmax(gl.overlaycount(),0.1,1.0)
import gl gl.resetdefaults() #open background image gl.loadimage('spm152') #open overlay: show positive regions gl.overlayloadsmooth(1); gl.overlayload('spmMotor') gl.minmax(1, 4, 4) gl.opacity(1,50) #open overlay: show negative regions gl.overlayloadsmooth(0); gl.overlayload('spmMotor') gl.minmax(2, -4, -4) gl.colorname (2,"3blue") gl.overlayloadsmooth(1); print("n.b. Blue surface is jagged (smoothing off)");
import gl gl.resetdefaults() gl.meshload('BrainMesh_ICBM152.rh.mz3') gl.meshcurv() gl.overlayminmax(1, -1, 1) gl.overlaycolorname(1, 'surface') gl.overlayinvert(1, 1) gl.overlayload('motor_4t95vol.nii.gz') gl.overlaycolorname(2, 'kelvin') gl.overlayminmax(2, 2, 7) gl.overlayload('scalp.mz3') gl.overlaycolorname(3, 'gold') gl.shaderxray(1.0, 0.9) gl.meshoverlayorder(1) gl.colorbarvisible(0) gl.shaderambientocclusion(0.05) gl.azimuthelevation(90, 15) gl.clipazimuthelevation(0.5, 0, 90)
rois_to_plot = ['neurosynth_acc_gmMasked', 'neurosynth_dlpfc_left_gmMasked', 'neurosynth_dlpfc_right_gmMasked'] # rois_to_plot = ['neurosynth_acc_mask', 'neurosynth_dlpfc_left_mask', 'neurosynth_dlpfc_right_mask'] # rois_to_plot = ['left_dlpfc', 'right_dlpfc', 'left_acc', 'right_acc'] ###################################### gl.loadimage('//exasmb.rc.ufl.edu/blue/rachaelseidler/tfettrow/Crunch_Code/MR_Templates/MNI_2mm.nii') gl.opacity(1,1) ###################################### # rois_plotted=1; # this_index=0; for this_roi in rois_to_plot: # gl.loadimage('//exasmb.rc.ufl.edu/blue/rachaelseidler/tfettrow/Crunch_Code/MR_Templates/MNI_2mm.nii') # gl.opacity(1,10) # gl.mosaic('a -36 -32 -28 -24 -20 -16 -10 -6 -2; 2 6 10 14 18 22 26 30 34; 38 42 46 50 54 58 62 66 70') # gl.mosaic("A R 0 C R 0 S R 0; A R -0 C R -0 S R -0"); gl.mosaic("A R 0"); gl.overlayload("//exasmb.rc.ufl.edu/blue/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/"+this_roi) #gl.minmax(0,.01,.01) gl.colorbarposition(0) gl.colornode(1,2,255,0,0,255,255) # blue gl.colornode(2,2,255,255,0,0,255) # red gl.colornode(3,2,255,0,255,0,255) # green # gl.colornode(4,2,255,0,88,0,255) #darkgreen gl.backcolor(255,255,255) gl.savebmp("//exasmb.rc.ufl.edu/blue/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/"+this_roi)
import gl gl.resetdefaults() #open background image gl.loadimage('mni152') gl.backcolor(255, 255, 255) #open overlay: gl.overlayloadsmooth(0) #open overlay: sub 41, 1 site gl.overlayload( '/Users/mflounders/Desktop/cnds/multiplied_BLA/041sph_bin.nii.gz') gl.minmax(1, 0, 14) gl.colorname(1, "NIH") #open overlay: sub 81, 1 site gl.overlayload( '/Users/mflounders/Desktop/cnds/multiplied_BLA/081sph_bin.nii.gz') gl.minmax(2, 0, 14) gl.colorname(2, "NIH") #open overlay: sub 91, 1 site gl.overlayload( '/Users/mflounders/Desktop/cnds/multiplied_BLA/091sph_bin.nii.gz') gl.minmax(3, 0, 14) gl.colorname(3, "NIH") #open overlay: sub 111, 3 sites gl.overlayload( '/Users/mflounders/Desktop/cnds/multiplied_BLA/111sph_bin.nii.gz') gl.minmax(4, 0, 14) gl.colorname(4, "NIH")
import gl gl.resetdefaults() gl.meshload('/Users/chris/afni/pial/lh.sphere') gl.overlayload('/Users/chris/afni/pial/lh.HCP-MMP1.annot') gl.atlas2node('/Users/chris/afni/pial/mynodes.node')
import gl gl.resetdefaults() gl.meshload('/Users/chris/catani/fs_LR.L.inflated_va_avg.32k_fs_LR.surf.gii') gl.overlayload('/Users/chris/catani/Q1-Q6_RelatedParcellation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors.32k_fs_LR.dlabel.nii') gl.contour(0) #gl.overlayload('/Users/chris/catani/Q1-Q6_RelatedParcellation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors.32k_fs_LR.dlabel.nii')
import gl gl.meshload('lh.pial') gl.overlayload('/Users/chris/neurovault/135002.L.func.gii') gl.contour(0)
import gl gl.resetdefaults() gl.backcolor(255,255,255) pth = '~/afni/' gl.loadimage(pth+'FT_anat+orig.HEAD') gl.overlayload('TSNR.FT+orig.HEAD') gl.opacity(1, 50) gl.extract(1,1,3) gl.clipazimuthelevation(0.3, 0, 120)
import gl gl.meshload('~/catani/fs_LR.L.inflated_va_avg.32k_fs_LR.surf.gii') #load atlas gl.overlayload( '~/catani/Q1-Q6_RelatedParcellation210.CorticalAreas_dil_Final_Final_Areas_Group_Colors.32k_fs_LR.dlabel.nii' ) #make atlas translucent gl.atlassaturationalpha(0.2, 0.5) #show borders gl.contour(gl.overlaycount()) gl.overlaycolorname(gl.overlaycount(), 'Grayscale') #invert color scheme so borders are black not white gl.overlayinvert(gl.overlaycount(), 1) gl.overlayopacity(gl.overlaycount(), 50) #load statistical map as image gl.overlayload('motor_4t95vol.nii.gz') gl.overlayminmax(gl.overlaycount(), -2, -3) gl.overlayopacity(gl.overlaycount(), 75) #create new overlay based on contour of motor map: gl.contour(gl.overlaycount())
import gl gl.resetdefaults() pth = '~/afni/' #the desai atlas comes with AFNI # if this fails, use File/OpenAFNI to set AFNI folder gl.loadimage('TT_desai_dd_mpm+tlrc.HEAD') #set atlas saturation to 20% gl.minmax(0, 0, 20) gl.overlayload(pth+'ttest.wav.t0.p3.RT_REML.L-A.allmask+tlrc.HEAD') gl.minmax(1, 2, 5) gl.colorname(1,'Plasma') #make overlay translucent gl.opacity(1, 75) #find clusters gl.generateclusters(1) gl.orthoviewmm(0,0,0) #the 'tomography' shader works well with discrete atlases gl.shadername('Tomography')
#gl.overlayload("//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/Gordon2016_VentralAttn_mask") #gl.minmax(11, 0.01,0.1) #gl.colorname(11,'GE_color') #gl.colorfromzero(11,1) #gl.overlayload("//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/Gordon2016_Visual_mask") #gl.minmax(12, 0.01,0.1) #gl.colorname(12,'CT_Kidneys') #gl.colorfromzero(12,1) ##Power Networks gl.loadimage( '//cifs.rc.ufl.edu/ufrc/rachaelseidler/tfettrow/Crunch_Code/MR_Templates/MNI_1mm.nii' ) gl.opacity(1, 50) gl.overlayload( "//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/Power2011_Auditory_mask" ) gl.minmax(1, 0.01, 0.1) gl.colorname(1, '1red') gl.colorfromzero(1, 1) gl.overlayload( "//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/Power2011_Cingulo-opercular_Control_mask" ) gl.minmax(2, 0.01, 0.1) gl.colorname(2, '2green') gl.colorfromzero(2, 1) gl.overlayload( "//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/ROIs/Power2011_Default_mode_mask" ) gl.minmax(3, 0.01, 0.1) gl.colorname(3, '3blue')
import gl gl.meshload('lh.pial') gl.overlayload('boggle.annot') gl.contour(0)
help(gl) # Load main image and overlay mep_path = os.path.join('C:/', 'Users', 'Enzon', 'Documents', 'Projects', 'MEP', 'mep-scripts') reference_path = os.path.join(mep_path, 'Data', 'Mouse', 'Reference') analysis_path = os.path.join(mep_path, 'Data', 'Mouse', 'Analysis') main_path = os.path.join(reference_path, 'average_template_50_reoriented.nii.gz') overlay1_path = os.path.join( analysis_path, 'annotation_50_reoriented_pVal_inv_sig_volIncrease.nii.gz') overlay2_path = os.path.join( analysis_path, 'annotation_50_reoriented_pVal_inv_sig_volDecrease.nii.gz') gl.loadimage(main_path) gl.overlayload(overlay1_path) gl.overlayload(overlay2_path) gl.opacity(1, 50) gl.opacity(2, 50) gl.minmax(1, 0, 3) gl.minmax(2, 0, 3) gl.colorname(1, '1red') gl.colorname(2, '3blue') output_dir_path = os.path.join(analysis_path, 'imageSequenceFolders', 'pVal_inv_sig_InDe') if not os.path.exists(output_dir_path): os.mkdir(output_dir_path) y_min = -13.15 y_max = 0 y_step = 0.05
import gl gl.resetdefaults() #opacity adjusts whether overlays are translucent (0) opacity = 50 pth = '/Users/chris/Downloads/sf/' gl.azimuthelevation(70, 15) gl.meshload('BrainMesh_ICBM152_smoothed.mz3') gl.overlayload(pth+'bin.thr.ACC_LR.nii.gz') gl.overlaycolorname(1, 'Violet [r+b]') gl.overlayminmax(1,0.5,0.5) gl.overlayopacity(1, opacity) gl.overlayload(pth+'bin.thr.S2_OP1_LR.nii.gz') gl.overlaycolorname(2, 'Violet [r+b]') gl.overlayminmax(2,0.5,0.5) gl.overlayopacity(2, opacity) gl.overlayload(pth+'bin.thr.INS_LR.nii.gz') gl.overlaycolorname(3, 'Bronze-Gold') gl.overlayminmax(3,0.5,0.5) gl.overlayopacity(3, opacity) gl.overlayload(pth+'bin.thr.Tha_LR.nii.gz') gl.overlaycolorname(4, 'Blue') gl.overlayminmax(4,0.5,0.5) gl.overlayopacity(4, opacity) gl.overlayload(pth+'bin.thr.S1_BA2_LR.nii.gz') gl.overlaycolorname(5, 'Cyan [g+b]') gl.overlayminmax(5,0.5,0.5) gl.overlayopacity(5, opacity) gl.overlayload(pth+'thresh_zstat1.nii.gz') gl.overlaycolorname(6, 'Red') gl.overlayminmax(6,0.5,0.5) gl.overlayopacity(6, 100)
import gl gl.resetdefaults() pth = '~/afni/' gl.loadimage(pth+'fitts.FT+orig.HEAD') gl.overlayload(pth+'stats.FT+orig.HEAD') gl.loadgraph(pth+'ideal_Arel.1D', 0) gl.loadgraph(pth+'ideal_Vrel.1D', 1) gl.graphscaling(3) gl.volume(1,8) gl.minmax(1, 6, 12) gl.colorname(1,'Viridis') gl.generateclusters(1) gl.orthoviewmm(0,0,0)
import gl gl.resetdefaults() gl.meshload('lh.pial') gl.overlayload('boggle.lh.annot') #make contour at border of atlas gl.contour(0) #reduce atlas salience: gl.atlassaturationalpha(0.2, 0.5) gl.overlayload('motor_4t95vol.nii.gz') gl.overlayminmax(gl.overlaycount(), -2, -3) #hide statistical map: gl.overlayopacity(gl.overlaycount(), 0) #draw outline of statistical threshold gl.contour(gl.overlaycount())
import gl gl.resetdefaults() gl.meshload('BrainMesh_ICBM152Right.mz3') gl.overlayload('motor_4t95mesh.mz3') gl.overlaycolorname(1, 'red') gl.shaderxray(0.9, 0.5) gl.azimuthelevation(110, 15) gl.shadername('MatCap') gl.shadermatcap('Cortex') gl.meshcurv() gl.overlaytranslucent(2, 1)
import gl gl.resetdefaults() gl.meshhemisphere(1) #gl.meshloadbilateral(1) #gl.hemispheredistance(0.5) gl.meshload("/Users/chris/aa/_rh.inflated") gl.overlayload( 'fs7converted_fs5_sct2in_fwhm10_npc_cft3.1_rh_dpv_npc_fisher_cfdrp_d1_c1.mgz' ) gl.overlayminmax(1, 2.301, 4) gl.overlaycolor(1, 128, 255, 128, 255, 0, 255) gl.overlayload( 'fs7converted_fs5_sct2in_fwhm10_npc_cft3.1_rh_dpv_npc_fisher_cfdrp_d1_c2.mgz' ) gl.overlayminmax(2, 2.301, 4) gl.overlaycolor(2, 255, 0, 255, 128, 128, 128) gl.overlayload( 'fs7converted_fs5_sct2in_fwhm10_npc_cft3.1_rh_dpv_npc_fisher_cfdrp_d1_c3.mgz' ) gl.overlayminmax(3, 2.301, 4) gl.overlaycolor(3, 255, 0, 0, 128, 255, 128) gl.overlayload( 'fs7converted_fs5_sct2in_fwhm10_npc_cft3.1_rh_dpv_npc_fisher_cfdrp_d1_c4.mgz' ) gl.overlayminmax(4, 2.301, 4) gl.overlaycolor(4, 0, 0, 255, 128, 255, 128)
print(gl.version()) gl.resetdefaults() #gl.loadimage('//cifs.rc.ufl.edu/ufrc/rachaelseidler/tfettrow/Crunch_Code/MR_Templates/Template_4_IXI555_MNI152_GS.nii') gl.loadimage( '//cifs.rc.ufl.edu/ufrc/rachaelseidler/tfettrow/Crunch_Code/MR_Templates/MNI_2mm.nii' ) OA_filename = [ '//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/Level2_Results/MRI_files/05_MotorImagery/oldadult/spmT_0001.nii' ] #OA_filename = ['//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/Level2_Results/MRI_files/05_MotorImagery/oldadult/spmT_0002.nii'] #OA_filename = ['//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/Level2_Results/MRI_files/05_MotorImagery/oldadult/spmT_0003.nii'] #OA_filename = ['//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/Level2_Results/MRI_files/05_MotorImagery/oldadult/spmT_0004.nii'] #OA_filename = ['//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/Level2_Results/MRI_files/05_MotorImagery/oldadult/spmT_0005.nii'] gl.overlayload(OA_filename[0]) gl.minmax(1, 1, 5) gl.colorname(1, "8redyell") gl.opacity(1, 80) #gl.mosaic('l+ h -0.3 v -0.1 a 55 s x r 0') gl.mosaic('a 55') gl.colorbarposition(0) #gl.linewidth(5) gl.savebmp(OA_filename[0]) gl.loadimage( '//cifs.rc.ufl.edu/ufrc/rachaelseidler/tfettrow/Crunch_Code/MR_Templates/MNI_2mm.nii' ) YA_filename = [ '//cifs.rc.ufl.edu/ufrc/rachaelseidler/share/FromExternal/Research_Projects_UF/CRUNCH/MiM_Data/Level2_Results/MRI_files/05_MotorImagery/youngadult/spmT_0001.nii' ]
import gl gl.resetdefaults() gl.meshload('~/catani/fs_LR.L.inflated_va_avg.32k_fs_LR.surf.gii') gl.overlayload('~/catani/Wang_2015.32k_fs_LR.dlabel.nii') gl.contour(gl.overlaycount()) gl.overlaycolorname(gl.overlaycount(), 'Grayscale') #invert color scheme so borders are black not white gl.overlayinvert(gl.overlaycount(), 1)
import gl gl.resetdefaults() gl.meshload('BrainMesh_ICBM152Left_smoothed.mz3') gl.meshcurv() gl.shadername('hidecurves') gl.overlayload('CIT168.mz3') gl.shaderforbackgroundonly(1) gl.shaderadjust('curvthreshhi', 0.44)
import gl gl.resetdefaults() gl.loadimage('spm152') #open overlay: show positive regions gl.overlayload('aal') gl.scriptformvisible(1) #gl.atlashide(1) #gl.atlasshow(1, 17) gl.atlasshow(1, (22, 23, 17)) mx = gl.atlasmaxindex(1) print(mx) #gl.opacity(1,50) # # if (layer > 0) then # Vol1.UpdateOverlays(vols); #str = gl.atlaslabels(1) #print(str) #gl.minmax(1, 4, 100) #gl.overlayload('aal') # #gl.generateclusters(0) #gl.generateclusters(0, 0.5, 32, 1, 0)
# %% overlay ---------------------- FILESPATH='D:\\GD_UNICAMP\\IC_NeuroFisica\\Projetos\\fMRI_TLE_2020\\Seed_based_analysis' os.chdir(FILESPATH) networks_names=['DMN','SMOTOR','VISUAL','AUDIT','ECN_L','ECN_R'] netfile_sufx= ['_Group1X','_Group2L','_Group3R','_Group4N'] for net in networks_names: savefolder=FILESPATH + '\\' + net + '\\' for i in netfile_sufx: FILENAME=net+i SEEDFILENAME=net+"_seed" gl.overlaycloseall() gl.overlayload(FILENAME) gl.overlayload(SEEDFILENAME) gl.colorname (2,"3blue") #gl.opacity(1,50) # changing view ---------------------- gl.azimuthelevation(140,20) ktime= 1 ksteps= 72 for x in range(0, ksteps): gl.azimuthelevation(140+(x*5),20) gl.wait(ktime) if x < 10: gl.savebmp(savefolder + FILENAME + '_0' + str(x)+'.png')
import gl gl.resetdefaults() pth='/Users/chris/Downloads/MNI_Glasser_HCP_2019_03_26/' gl.meshload(pth+'std.141.lh.pial.gii') #gl.overlayload(pth+'lh.std.141.Glasser.gii.dset') #gl.overlayload(pth+'lh.std.141.Glasser_HCP.niml.dset') gl.overlayload(pth+'lh.std.141.Glasser_HCP.lbl.niml.dset') #gl.atlas2node('/Users/chris/afni/pial/mynodes.node') #gl.overlayload(pth+'lh.std.141.Glasser.1D.dset')