Write numbers into pictures

Hey folks,

is it possible to write several numbers into an image using the KNIME Image Processing nodes? If so, how can I do it? I searched and tried some time but was not succesful...

I have a bunch of microscopy images and want to number the nuclei in different colors (white for nuclei which will be further processed and red for nuclei which are going to be rejected at this point in the analysis). Images are 1024 x 1024 pixels and I have the XY-Position of each nuclei center.

Thank you very much!

Hi,

how can you distiguish these objects? What you could do is using the TableCellViewer and color the cells themselves and then use the boundingbox renderer and check show name/number on the right. Then you would see numbers and colored cells.

Since now, we don't have a node writing images with numbered cells (even if we can display this), but we could add this to the Labeling to RGB Image Node. Could you tell us a little bit more about your data, such that we get a better idea? Maybe: How to you segment them, or how do you distiguish between those which are further processed and those which are not? Maybe we can then better help you.

Cheers,

Christian

 

Good Morning!

I am processing some data derived by a CellProfiler pipeline. The data comes as CSV files and I have no problem processing this data with KNIME. At some point various nuclei (cells) have to be excluded from further processing (e. g. nuclei size exceeds a certain threshold or nuclei is too bulky).

As a kind of quality control I want to check visually what has been excluded by my nodes. Therefore I want to write the "object number" of each nuclei into the microscopy images.

I attached two PNG files to clarify what my goal is. The object numbers as well as the XY-position of each nuclei center are included within the CellProfiler CSV files.

Thanks,
Marc

Hi Marc,

I just created two example workflows how, which show how you could visually inspect your data after filtering. Restriction is, that you have to have your data as a labeling (segmentation). Maybe this helps you.

If you want to use your csv file and create a labeling out of it, we would have to write a node "Coordinates to BitMasks" or something like that. Maybe we can add such a node to our minor 1.0.4. release, which will be available next week.

I hope this helps somehow? If not let me know and we will figure out a way to help you ;)

Cheers,

Christian

 

Hi again,

I just figured out a way how to get your data as a labeling (see workflow attached). If a warning messages comes up, just click on OK and save it, this workflow should run anyway.

One more thing about the first two workflows:

I really didn't spend any effort to segment your data correctly, as you did that with cellprofiler. If you want to know how to do it in KNIME, we could also help you. For now, these workflows just serve as examples how you could inspect your data.

Tell me if you need anything more!

Christian

 

Christian, thank your very much for your help! Your workflows helped me to start (!) understanding how KNIME Image Processing works.

I think I have to play around with some nodes. Since I am analyzing hundreds of thousands of these images, it is a little bit inconvenient to work with the Interactive Segmentation View node or to share this data with my colleagues, who really like to scroll through a bunch of images in a folder rather than using KNIME.

It would be very helpful to have a node as you suggested. A node which can import the coordinates from a table in a workflow (like in my CSV file). Than I can put little Smilies :-) or :-( at these coordinates (good/bad nuclei) and write the images to the disk. Or so.

Is your e-mail address @uni-konstanz.de up-to-date?

Have a nice day!

Marc

Hi Marc,

good to hear. The table2labeling workflow helps you reading in your csv file. About the ":-)" and ":-(", we will find a solution for you. I will talk to my colleague on Monday how we could do this in a more general way. I will keep you updated!

My E-Mail still is christian.dietz@uni-konstanz.de ;)

Enjoy your weekend,

Christian

Edit: we have more example workflows on http://tech.knime.org/community/image-processing and next week we will even add some more! Maybe this also helps you understanding our concepts! HCS workflow is a very nice example for highthroughput classification.

One more idea what might help until we have a node for you (see attachment). Now you can save the images with different kind of colors as overlay for the cells.

Anyway, we will work on the other solution.

One remark: you need to checkout our nightly build from the update-site http://tech.knime.org/update/community-contributions/nightly, as the node Labeling to RGB Img is just there available in its current version.

Cheers,

Christian