nipy / PySurfer

Cortical neuroimaging visualization in Python
https://pysurfer.github.io/
BSD 3-Clause "New" or "Revised" License
241 stars 97 forks source link

Trouble using the script command to enable backface culling #301

Open WestfallDaniel opened 3 years ago

WestfallDaniel commented 3 years ago

I have had a similar issue that others have reported, which forcing backface culling seems to fix, referenced here. However, I am having trouble implementing a script fix such as

surf.actor.property.backface_culling = True

I was wondering if anyone could help me using one of the examples from here

import os
from os.path import join as pjoin
from surfer import Brain

print(__doc__)

subject_id = 'fsaverage'
hemi = 'both'
surf = 'inflated'
view = 'frontal'

"""
Bring up the visualization
"""
brain = Brain(subject_id, hemi, surf, views=view,
              cortex="bone", background="ivory")

"""
Display the 'aparc' parcellation borders.
To use annotations that live in your subject's
label directory, just use the annot name.
"""
brain.add_annotation("aparc")

I admit I am not very well versed with scripting so I am having trouble figuring out how to rewrite the surf.actor.property.backface_culling = True code to reference the correct surface (aparc) in the example above.