Using node without GUI

Hi everybody,

i wrote a node which uses an external program to create some pngs. now i want to show these pngs in the knime GUI. I know that there is a node which reads PNGs (i think it is calles "Read PNG Images") but i want that my node returns a datatable containing the images (without the need for a second node).

Is there any way to implicitly execute the Read PNG Images-node after my own node? The node model is not visible for other nodes and it uses private methods so i can't just copy the code of the read png node's execute function.

Is there anything like executeNode(nodeModel, inData, args)?




Hi Jonas, I guess your node needs an data out-port which returns the file locations / URL of the PNGs to which you can connect the Read PNG Images node. Is this what you are looking for? Cheers, Thomas

I now that and this is working.

I want that my node returns the images itself without a second node which reads the images. This is like implicitly eecuting the read images node after my node without creating/executing it by hand

Interesting use case, but you could use ReadPNGFromURLNodeFactory#createNodeModel() and the run#execute to process your DataTable.

Yes, i thought so,too but when i try

  ReadPNGFromURLNodeFactory readPngModelfactory = new ReadPNGFromURLNodeFactory();
  ReadPNGFromURLNodeModel readPngModel = readPngModelfactory.createNodeModel();


It says that org.knime.base.node.image.readpng.ReadPNGFromURLNodeModel is not visible. The NodeFactoryImport works well.

I'm having the exact same problem: can use the Factory, but not the NodeModel (with another node, but doesn't matter).

How to get around this?



i know it is an old post but I have a very similar case now. There are two problems in the proposed solution: first the execute method is protected, so I can't execute it and the second problem is that i don't know how to configure the node... optimal would be if I could do something like this

NodeSettingsRO settings = .............
myOthernodeFactory nodeFactory = new myOthernodeFactory();
myOtherNodeModel nodeModel = nodeFactory.createNodeModel()
BufferedDataTable[] myOutput = nodeModel.execute(inData, exec)


Is this possible in any way?


Thanks for your help!




I understand the requests and the reasoning but making that part of the code accessible would mean we define it as API. While the node behavior in the workflow needs to be stable ("usage API") we do not want to commit to having stable code API for individual node implementations. This would open a can of worms for us and would make it very difficult to deprecate nodes or to change their internals (like configuration handling).

So you are best off copying the respective parts and extract what you need.