Resulting images as table (ImageJ plug-in nodes)

Hello,

I’ve been trying out KNIME for about a week in the context of ImageJ1 und ImageJ2 plug-in development. Unfortunately, I haven’t found a solution for the following problem so far:

My ImageJ2 plug-in receives an image from which some areas (of differing sizes) are to be cropped. The resulting images are saved in an array. What should the return value look like for KNIME to display the whole array (as a table of images, similar to the result of the ImageReader node).

Attempts for the ImageJ2 plug-in:

@Parameter(type = ItemIO.OUTPUT)
private ImgPlus[] output; 

or

@Parameter(type = ItemIO.OUTPUT)
private List<ImgPlus> output;

Those don’t work. When used as ImageJ2 plug-in, an error message is displayed for this ItemIO.OUTPUT Configuration. Instead of saving the images one by one in a folder, what should the proper workflow (and return value) be like? And how about ImageJ1 macros?

Best regards,

Dietrich Krugle

Hi Dietrich,

with the current integration we only support "Row-to-Row" based plugins, i.e. several inputs from one row can be mapped to several outputs in a row. You would need "Row-to-Rows", i.e. one row in, several rows out. We are currently working on an entire rewrite of the ImageJ2 integration (old plugins will of course still work) where "Row-to-Rows" is supported.

 

Here is what I would suggest as an workaround, until we actually can do "Row-to-Rows":

Represent the areas to be cropped as an "ImgLabeling" and output this. Then use the existing KNIME node called  "Segment Cropper" to crop the segments. This also has the benefit, that you are more flexible in visualizing the areas using the `Interactive Segmentation Node`.

If you need help with ImgLabelings, let me know!

Best, Christian

PS: What do you mean with "What about Imagej1" Macros? :-)

 

Hi Christian,

Thanks for your quick answer :) (had not expected to get an answer on a Saturday),
Do you know the approximate timeframe of the "Row-to-Rows". feature release for ImageJ2? Will ImageJ1.x Node Macro ever support „Row-to-Rows“?


My problem does not only concern cropping, actually I have a number of plug-ins that recognize certain parts of an image using differing methods. For comparing them, I intended to display the output as a row of images, so the workaround might not solve that issue.


By the way, when will KNIME Image processing get out of the beta phase?

Best regards,

Dietrich Krugle

Hi Dietrich,

(you even get an answer on Sunday ;-)).

Do you know the approximate timeframe of the "Row-to-Rows". feature release for ImageJ2? Will ImageJ1.x Node Macro ever support „Row-to-Rows“?

I don't want to make promises we can't hold. But it should be ready in Q4 2016. We are still trying to understand what's the most logical way to represent this behaviour in an ImageJ-Plugin.

My problem does not only concern cropping, actually I have a number of plug-ins that recognize certain parts of an image using differing methods. For comparing them, I intended to display the output as a row of images, so the workaround might not solve that issue.

Actually, if I understand you correctly, ImgLabeling is exactly what you need. ImgLabelings allow you to represent certain areas in your image and with the Interactive Segmentation Viewer you can then have a look at the overlays and compare the results to other (see our example workflow on the Example Server).

KNIPGateway.ops().create().imgLabeling(...)

allows you to create an ImgLabeling. You can get a Cursor or RandomAccess as from Img(s).

By the way, when will KNIME Image processing get out of the beta phase?

KNIME Image Processing is on version 1.4.1. We will release 1.5 or 1.4.3 (we haven't decided yet) in the next couple  of weeks and besides that we are already working on KNIME Image Processing 2.0 which will be faster and more hard-disc friendly. Also 2.0 will add types as transformations (e.g. for transformation), region of interest etc. So KNIP itself is out of Beta.

The KNIME Image Processing ImageJ Integration will be out of beta as soon as our refectoring is ready. That this plugin is still in Beta has historical reasons. We started the development of KNIP IJ in late 2012. Since then we worked on several things (e.g. ImageJ-Ops) in collaboration with the ImageJ2 team. Now, as everything stabilizes and many libraries of ImageJ are out of beta, we also will also bring KNIP IJ out of beta over the year. Actually, the new KNIP IJ will found as the basis for KNIP 2.0. We will also release the KNIME Image Processing - Scripting Plugin in the next couple of weeks, which will replace the IJ Macro Node and bring more scripting languages to KNIP, e.g. Java, Jython, JavaScript, BeanShell etc. and later matlab / R, as well as a new image viewer based on the big data viewer.

I hope this information helps you. If you need an code sample for ImgLabelings, let me know!


Best,

Christian

 

 

 

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.