예제 #1
0
kframesperrotation = 180
gl.meshcolor(210, 148, 148)
gl.meshload('BrainMesh_ICBM152Left.mz3')
gl.edgeload('LPBA40.edge')
gl.clipazimuthelevation(0.3, 0, 130)
gl.nodesize(6, 1)
gl.edgesize(3, 1)
gl.nodehemisphere(-1)
gl.azimuthelevation(250, 35)
gl.edgecolor('actc', 1)
gl.nodecolor('red', 1)
gl.nodethresh(1.0, 1.0)
gl.edgethresh(0.5, 1.0)
for i in range(1, kframesperrotation * 5):
    s = 0.5 + (i + 0.0) / 72
    if (s <= 1):
        gl.cameradistance(s)
    if ((i % kframesperrotation) == 0):
        rot = (i / kframesperrotation)
        if rot == 1:
            gl.shadername('metal')
        elif rot == 2:
            gl.shadername('wireframe')
        elif rot == 3:
            gl.shadername('toon')
            gl.shaderambientocclusion(0)
        else:
            gl.shadername('wire')
            gl.shaderforbackgroundonly(1)
    gl.azimuth(int(round(360.0 / kframesperrotation)))
    gl.wait(20)
예제 #2
0
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)
예제 #3
0
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)
예제 #4
0
#open overlay: sub 291, 2 sites
gl.overlayload(
    '/Users/mflounders/Desktop/cnds/multiplied_BLA/291sph_bin.nii.gz')
gl.minmax(11, 0, 14)
gl.colorname(11, "NIH")

#open overlay: sub 300, 5 sites
gl.overlayload(
    '/Users/mflounders/Desktop/cnds/multiplied_BLA/300sph_bin.nii.gz')
gl.minmax(12, 0, 14)
gl.colorname(12, "NIH")

#open overlay: sub 301, 1 site
gl.overlayload(
    '/Users/mflounders/Desktop/cnds/multiplied_BLA/301sph_bin.nii.gz')
gl.minmax(13, 0, 14)
gl.colorname(13, "NIH")

#open overlay: sub 321, 6 sites
gl.overlayload(
    '/Users/mflounders/Desktop/cnds/multiplied_BLA/321sph_bin.nii.gz')
gl.minmax(14, 0, 14)
gl.colorname(14, "NIH")

#shader settings
gl.shadername('Standard')

#set perspective1
gl.azimuthelevation(132, 30)
#set perspective2
gl.azimuthelevation(110, 11)
예제 #5
0
import gl
gl.resetdefaults()
gl.loadimage('mni152')
gl.overlayload('spmMotor')
gl.minmax(1, 4, 4)
gl.shadername('Glass')
gl.shaderadjust('boundThresh', 0.3)
gl.shaderadjust('edgeThresh', 0.42)
gl.shaderadjust('edgeBoundMix', 0.05)
gl.shaderadjust('boundBrightness', 0.0)
gl.shaderadjust('colorTemp', 0.8)
gl.backcolor(255, 255, 255)
gl.viewsagittal(1)
예제 #6
0
import gl
gl.resetdefaults()
#open background image
gl.loadimage('spm152')
gl.overlayloadsmooth(1)
#open overlay: show positive regions
gl.overlayload('spmMotor')
gl.minmax(1, -2, -5)
gl.colorname(1, '8redyell')
gl.colorfromzero(1, 1)
gl.overlayload('spmMotor')
gl.minmax(2, 2, 5)
gl.colorname(2, '5winter')
gl.colorfromzero(2, 1)
gl.hiddenbycutout(1, 1)
gl.cutout(0.5, 0.5, 0.5, 0, 1, 1)
gl.shadername('OverlaySurface')
gl.backcolor(255, 255, 255)
예제 #7
0
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)

gl.shadername('mixmatch')
gl.viewsagittal(1)
gl.colorbarvisible(1)
gl.orientcubevisible(0)
gl.overlayadditive(0)
예제 #8
0
import gl
gl.resetdefaults()
gl.loadimage('CT_Philips')
gl.colorname(0, 'CT_Kidneys')
gl.shadername('Tomography')
gl.azimuthelevation(150, 10)
gl.clipazimuthelevation(0.25, 180, 60)
예제 #9
0
파일: mip.py 프로젝트: rordenlab/MRIcroGL
import gl
gl.resetdefaults()
gl.loadimage('chris_MRA')
#load Maximum Intensity Projection Shader
gl.shadername('MIP')
예제 #10
0
            else:
                gl.overlayload(overlay_path)
                gl.opacity(1, 40)
                gl.minmax(1, 0, 1243)
                gl.colorname(1, 'x_rain')
                #gl.fullscreen(0)

            if j == 1:
                if i < 3:
                    gl.cutout(0.5, 0.5, 0.5, 0, 0, 1)
                else:
                    gl.cutout(0.38, 0.5, 0.2, 0, 0, 1)

            # help(gl.colorname)

            gl.shadername('overlaysurface')

            #im_list = []
            for iRot in range(nRot):
                print(iRot)
                Rot = iRot * (360 / nRot)
                print(Rot)
                gl.azimuthelevation(round(Rot), 20)
                filepath = output_path + '/imagenew' + '_' + str(
                    round(Rot)).rjust(3, '0')
                gl.savebmp(filepath)
                #im = PIL.Image.open(filepath)
                #im_list.append(im)

            #print('saving '+output_gif_path)
            #im_list[0].save(output_gif_path, save_all=True, append_images=images[1:], optimize=False, duration=40, loop=0)