-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- new module: b3d - added nblast all-by-all to rmaid - improved neuron objects in core - updated docs - bugfixes (morpho, igraph and elsewhere) - made all code pep8-compliant: all 4 space indents now, trailing whitespaces removed, etc.
- Loading branch information
Showing
60 changed files
with
6,240 additions
and
4,701 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Binary file not shown.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The b3d module | ||
--------------- | ||
|
||
.. automodule:: pymaid.b3d | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
Blender interface | ||
***************** | ||
|
||
Pymaid comes with an interface to import neurons into Blender: :mod:`pymaid.b3d` | ||
|
||
.. note:: | ||
Blender's Python console does not show all outputs. Please check the terminal | ||
if you experience issues. In Windows simply go to `Help` >> `Toggle System | ||
Console`. In MacOS, right-click Blender in Finder >> `Show Package Contents` | ||
>> `MacOS` >> `blender`. | ||
|
||
Installation | ||
============ | ||
|
||
Blender comes with its own Python 3.5, so you need to install PyMaid for this distribution in order to use it from within Blender. | ||
|
||
There are several ways to install additional packages for Blender's built-in Python. The easiest way is probably this: | ||
|
||
1. Download `PIPs <https://pip.pypa.io/en/stable/installing/>`_ get-pip.py and save e.g. in your downloads directory | ||
2. run get-pip.py from Blender Python console: | ||
|
||
>>> with open('/Users/YOURNAME/Downloads/get-pip.py') as source_file: | ||
... exec(source_file.read()) | ||
|
||
3. Then use pip to install any given package. Here, we install as Scipy an example: | ||
|
||
>>> import pip | ||
>>> pip.main(['install','git+git://github.com/schlegelp/pymaid@master']) | ||
|
||
Alternatively run Blender's Python from a Terminal. In MacOS do: | ||
1. Make sure Blender is in your Applications folder | ||
2. Right click on Blender icon -> **Show Package Contents** | ||
3. Navigate to **Contents/Resources/2.XX/python/bin** and run **python3.5m** by drag&dropping it into a Terminal | ||
4. Try above steps from the Terminal | ||
|
||
Quickstart | ||
========== | ||
|
||
:mod:`pymaid.b3d` provides a simple handler that let's you add, select and manipulate neurons from within the Blender terminal. Try this from within Blender's console: | ||
|
||
>>> from pymaid import pymaid, b3d | ||
>>> rm = pymaid.CatmaidInstance('server_url', 'http_user', 'http_pw', 'token') | ||
>>> pymaid.remote_instance = rm | ||
>>> # Fetch a bunch of neurons | ||
>>> nl = pymaid.get_3D_skeleton( 'annotation: glomerulus DA1' ) | ||
>>> # Initialise handler | ||
>>> handler = b3d.handler() | ||
>>> # Load neurons into scene | ||
>>> handler.add( nl ) | ||
>>> # Colorise neurons | ||
>>> handler.colorize() | ||
>>> # Change thickness of all neurons | ||
>>> handler.neurons.bevel( .02 ) | ||
>>> # Select subset | ||
>>> subset = handle.select( nl[:10] ) | ||
>>> # Make subset red | ||
>>> subset.color(1,0,0) | ||
>>> # Change color of presynapses to green | ||
>>> handle.presynapses.color(0,1,0) | ||
>>> # Show only connectors | ||
>>> handle.connectors.hide_others() | ||
>>> #Clear all objects | ||
>>> handler.clear() | ||
|
||
|
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "0.45" | ||
__version__ = "0.46" |
Oops, something went wrong.