Skip to content, Skip to search

Changes

TrakEM2 Scripting

347 bytes added, 09:39, 4 February 2011
Obtain a collection of selected images
<source lang="python">
for d in Display.getFront().getSelected(Patch):
print d.title
</source>
The above is a static call that retrieves the list for whichever Display window happens to be activated, in front of all others. If you have a Display instance, perform the same operation via the Display's Selection:
 
<source lang="python">
front = Display.getFront()
selection = front.getSelection()
for d in selection.get(Patch):
print d.title
</source>
=== Setting and getting member objects in jython ===
Emailconfirmed, uploaders
653
edits