[ImageJ-devel] Bug in ImageJ2 ?

Curtis Rueden ctrueden at wisc.edu
Thu Aug 23 09:57:47 CDT 2012


Hi Michael,


> There seems to be an issue with the InputHarvester and the SwingPanel if
> the object types of primitive java types are used as input parameters (e.g.
> Boolean instead of boolean).


Thanks for the report. It's definitely a bug due to our recent refactoring
of the widget system. Both Boolean and boolean are supposed to work. I'll
look into fixing it today.

-Curtis

P.S. Hopefully I will have time to respond to your ImgLib mail from
yesterday, too. I really appreciate you taking the time to look at and
improve the Projector logic. We did the minimum necessary at the time to
get something working, but currently everything is planar, and there is no
built-in (i.e., ImgLib2) zoom capability, which we will eventually need.


On Thu, Aug 23, 2012 at 8:24 AM, Michael Zinsmaier <michael.zinsmaier at gmx.de
> wrote:

>  Hi Curtis,
>
> I try currently to integrate the new imglib and ImageJ2 version (stuff
> from yesterday) into the KNIME ImageJ2 plugin.
> There seems to be an issue with the InputHarvester and the SwingPanel if
> the object types of primitive java types are
> used as input parameters (e.g. Boolean instead of boolean).
>
> The following plugin works fine:
>
> @Plugin(menu = {@Menu(label = "works")},
>          headless=true)
> public class Working<T extends RealType<T>> implements RunnablePlugin {
>
>     @Parameter(type = ItemIO.INPUT)
>     private boolean test;
>
>     @Parameter(type = ItemIO.OUTPUT)
>     private String output;
>
>     public void run() {
>             if (test) {
>                     output = "plugins can be defined as fragments of
> imagej.core";
>             }
>     }
>
> }
>
>
> while this plugin (Boolean instead of boolean) cannot be executed and
> results in a null pointer exception.
>
>
> @Plugin(menu = {@Menu(label = "works not")},
>          headless=true)
> public class NotWorking<T extends RealType<T>> implements RunnablePlugin {
>
>     @Parameter(type = ItemIO.INPUT)
>     private Boolean test;
>
>     @Parameter(type = ItemIO.OUTPUT)
>     private String output;
>
>     public void run() {
>             if (test) {
>                     output = "plugins can be defined as fragments of
> imagej.core";
>             }
>     }
>
> }
>
> Are only primitive types supported or is it a bug?
>
> Regards
> Michael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20120823/187c80a2/attachment.html>


More information about the ImageJ-devel mailing list