PySurfer
PySurfer copied to clipboard
Mapping values to foci.
I made the following changes to plot SEEG electrodes and task-related activations:
- Brain.add_foci can now map values using foci color and size.
- added Brain.add_text3d for labeling foci in 3d
Codecov Report
Merging #259 into master will decrease coverage by
8.25%
. The diff coverage is90.32%
.
@@ Coverage Diff @@
## master #259 +/- ##
==========================================
- Coverage 74.9% 66.64% -8.26%
==========================================
Files 7 7
Lines 2506 2536 +30
Branches 501 505 +4
==========================================
- Hits 1877 1690 -187
- Misses 454 664 +210
- Partials 175 182 +7
Hi, Made some changes, not there's only one add_foci function that uses quiver3d instead of points3d to draw the spheres. Implemented internal checks for data and made color-coded spheres optional.
Regarding text functions: i only copied add_text function from above and changed it to uses the text3d function in mayavi. All 4 arguments (row, col, justification and font_size) were already there.
Couldn't figure out failed tests myself, please help me fix those.
Hi, was this feature ever implemented in the library? I need to plot some text on a brain surface but I'm not sure how to achieve this in pysurfer.
Thanks
@danielegrattarola This has not been merged. There are unresolved questions about how best to integrate into the existing PySurfer API, and the tests are not passing. But looking at the code should give you a pretty good idea of how to add text onto a PySurfer visualization. It will take you writing more code than if it were just a method on the Brain
object, but it is definitely possible.
@mwaskom Thanks, I've managed to hack a solution together using mlab.text3d
for now.
Cheers