[ImageJ-devel] Analyze Skeleton in jython
Johannes Schindelin
Johannes.Schindelin at gmx.de
Mon Sep 15 09:22:53 CDT 2014
Hi Harri,
On Mon, 15 Sep 2014, Harri Jäälinoja wrote:
> I would like to use the Analyze Skeleton plugin in a silent mode
> (http://fiji.sc/AnalyzeSkeleton) in Jython, but I don't know how to import the
> module.
>
> Based on the jar-file contents...
> dev at 192e0e6fb8a5:~/lmu-users/jaakko$ jar tvf
> /Fiji.app/plugins/AnalyzeSkeleton_-2.0.0-SNAPSHOT.jar
> 0 Tue Apr 15 17:25:22 UTC 2014 META-INF/
> 519 Tue Apr 15 17:25:20 UTC 2014 META-INF/MANIFEST.MF
> 0 Tue Apr 15 17:25:20 UTC 2014 skeleton_analysis/
> 1936 Tue Apr 15 17:25:20 UTC 2014 skeleton_analysis/Edge.class
> 1111 Tue Apr 15 17:25:20 UTC 2014 skeleton_analysis/Point.class
A better way is to inspect the Javadoc:
http://jenkins.imagej.net/job/Fiji-javadoc/javadoc/skeleton_analysis/package-summary.html
or the source code directly:
https://github.com/fiji/AnalyzeSkeleton
> ... I have tried
> import skeleton_analysis
>
> ... but I get the error
> ImportError: No module named skeleton_analysis
For performance reasons, we had to disable the wildcard imports (Jython's
startup was just really unbearably slow otherwise). Therefore, you have to
import the classes explicitly:
from skeleton_analysis import Edge, Graph, AnalyzeSkeleton_
Please feel free to become an active part of the community by enhancing
the documentation on the ImageJ/Fiji wiki. As a rule of thumb: if the
documentation could have done a better job helping you do your job, please
just edit it accordingly, to help the community.
Ciao,
Johannes
More information about the ImageJ-devel
mailing list