Combining of two identified objects to one


#1

Hi all,

I was wondering whether a module exists that allows combining two objects to one.

Best,
Max


#2

Hi Max,

Yes - check out the module ReassignObjectNumbers with the “Unify” option.

Hope that helps,
David


#3

Hi David,

thanks a lot for your reply. Definitely helped, I actually have a different problem though - sorry for being so unspecific.
I was wondering whether it is possible to combine two object types to one, for example running two identfyprimaryobjects modules and combining both object types to one afterwards.

Best,
Max


#4

Oh I see. Hmm, there is no straightforward way to do this that I can think of. However if you really want, you could try this method:
(1) IDPrim #1
(2) IDPrim #2
(3) ExpandOrShrinkObjects > Shrink #1 by one pixel (This is a hack to keep touching objects separate)
(4) ExpandOrShrinkObjects > Shrink #2 by one pixel
(5) ConvertObjectsToImage > Binary #1
(6) ConvertObjectsToImage > Binary #2
(7) ImageMath > Add. Add the two new binary images
(8) IDPrimary on the new added binary image with a manual threshold of 0.5. This is your new object class.

You could re-expand your new object class when you are done if necessary, to compensate for the shrinking done earlier.

Hope that helps!
David


#5

Hi David,

works like a charm! Thanks a lot for your help!

Best wishes,
Max


#6

Great! Let us know if you think your use case is a common one and we here could think about coding a more straightforward way to combine defined object types.

Thanks,
David


#7

Hi David, thanks for the contribution for combining two identified objects to one. It would seem there will be an increasing need for this as researchers such as myself look to analyze complex structures like the kidney organoids here in the Freedman Lab… we want to be able to combine the separate parts of these structures to count the total number of organoids, and then understand how many have the component objects… thanks! Randy