ConvertImageToObjects - CellProfiler

Dear forum,

A quick question that is puzzling me-

I have generated an image for which intensity values are whole number values (x.0 where x is an integer) and successive intensities are separated by 1.0 (i.e. intensities are 1.0, 2.0, 3.0, 4.0…). The background intensity is 0.0.

I want to convert this image to a series of objects in which each intensity value is assigned to an individual object. i.e. any pixel with intensity value 1.0 is assigned to object 1, 2.0 to object 2, etc. up to the maximum.

I have had to convert my original image using the RescaleIntensity module (Divide each image by the same value = 100000) to ensure my image input to the ConvertImageToObjects module has floating point values between -1 and 1.

This rescaling appears to have worked fine in terms of retaining the original labels (scaled down by 100,000 each).

However, when I then try and run the ConvertImageToObjects module (Convert to boolean image = No), I never get the same number of objects as the maximum intensity value from my image.

I have tried changing the Preserve original labels/ Connectivity settings in the ConvertImageToObjects module.

Each time I get a different number of objects out but I never get the number I am expecting.

Any advice on how to directly convert an image with integer-spaced intensity values to objects, each with its own intensity value, would be greatly appreciated.

Thank you.

Hi @Emma_Imaging,

You can import such images directly as objects within the NamesAndTypes module. Be sure to set “Assign a name to” as “images matching rules”, which will allow you to specify the image type as “Objects”. See the screenshot below.

Hope that helps!