MRG, ENH: ECoG plotting on pial#8190
Conversation
|
I think some combination of this and sensor-plotting-on-brain would probably be the best. But this at least is maybe an incremental step |
|
Wow this is awesome! you are a magician @larsoner. I think for me I haven't seen these kinds of mne-visualizations yet except for MEG, so the only issue I have is interpreting the cool viz. So correct me where I'm wrong. You are visualizing the gamma band activity mapped to the closest parietal lobe on both hemispheres (in this case it's the left hemisphere), at 0.680 seconds. There is a small window where you are smoothing with a factor of 10. I might be asking a stupid question, but what is being shown in the bottom time series plot? not sure what |
The real question to me is, is the method used for projecting the data to the brain sensible for ECoG? It's pretty basic, doesn't use forward/inverse at all... But I imagine this is what people mentally try to do when they see electrodes on the brain anyway. Hence why I think this plus an actual sensor overlay would be potentially very useful.
The
Actually the
It's the time course of the vertex shown by the ball, in this case the time course of the gamma activation. GFP is global field power. You can try running the example locally to play with the options and clicking around, playing with spacebar, etc. |
|
Ah okay makes a bit more sense! So just to clarify is this the projected activity of all the channels on the brain? The time course on the bottom shows that for just one region (i.e. the blue ball plotted onto the brain). If say someone wants to only visualize the effect from a subset of channels, then one simply needs to "pick_channels" right? Do I think this is useful?So the heatmap on the pial surface is a weighted (by distance) linear combination of all the channel's gamma activity. I think that is pretty useful because there are many recordings that are ECoG arrays on the brain cortex, and many publications essentially produce (crappier) versions of what you have here. The cool thing I can see is that any "metric" or feature can be visualized as such following the example. I would definitely use it. The future of iEEG though with epilepsy surgery is moving towards SEEG (so depth electrodes), which obviously then become way harder to visualize. But one step at a time :p. This looks so cool! |
Each colorful point on the brain is the result of summing together channels that are (or really, the version of them projected to the nearest point on the pial surface is) within
Yes indeed, do this before
Hopefully not too bad -- we have translucent volumetric rendering already: sEEG should be fairly easy by comparison :) We can for example, when we add the sensor plots, make sEEG electrodes translucent spheres. And/or we figure out some sensible way to interpolate/map the sEEG data into a volumetric space, then the viz is already done actually. Again I think a combination would probably be best...
Okay let's wait to see if @agramfort thinks it makes sense, too -- if so, I'll add tests and we can pick a name then we should be good to go. |
|
Actually also @choldgraf if you have an opinion on this PR/viz method it would be great! |
For naming, I wonder if it should be explicit that this is for the pial surface of the brain? Also... I might be asking another stupid question, but what is |
|
Tests added, ready for review/merge from my end |
In theory at some point we might want to make the surface to project to optional, so I'd rather leave it. I actually can live with
Argh, our search needs to work a bit better! See: https://mne.tools/stable/glossary.html#term-source-estimates-abbr.-stc |
What about something to inform ECoG vs SEEG? Because to allude to what you said about SEEG: would we have an analagous function for doing the volumetric rendering of SEEG?
Whoa, I wasn't aware of this! This looks pretty awesome too... I'm assuming there should be some way of getting the data structures to work w/ arbitrary SEEG feature signals (e.g. either the raw LFP, or some say spectral power, etc.), so that it can plot things in this volumetric rendering? If not, I can open another issue to discuss? Sorry if it's obvious and can :p. I'm just not as familiar w/ the data structures outside If it can do so, perhaps I'll try it on a future patient and see if I run into any troubles. |
Yeah we should be able to project sEEG electrode activation into a volume without too much work. Probably about the same number of lines as here.
Yep, just get those signals then put them into an |
|
My 2 cents is that this is a super common visualization in ECoG / sEEG, although it has sort-of dubious physiological truth (most folks just assume there's a spherical activation around each electrode, some other kind of heuristic like that, rather than actual physiological modeling etc). However since this is so common I think it'd be a good feature for the ECoG/sEEG community! |
|
In that case this is ready for review/merge @agramfort . Failure is just 3.8 pre segfault that's happening on |
agramfort
left a comment
There was a problem hiding this comment.
I am personally uneasy advocating a projection method for ECoG data without references to literature doing it the way we do. Physics is here ignored and I am sure there is a more standard way of doing this. If not we need to write a paper ;)
I could already find some work:
https://hal.inria.fr/hal-01278377v1
although this is more ambitious.
@choldgraf any reference papers for "each electrode just projects to a sphere of radius R"? @agramfort won't accept this viz without seeing it in use in the community |
See figures: See EcoG: |
|
The field trip ecog page has some visualizations like this I think, maybe they have a reference http://www.fieldtriptoolbox.org/tutorial/human_ecog/ |
|
ok in http://www.fieldtriptoolbox.org/tutorial/human_ecog/ the relevant
cells are 51 and 57.
if we do the same as fieldtrip with similar API I am happy
… |
|
@agramfort you are parisian we know you are never truly happy |
|
(sorry, I couldn't resist, I haven't had as much chance to troll you these days) |
|
deep inside I am...
you know when is the best time to visit Paris? August as the Parisians are
not there ;)
… |
|
Let's push this to 0.22 and hopefully we can tackle ECoG + sEEG in that release cycle |
|
@larsoner This addition looks very useful for my current project. We are trying to show heat maps based on observed change from electrical stimulation. Is 'stc_near_sensors' is not currently available? |
|
@jeschj01 it's not in the |
|
@larsoner jw if you were planning on also adding the SEEG capability sometime (what you linked for source viz looks pretty neat)? No rush of course, I know you're a busy man :). What are the steps needed to get it working on the volumetric viz? Just wondering to see if it's in my ability to even come close to implementing. I'm completely lost in mne-python's viz functions. |
|
For sEEG, if we improve Let me rebase this then we can merge it, and then @adam2392 it would be great if you could make a PR to allow interpolating into a volume! |
|
@agramfort feel free to merge if you're happy |
|
@larsoner it needs a what's new entry then +1 for MRG |
Closes #7787.
I don't work with ECoG data so I don't know how sensible this is. @adam2392 can you see if this is something that ECoG people would be interested in? Here is what the tutorial image looks like on my machine:
Todo: