Instructions for developing

Hi
I want to develop KNMIE nodes for image processing for my specific application.
I use the following resources to get familiar with this:

Especially the last link contains a lot of usefull examples. But I have the following questions:

  • Is there any documentation explaining all the core classes, such as org.knime.core.node.DataCell?
  • Is there any documentation explaining all knip classes, such as org.knime.knip.base.img.ImgPlusCell?
  • I want to learn from these examples, so it would be great if I could debug them. How should I do that? Can I import the knip repository in Eclipse and run some tests with it? How do I do that?
  • If you have any other useful information related to Developing (knip) nodes, please let me know

Thanks P

Hi @peterdl,

For developing KNIP nodes you need to setup your eclipse according to https://github.com/knime-ip/knip-sdk-setup. This allows you import the projects and compile them.

Sadly there is no detailed documentation of the inner workings of the knip classes. If you have specific questions please feel to ask them here.
best,
Gabriel

1 Like

Hi @gab1one
There are two things I would like to know more about.

First of all I would like to reuse the ImgPlusToImgPlusNodeModel as it implements a lot of nice reusable features. But looking at the examples I see that the execute function is no longer part of this class. How should it be used? And what is the call order of the methods: UnaryOutputOpearation and compute?

Second. The class org.knime.knip.core.ui.imgviewer.ImgViewer looks very promising. I would to use it. But how do I know which functionalities are possible? I did find some examples, such as https://github.com/knime-ip/knip/tree/master/org.knime.knip.io/src/org/knime/knip/io/nodes/annotation/create. But perhaps there is a lot more possible then in these examples?

1 Like

Hi @peterdl,
I am very sorry for my late reply.

The ImgPlusToImgPlus node model is a way to wrap UnaryOutputOperations into KNIME Nodes. These are based on a precursor library to imagej-ops which has never been published to Github. However, you can see the code in your eclipse when you set the community target platform. The best way for you to implement something is to take a look at existing nodes such as LocalMaximaForDistanceMapNodeFactory.

I think the best way to figure out how the imgviewer is used is to import the KNIP code into your eclise and look at the classes referencing it. (e.g. SegmentOverlayNodeView).

best,
Gabriel

Hi @gab1one
This time I have to appologize for my late reply. I will take a closer look at the code you suggested. For now I have two questions.

  1. I have the impression that some Nodes in the KNIP repository are not shown in the KNIME node repository or v.v. For example, the OverlayAnnotatorNode is only in KNIP, but not in KNIME. And the Interactive Annotator is only in KNIME, but not in KNIP. I would expect that both have the same nodes?

  2. Do you know if it is possible to create a standalone application using ImgViewer to quickly develop a view?

Thanks P

Hi @peterdl,

  1. Indeed, when a node is deprecated and replaced by a newer version, the old version of the node is still kept in the code base to enable the AP to execute workflows that contain that node, however the node is not visible in the node repository.
  2. The interactive annotator has a different name in the codebase, you can find it here: https://github.com/knime-ip/knip/tree/f284f3dae7f853a7523c88e0915f7562910e4ade/org.knime.knip.io/src/org/knime/knip/io/nodes/annotation/create
  3. I don’t think that is easily possible, as the ImgViewer makes use of plugin loading and dependency resolution mechanisms provided by KNIME AP / Eclipse.

best,
Gabriel

1 Like