Posted by
ctrueden on
Feb 06, 2017; 5:20pm
URL: http://imagej.273.s1.nabble.com/Writing-ImageJ-plugins-using-C-or-Python-tp5018035p5018036.html
Hi Xin,
If you like Python, you can write ImageJ scripts in Jython [1], but you
will not be able to call native C++ APIs easily.
In my opinion, the most major con of using C++ is portability and
distribution: you have to compile your native library(ies) for every
platform you wish to support, and then place them into the
platform-specific lib/<platform> folders of the ImageJ distribution on the
update site. And you do not get the benefits of a modern dependency
management system such as Maven—it will be extremely difficult for others
to build on top of your code. Personally, I think it defeats much of the
benefit of using Java.
So, I would suggest to language translate your code to Java instead. Then
it will run on all Java-enabled platforms, including ones you might not
immediately think about such as Solaris and Raspberry Pi.
Regards,
Curtis
[1]
https://imagej.net/Jython_Scripting--
Curtis Rueden
LOCI software architect -
https://loci.wisc.edu/softwareImageJ2 lead, Fiji maintainer -
https://imagej.net/User:RuedenDid you know ImageJ has a forum?
http://forum.imagej.net/On Mon, Feb 6, 2017 at 10:52 AM, Li, Xin (GE Global Research) <
[hidden email]> wrote:
> Hello,
> I have some image analysis code in C++ that I would like to turn into
> ImageJ plugins. Are there any pros and cons to write plugins using C++ or
> Python instead of Java? Please also let me know if you have any suggestions
> about writing plugins using C++ or Python. Thank you so much!
>
> Xin
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html