OpenSourceBrain / ConnectivityShowcase

Scripts for importing various connectivity datasets into NeuroML format
http://opensourcebrain.org/projects/connectivityshowcase
0 stars 1 forks source link

'SingleLocation' not defined #1

Open JohnGriffiths opened 5 years ago

JohnGriffiths commented 5 years ago

where are SingleLocation and Location imported from?

I'm getting the following error in the TVB example

NameError                                 Traceback (most recent call last)
<ipython-input-5-2ce275024e68> in <module>()
     20     if 'IN' in id or True:
     21 
---> 22         ll = SingleLocation()
     23 
     24         ll.location = Location(x=x,y=y,z=z)

NameError: name 'SingleLocation' is not defined

ignore the line numbers; they're from loading manual_import.py into jupyter notebook and exploring interactively.

this is the line in manual_import.py

https://github.com/OpenSourceBrain/ConnectivityShowcase/blob/master/TVB/manual_import.py#L52

thoughts?

pgleeson commented 5 years ago

Apologies, those were changes i'd made in the past couple of days, but not yet committed... The latest on master of NeuroMLlite should work now...

pgleeson commented 5 years ago

Forgot to mention that the NeuroML file can be viewed in OSB, as outlined now in the README: https://github.com/OpenSourceBrain/ConnectivityShowcase/blob/master/TVB/README.md

JohnGriffiths commented 5 years ago

nice!

can OSB show the connections between nodes in 3D view?

and does it have any support for overlaying transparent surfaces?

pgleeson commented 5 years ago

Connections between 1 node and the ones it's connected to can be shown by clicking on the individual 3D nodes (make sure connections are loaded first). It doesn't by default show all connections, as that's usually too dense (but you can select multiple ones at the same time with Ctrl).

There has been support for transparent surfaces in OSB, but not too many live examples have required that so far. The Geppetto platform that OSB is built on can certainly visualise 3D objects, e.g. an OBJ based cell surface here: http://live.geppetto.org/geppetto?load_project_from_id=9 or 3D fly brain regions here: https://v2a.virtualflybrain.org/?i=VFB_00017894.

I'll have to ask @tarelli about resurrecting that functionality in OSB...

@JohnGriffiths do you know of any transparent surface files for the dataset here?

JohnGriffiths commented 5 years ago

I'm not sure about surfaces for the Hagmann 66 one.

For the TVB default (76-node, cocomac-adapted) connectivity,

https://github.com/the-virtual-brain/tvb-data/blob/master/tvb_data/connectivity/connectivity_76.zip

there is an associated surface and region mapping (labels for corresponding surface vertices for each cortical node in the connectivity). The file is here:

https://github.com/the-virtual-brain/tvb-data/blob/master/tvb_data/surfaceData/cortex_16384.zip

Example of usage here (matplotlib viz):

https://johngriffiths.github.io/LabNotebook/mpl-surface-viz.html

Conversion to OBJ / PLY shouldn't be too difficult. I can look into this if you like.

Also worth noting: TVB uses surfaces for a number of other things, including EEG sensor montages, skull, scalp, face. Some of these have applications for simulations (e.g. M/EEG forward models), but they're also useful to have for nice visualizations.