Skip to content, Skip to search

Changes

TrakEM2 Scripting

31 bytes added, 07:21, 16 November 2010
Alexander Berthold van der Bourg found two errors in the find connected trees script
from jarray import array
from java.awt.geom import Area
from java.awt import Rectangle
# Obtain the currently selected treeline or areatree:
if connector.intersectsOrigin(area):
for target in connector.getTargets(Tree):
targettargets.append(target)
if len(targets) > 0:
outgoing[nd] = targets
Similarly, we could compute the incomming connections. There is a convenience method [http://pacific.mpi-cbg.de/javadoc/ini/trakem2/display/Tree.html#findConnectors() findConnectors()] in class [http://pacific.mpi-cbg.de/javadoc/ini/trakem2/display/Tree.html Tree] to return two lists: that of the outgoing and that of the incomming Connector instances. From these, one can easily get the connectivity graph, which you may also get by right-clicking on a Display and going for "Export - Connectivity graph...".
 
== How to find out the network of all arbors, related via Connector instances ==
Emailconfirmed, uploaders
653
edits