OpenSourceBrain / Contribute

A central repository for issues listing OSB projects looking for contributors
4 stars 1 forks source link

Improve SVG/PNG export for detailed morphologies in NeuroML2 #5

Closed pgleeson closed 7 years ago

pgleeson commented 9 years ago

Brief description

An option is available in jNeuroML for quickly converting NeuroML 2 cells into SVG files, which is a quicker way to check/view the structure of cells than loading in OSB 3D Visualiser, neuroConstruct etc. This export requires an update to improve on the basic functionality.

Expected result

The class for generating SVG files from detailed NeuroML2 morphologies is here: https://github.com/NeuroML/org.neuroml.export/blob/master/src/main/java/org/neuroml/export/svg/SVGWriter.java

This is used by jNeuroML to generate a scalable image file using:

jnml L5PC.cell.nml -svg

An example of the current output of this (for a L5 pyramidal cell) is:

selection_141

This could be improved in numerous ways:

Install jNeuroML from source. Make sure the development branches are checked out (using getNeuroML.py above). Replace the org.neuroml.export with a forked version of this repository Make appropriate updates to SVGWriter.java Note: there is a main() method in that class, but running 'mvn install' will generate an SVG representation of the file L23PyrRS.nml. Issue a pull request for the changes to be checked/merged.

Please do not make extensive changes or reformat large sections of code and expect them to be merged. Please keep changes to a minimum until you let us know about them.

Possible extensions

Other detailed morphologies in NML2 are available here for testing: http://www.opensourcebrain.org/search_custom_field?f[]=43&op[43]=~&v[43][]=Detailed+cell+model

Knowledge prerequisites

Java

To be learned

Creating images in SVG Representing morphologies in NeuroML2

Mentor

Contact p.gleeson -at- ucl.ac.uk if you are interested in contributing to this task

pgleeson commented 9 years ago

Currently being worked on by @justasb https://github.com/NeuroML/org.neuroml.export/pull/31 https://github.com/NeuroML/org.neuroml.export/pull/32

pgleeson commented 9 years ago

Significant improvements to this in latest development version of jNeuroML:

selection_209

Networks also supported:

selection_210

pgleeson commented 9 years ago

One major addition left, export to PNG...

See convertToPng() method in SVGWriter.java

pgleeson commented 7 years ago

PNG export fixed in latest version