I’m trying to set up a workflow in Knime that call a CellProfiler pipeline.
It works like a charm to get tables BUT I need to export output images and I could’t find a way to do it so far.
In the SaveImages module I tried to set the Output file location to Default Output Folder or to Same folder as image and I couldn’t get any output images.
I don’t necessary need the output image to be accessible/viewed within Knime, but at least I would like to have a look to the results of the segmentation.
The CellProfiler integration in KNIME only gets the output table back into KNIME, I guess you noticed this already, which is why you tried to work around this limitation by saving the images within your pipeline, right?
The knime-cellprofiler integration communicates with CellProfiler using knime-bridge, handing over the images as ImgPlus objects. The relevant code can be found in these two repositories:
I am not sure if there’s any path information associated with the input images in this case…
but that’s quite unfortunate that there is no way (yet) to output an image so the user can “visually inspect” the results of the segmentation.
I think this would be a great benefit for KNIME. Indeed, we generally prototype pipelines on some images and then run it on the whole dataset. Being able to check that the segmentation behaved relatively well for the entire project is something we recommend to our users.
Regarding the comments in the code :
What is the problem with an output to disk? KNIME can output to disk, right? CellProfiler should also be able to do so ?
It would be nice if one could specify a folder either in the CP pipeline, choosing default folder for example, or even better within the KNIME module.
I think that KNIME would be a great tool for this use case:
I have lif files (cellProfiler can’t read images in it), so it saves me the use of FIJI to export from the lif,
Cellprofiler with its modules Identify Primary and Secondary objects does a wonderful job, to detect and measure cells
But you have to merge the different tables (using the common ImageNumber tag) to make sense of your results (either with R, Excel, Knime …).
So here, Knime would allow to merge everything in one interface, reading the images, sending them to CP, getting the results and even plot them! if only I could also visually inspect my segmentation.