import gl gl.resetdefaults() #the desai atlas comes with AFNI # if this fails, use File/OpenAFNI to set AFNI folder # gl.loadimage(pth+'stats.FT+orig.HEAD') #gl.loadimage('TTatlas+tlrc.HEAD') gl.resetdefaults() gl.orthoviewmm(0, 0, 0) #gl.loadimage('TTatlas+tlrc') gl.loadimage('/Users/chris/src/AICHAlr') #gl.generateclusters(0) #gl.generateclusters(0, 0.5, 32, 1, 0)
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 y = y_min count = 0 while y <= y_max: print(y) count = count + 1 print(count) gl.orthoviewmm(0, y, -4) gl.view(2) gl.linewidth(0) gl.colorbarposition(0) filepath = os.path.join(output_dir_path, 'imagenew' + '_' + str(round(count)).rjust(3, '0')) + '_' + str(y) gl.savebmp(filepath) y = y + y_step
gl.colorname(2, '3blue') gl.colorname(3, '1red') gl.colorname(4, '3blue') output_dir_path = os.path.join(analysis_path, 'imageSequenceFolders', 'aFD_InDe') if not os.path.exists(output_dir_path): os.mkdir(output_dir_path) y_min = -120 y_max = 90 y_step = 1 y = y_min count = 0 while y <= y_max: print(y) count = count + 1 print(count) gl.orthoviewmm(-3, y, -14) gl.view(2) gl.linewidth(0) gl.colorbarposition(0) filepath = os.path.join(output_dir_path, 'imagenew' + '_' + str(round(count)).rjust(3, '0')) + '_' + str(y) gl.savebmp(filepath) y = y + y_step
output_dir_path = os.path.join(analysis_path, 'imageSequenceFolders', subject+'_orthoview') if not os.path.exists(output_dir_path): os.mkdir(output_dir_path) if subject == 'patient': y_min = -84 y_max = -14 else: y_min = -80 y_max = -10 y_step = 1 y = y_min count = 0 while y <= y_max: print(y) count = count + 1 print(count) gl.orthoviewmm(0, y, 0) # why at first (-3, y, -14)? gl.view(2) gl.linewidth(0) gl.colorbarposition(0) filepath = os.path.join(output_dir_path, 'imagenew' + '_' + str(round(count)).rjust(3, '0')) + '_' + str(y) gl.savebmp(filepath) y = y + y_step
import gl gl.resetdefaults() #open background image gl.loadimage('spm152') #open overlay: show positive regions gl.overlayload('spmMotor') gl.minmax(1, 4, 4) gl.opacity(1, 50) #open overlay: show negative regions #gl.overlayload('spmMotor') #gl.minmax(2, -4, -4) #gl.colorname (2,"3blue") gl.orthoviewmm(37, -14, 47)