[CellProfiler] subtract a fixed value from images

Dear all,
I am quite new with CellProfiler and I am finding difficulties to do something that it seems to me basic.
How can I subtract a fixed value (i.e. 200) from an image?
I don’t want to calculate and measure it from a region, just put a fixed value.
What is the module that does math operation?

thank you,

Hi Emanuele,

I don’t think there’s a module that specifically lets you name a value to take away from an image but I’ve come up with a bodged way that will hopefully do.

If you insert a CalculateMath module and pick any measurement at all, multiply it by 0 and then add 200, then you will end up with a Measurement you can use in the ImageMath module with the subtract option.

Hope that helps,

There’s actually even a simpler way- in ImageMath, select the ‘None’ option, then in the ‘Add to result’ box type -200 .

BUT, just so you are aware, images are rescaled to 0-1 based on bit depth when loaded into CellProfiler, so my guess is what you actually want to subtract would be (200/255) or (200/65535).

Good luck!


Ah nice, I checked ImageMath first cause that’s logically where this would be and I thought there would be a way. Totally missed the the None option. Good to know!

1 Like

thank you both!