How to develop a custom node which reads multiple image files?


I’m a newbie at Knime custom node development and I’m trying to develop a node which reads multiple images based on the specified image extension (.jpg, .png etc.)

I’m able to do this in the NodeDialog using the following code which can select only single image file in the browser-

   public class XXXNodeDialog extends DefaultNodeSettingsPane {
           protected XXXNodeDialog() 
               createNewGroup("Select image files to be loaded ");
	           DialogComponentFileChooser fileChooser = new DialogComponentFileChooser( 
                                                XXXNodeModel.imgLocation(), "imgDir", 
                                               JFileChooser.OPEN_DIALOG, ".jpg|.jpeg" , ".png" , ".tiff|.tif");

I’ve tried many ways but couldn’t find any solution for this using DefaultNodeSettingsPane. Now, I’m trying NodeDialogPane – but don’t know how to as there are less examples on this.
Please suggest me anything that could help me do this.

DefaultNodeSettingsPane allows you to use the DialogComponents and SettingsModels. NodeDialogPane requires you to sort out all the load and save of settings yourself and use e.g.Swing components.

Take a look at the Load Text Files node in the Vernalis contribution. Some relevant source code is here:

And here:

In the latter, have a look at DialogComponentListFilesSelector and SettingsModelStringArrayFlowVarReplaceable


1 Like

Hi @knimeUser1,
you can take a look at how we did that in the KNIME Image Processing Image Reader node, where we defined a custom DialogComponent:

Speaking of KNIP, is there a specific reason why you can not use it? Are you missing features in the Image Reader node?

1 Like

Hi @gab1one,

Thanks for replying to me!

I already had a look at this one. I tried joining my Knime core nodes with this package, but, couldn’t find a way to merge this package with Knime core functionality.

Please let me know if you have a way to use this package in conjunction with general knime packages. All I could see is eclipse sdk or git clones. Is there a way I can import this package in the eclipse?


HI @knimeUser1,
Developing KNIME Image Processing code requires a special setup, how to get started is explained here: