[ImageJ-devel] Parameter decorator and supported classes

Curtis Rueden ctrueden at wisc.edu
Thu Oct 30 12:51:23 CDT 2014

Hi Felix,

Apologies for the delay in reply. Due to work surrounding the ImgLib2
release, this is an exceptionally busy time.

> An ImgPlus is required, but none exists

The issue is that ImageJ2 uses the ImgPlus and Dataset classes for images,
but ImageJ1 uses ij.ImagePlus. And the automatic conversion between these
types is currently incomplete. The "Enable ImageJ2 data structures" option
of Edit > Options > ImageJ2 is intended to toggle this auto-conversion, but
it currently has performance problems, so is off by default.

We have a plan to address these issues, but it will be some time before the
work can be completed.

Some related issues in the issue tracker:
* https://github.com/imagej/imagej-legacy/issues/95
* https://github.com/imagej/imagej-legacy/issues/86
* https://github.com/imagej/imagej-legacy/issues/31
* https://github.com/imagej/imagej-legacy/issues/22

In the meantime, it may be easier to use ImageJ 1.x's image data structure:

   ImagePlus imp;

Instead of the IJ2/ImgLib2 ones.


On Wed, Oct 15, 2014 at 8:52 AM, MEYENHOFER Felix <felix.meyenhofer at unifr.ch
> wrote:

> Hi
> during my first attempts of implementing a ij2 plugin I realised that the
> following point is not clear to me:
> thanks to the widget demo of the imagej-tutorials I managed to define my
> UI in the ij2-way. Now during my further research to find a way to easily
> define an image input and getting the dialog with the Parameter decorator I
> found examples like
>         @Parameter(type = ItemIO.INPUT)
>         private ImgPlus<FloatType> img;
> or
>         @Parameter(type = ItemIO.INPUT)
>         private Dataset ds;
> but when running such code I get a warning-dialog saying; “An ImgPlus is
> required, but none exists”
> So I open an image and run  the plugin again. The same dialog appears
> again.
> All the other types work well (String, File, etc.). Is this a bug or am I
> missing something.
> Best regards,
> Felix
> _______________________________________________
> ImageJ-devel mailing list
> ImageJ-devel at imagej.net
> http://imagej.net/mailman/listinfo/imagej-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://imagej.net/pipermail/imagej-devel/attachments/20141030/57bfec2a/attachment.html>

More information about the ImageJ-devel mailing list