def main():
    EXP_DIR='results/graph_neural_mapping'
    NII_DIR='saliency_nii'
    SAVE_DIR='saliency_img'

    os.makedirs(os.path.join(EXP_DIR, SAVE_DIR), exist_ok=True)

    gl.resetdefaults()
    gl.loadimage('mni152')
    gl.overlayloadsmooth(True)
    gl.opacity(0, 50)
    gl.colorbarposition(0)

    visualize_axial(os.path.join(EXP_DIR, NII_DIR), os.path.join(EXP_DIR, SAVE_DIR))
    visualize_sagittal(os.path.join(EXP_DIR, NII_DIR), os.path.join(EXP_DIR, SAVE_DIR))
    visualize_colorbar(os.path.join(EXP_DIR, SAVE_DIR))
Example #2
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)");
Example #3
0
import gl
gl.resetdefaults()
gl.overlayloadsmooth(1)
gl.loadimage('spm152')
gl.overlayload('spmMotor')
gl.removesmallclusters(1, 3.5, 800)
gl.minmax(1, 3.5, 3.5)
gl.overlayload('spmMotor')
gl.removesmallclusters(2, -2.5, 800)
gl.minmax(2, -2.5, -2.5)
print("overlays only have large clusters");
Example #4
0
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")