PySurfer icon indicating copy to clipboard operation
PySurfer copied to clipboard

Mapping values to foci.

Open cristidonos opened this issue 6 years ago • 5 comments

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

foci labels

cristidonos avatar Oct 20 '18 10:10 cristidonos

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

codecov-io avatar Oct 23 '18 10:10 codecov-io

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.

cristidonos avatar Oct 23 '18 10:10 cristidonos

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 avatar Feb 03 '20 15:02 danielegrattarola

@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 avatar Feb 03 '20 16:02 mwaskom

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

danielegrattarola avatar Feb 03 '20 17:02 danielegrattarola