Cellprofiler: Feature Request: ConvertImageToObjects

Created on 19 Apr 2017  路  10Comments  路  Source: CellProfiler/CellProfiler

This module would be the inverse of the ConvertObjectsToImage module.

For example, a set of objects was converted into an image using ConvertObjectsToImage This image was processed further, but still remains a valid label image. Now, this label image will be converted back into objects using the ConvertImageToObjects module.

Currently, I threshold the label image and use IdentifyPrimaryObjects to re-find objects, but these extra open the door for introducing unwanted changes in the segmentation.

All 10 comments

I don't understand your use case. Why not use the output from IdentifyPrimaryObjects?

I've run into this before. The problem is that while you would think IDPrim should handle a label matrix since the separation between neighboring objects is distinct (not noisy like for actual images), that's often not the case. Using a watershed on the label matrix doesn't always work, esp. the neighboring labels are v. close in magnitude.

Addendum to above: This is still the case even if Smoothing method for thresholding is set to None.

BTW: If this were to be implemented, I would put this in IDPrim as an option in "Threshold strategy" rather than a separate module.

@braymp I don't understand your use case, either. Why would it be a "Threshold strategy"? What problem are you trying to solve?

Basically, it's this: If I convert an object set to an image, I'm now have a label matrix that I might want to convert back to objects later in the pipeline but can't do so reliably with IDPrim.

Since I can't extract the objects from the label matrix using the IDPrim settings, @karhohs is suggesting the addition of a different path forward.

I don't understand why you need to convert the object image back into objects. Why not use the original objects (the input to ConvertObjectsToImage)?

There is one use case I can think of (resizing a label matrix), but that will be obsolete with ResizeObjects. Perhaps @braymp or @karhohs have others?

In @karhohs' use case, he says this label matrix underwent further processing, presumably some transformation that an existing object-input module couldn't do, but an image-input one could.

I can't recall my use case specifically, but I've done this as well and hit the same barrier with re-conversion.

I am concerned that this would be very difficult to implement safely. It's very likely some operation will convert your integer label matrix to floating point scaled to the range [0, 1]. We should implement object manipulation modules rather than ConvertImageToObjects.

Was this page helpful?
0 / 5 - 0 ratings