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()
{
super();
createNewGroup("Select image files to be loaded ");
DialogComponentFileChooser fileChooser = new DialogComponentFileChooser(
XXXNodeModel.imgLocation(), "imgDir",
JFileChooser.OPEN_DIALOG, ".jpg|.jpeg" , ".png" , ".tiff|.tif");
this.addDialogComponent(fileChooser);
}
}
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:
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?