Skip to content

Commit

Permalink
Merge branch 'devel'
Browse files Browse the repository at this point in the history
  • Loading branch information
DaisukeMiyamoto committed Jan 29, 2017
2 parents 0a3fd6b + 77bc7ff commit aa6089b
Show file tree
Hide file tree
Showing 44 changed files with 691 additions and 104 deletions.
53 changes: 53 additions & 0 deletions _docs/annotations.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Draw Annotations
================

draw annotations like stimulation points, samplings point or synapses.

- :download:`simple.swc<../tests/simple.swc>`


Draw marks
----------
.. code-block:: python
import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_mark((1.0, 1.0, 1.0), size=0.5)
vtkgen.write_vtk('simple.vtk')
vtkgen.write_annotation_vtk('simple_mark.vtk')
.. image:: _static/simple_annotation1.png

Draw SWC compartment marks
--------------------------
.. code-block:: python
import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_swc_mark(0, 2, size=0.5)
vtkgen.write_vtk('simple.vtk')
vtkgen.write_annotation_vtk('simple_swc_mark.vtk')
.. image:: _static/simple_annotation2.png


Draw Synapses
-------------

.. code-block:: python
import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_swc('simple.swc', shift_y=30)
vtkgen.add_swc_connection(0, 2, 1, 1, size=0.5, data=2)
vtkgen.write_vtk('simple.vtk')
vtkgen.write_annotation_vtk('simple_connection.vtk')
.. image:: _static/simple_annotation3.png

5 changes: 2 additions & 3 deletions _docs/drawmode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ Sample Program
.. code-block:: python
import os
from swc2vtk.vtkgenerator import VtkGenerator
import swc2vtk
filename = 'simple'
outputpos = ''
vtkgen = VtkGenerator()
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc(os.path.join('swc', filename + '.swc'))
for i in range(4):
vtkgen.set_draw_mode(i)
vtkgen.write_vtk(os.path.join(outputpos, filename + '_draw'+str(i)+'.vtk'))
``draw_mode = 0``
-----------------

Expand Down
1 change: 1 addition & 0 deletions _docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Welcome to swc2vtk's documentation!
examples
drawmode
volume
annotations
gallery
apis/modules

Expand Down
2 changes: 1 addition & 1 deletion _docs/volume.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sample Code
.. code-block:: python
import swc2vtk
vtkgen = VtkGenerator()
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc'))
vtkgen.write_volume_vtk('simple.vtk', origin=(-10.0, -10.0, -10.0), ratio=(1, 1, 1), div=(20, 20, 20))
Expand Down
Binary file added docs/.doctrees/annotations.doctree
Binary file not shown.
Binary file modified docs/.doctrees/apis/swc2vtk.doctree
Binary file not shown.
Binary file modified docs/.doctrees/drawmode.doctree
Binary file not shown.
Binary file modified docs/.doctrees/environment.pickle
Binary file not shown.
Binary file modified docs/.doctrees/gallery.doctree
Binary file not shown.
Binary file modified docs/.doctrees/index.doctree
Binary file not shown.
Binary file modified docs/.doctrees/readme.doctree
Binary file not shown.
Binary file modified docs/.doctrees/volume.doctree
Binary file not shown.
Binary file added docs/_images/simple_annotation1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/simple_annotation2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_images/simple_annotation3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
53 changes: 53 additions & 0 deletions docs/_sources/annotations.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
Draw Annotations
================

draw annotations like stimulation points, samplings point or synapses.

- :download:`simple.swc<../tests/simple.swc>`


Draw marks
----------
.. code-block:: python
import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_mark((1.0, 1.0, 1.0), size=0.5)
vtkgen.write_vtk('simple.vtk')
vtkgen.write_annotation_vtk('simple_mark.vtk')
.. image:: _static/simple_annotation1.png

Draw SWC compartment marks
--------------------------
.. code-block:: python
import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_swc_mark(0, 2, size=0.5)
vtkgen.write_vtk('simple.vtk')
vtkgen.write_annotation_vtk('simple_swc_mark.vtk')
.. image:: _static/simple_annotation2.png


Draw Synapses
-------------

.. code-block:: python
import swc2vtk
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc')
vtkgen.add_swc('simple.swc', shift_y=30)
vtkgen.add_swc_connection(0, 2, 1, 1, size=0.5, data=2)
vtkgen.write_vtk('simple.vtk')
vtkgen.write_annotation_vtk('simple_connection.vtk')
.. image:: _static/simple_annotation3.png

5 changes: 2 additions & 3 deletions docs/_sources/drawmode.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,19 @@ Sample Program
.. code-block:: python
import os
from swc2vtk.vtkgenerator import VtkGenerator
import swc2vtk
filename = 'simple'
outputpos = ''
vtkgen = VtkGenerator()
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc(os.path.join('swc', filename + '.swc'))
for i in range(4):
vtkgen.set_draw_mode(i)
vtkgen.write_vtk(os.path.join(outputpos, filename + '_draw'+str(i)+'.vtk'))
``draw_mode = 0``
-----------------

Expand Down
1 change: 1 addition & 0 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Welcome to swc2vtk's documentation!
examples
drawmode
volume
annotations
gallery
apis/modules

Expand Down
5 changes: 4 additions & 1 deletion docs/_sources/readme.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ Quick example
.. image:: _static/simple.0003.png


Citation
Reference
---------

Citation
--------
2 changes: 1 addition & 1 deletion docs/_sources/volume.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Sample Code
.. code-block:: python
import swc2vtk
vtkgen = VtkGenerator()
vtkgen = swc2vtk.VtkGenerator()
vtkgen.add_swc('simple.swc'))
vtkgen.write_volume_vtk('simple.vtk', origin=(-10.0, -10.0, -10.0), ratio=(1, 1, 1), div=(20, 20, 20))
Expand Down
Binary file added docs/_static/annotation1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/simple_annotation1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/simple_annotation2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/simple_annotation3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit aa6089b

Please sign in to comment.