Difference between revisions of "SNT: Python Notebooks"

(Getting Started)
(Redirect to updated content)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=Python Notebooks=
+
#REDIRECT [[SNT:_Scripting#Python_Notebooks]]
Direct access to the SNT API from the [https://www.python.org/ Python] programming language is made possible with the [https://pypi.org/project/pyimagej/ pyimagej] module. This enables full integration between SNT and any library in the Python ecosystem.
 
==Getting Started==
 
To initialize Fiji from Python:
 
<source lang="python">
 
import imagej
 
ij = imagej.init('sc.fiji:fiji')
 
</source>
 
Then, import the SNT classes you will need. For example, to download a neuron reconstruction from the MouseLight database, you would import the MouseLightLoader class:
 
<source lang="python">
 
MouseLightLoader = autoclass('tracing.io.MouseLightLoader')
 
</source>
 

Latest revision as of 06:24, 19 May 2019