KNIME Image Processing - Course Material
Make sure that you set up the KNIME Image Processing developer environment beforehand.
The folder knip-course-ij2-buddy
contains a KNIME Image Processing plugin that wraps an ImageJ2 Command.
If you are using this plugin as skeleton for a new project, you have to change the EclipseHelper
according to Point 4.
- Create a lib/ folder within the project and download the required artifacts to build the Coloc2 wrapper from maven.scijava.org into that folder.
- Add the libraries to the Runtime classpath (open plugin.xml in project) to add the
lib/*.jar
jars - Check if your Command is picked up when you execute the knime-launch-configuration
- Export the plugin to yor local KNIME installation (Right click knip-course-ij2-buddy > Export > Plug-in Development > Deployable plug-ins and fragments; select the plugins folder of your installation as destination)
- Restart KNIME to see if it is picked up
The dirctory knip-course-ij2-vanilla
contains an example ImageJ2 Command that can be installed as a KNIME Image Processing node via the ImageJ2 integration.
- Implement a Command that computes the mean intensity of an image
- Open your KNIME installation with the installed Image Processing Extensions
- Go to Preferences > KNIME > Image Processing Plugin > ImageJ2 Plugin Installation
- Add and select the JAR file that contains your Command
- Find the Command in the Node Repository
- Implement a Command that creates an empty image with dimensions read from a text file of the form:
dim0,dim1,dim2,...,dimN
- Open your KNIME installation with the installed Image Processing Extensions
- Go to Preferences > KNIME > Image Processing Plugin > ImageJ2 Plugin Installation
- Add and select the JAR file that contains your Command
- Find the Command in the Node Repository - any issues?
Import the directory org.knime.knip.course
via "Existing Projects into Workspace".
The has multiple packages:
example.copyimg
: Example implementation that shows how to access an ImgPlusCell and create a new ImgPlusCell. This example node simply copies every pixel of the input image to an output image.skeleton
: Empty node skeleton with no functionality and can be used as starting point to develop a new KNIME Image Processing Node.exercise
: Three exercises that of variing difficulty. The method signatures are alredy there and the exercises are described in comments.addconstant
: Exercise for a node which adds a constant value to an image. This is a good exercise to understand which parts a KNIME node consists of and how to handle the different states of a node.numpixels
: Exercise for a node which counts the number of pixels for each segment of a labeling. This is a good exercise to learn how to access a LabelingCell and LabelRegions and how to create multiple output rows for one input row.minmaxradius
: Exercise for a node which computes the minumum and maximum radius of each segment of a labeling. This is a good exercise to learn how to use imagej-ops in KNIME Image Processing nodes.
solution
: Example solutions for all three exercises.
Adding a new Node-Category:
- Open plugin.xml
- Go to Extensions
- Add org.knime.workbench.repository.categories extension point.
- Right click on extension point -> New -> category
Add a new Node to a Category:
- Open plugin.xml
- Go to Extensions
- Add org.knime.workbench.repository.nodes extension point.
- Right click on extension point -> New -> node