Just posted this in the HCS sub-forum, but since it is not heavily trafficked and the issue is of a more general nature, I’m trying here.
I’m having trouble concatenating single images put out by a node into a table.
I started using the ‘Dose Response’ node from the HCS tools collection to produce a table with curve fit data and and an image with the fitted curves (all in one image). This works fine so far. Now I’ like to save each curve fit as a separate image, and found a posting to this end in the HCS forum, advising to implement this with a ‘Group Loop’ node.
So, I start (after some other preprocessing steps) with the Group Loop node, followed by the ‘Dose Response’ node. From there I pass the data output of the dose response node to a ‘Concatenate (Optional in)’ node and then terminate with a ‘Loop End’ node. This part works fine (I end up with a summary table of the DRC data).
I also pass the image output from the ‘Dose Response’ node onto an ‘Image To Table’ node and then again to a ‘Concatenate (Optional in)’ node. But here I end up only with the last processed image and not a table with each of the DRC images in a separate row. When I put an interactive table view node after the ‘Image To Table’ node and execute the loop, I can see the individual dose response curve images fly by - but they are not concatenated. What - if anything - am I missing?
Could you attach a simple workflow where this happens? Then I could reproduce it and see what the problem is.
Thanks so much for looking into this!
I have extracted part of my workflow with the dose response node, the loop and the image-to-table node, where the images don’t get appended, and have attached it below. I have exported the workflow without resetting it, so the data should be included in the knwf file. Please note, that the dose response node requires an R server to be running in the background (with a number of packages installed as described here: https://github.com/knime-mpicbg/knime-scripting/wiki/R-server-for-knime).
temp.knwf (302.7 KB)
Thank you for attaching the workflow, that was very helpful. The problem is, that the branch of the workflow where you create the image does not have an “loop end”. As in most programming languages a loop start needs a loop end. In KNIME, this marks the end of a workflow loop and collects the intermediate results by row-wise concatenation of the incoming tables. I added a workflow where the images are concatenated.
Hope that helps,
temp_loopEnd.knwf (337.7 KB)
There’s still a problem, though. The dose response node has outputs for data and for images, and I need to concatenate both. Initially, I put a ‘loop end’ node at the end of both of these branches, but then I got an error message (loop end already assigned - start node has more than one end node). Hence, I took out the ‘loop end’ for the images, assuming the ‘lood end’ in the data branch would take of terminating the loop in the image branch as well. Seems like, that’s not the case. Is there a workaround for that?
Guess, I there is a workaround: I just found a loop end node with two ports. That takes care of the problem.
Thanks again for your help!
Perfect! You are welcome.