nipy / PySurfer

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

Mapping values to foci. #259

Open cristidonos opened 5 years ago

cristidonos commented 5 years ago

I made the following changes to plot SEEG electrodes and task-related activations:

foci labels

codecov-io commented 5 years ago

Codecov Report

Merging #259 into master will decrease coverage by 8.25%. The diff coverage is 90.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
cristidonos commented 5 years ago

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.

danielegrattarola commented 4 years ago

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

mwaskom commented 4 years ago

@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.

danielegrattarola commented 4 years ago

@mwaskom Thanks, I've managed to hack a solution together using mlab.text3d for now. Cheers