i would like to use cellprofiler for my senior thesis at MIT. how can i measure the intensity value of all the pixels in an object? thank you very much.


What do you mean by measuring the intensity value of all pixels in an object? Do you want the mean intensity of all pixels in the object, or the integrated intensity of all pixels? If so, the MeasureObjectIntensity module will do that for you.

Or, do you want to store every pixel’s value? This is not a built in function, but you could modify the code to make it possible. To store every pixel’s value for every object, you would go into the code of MeasureObjectIntensity and find the part where each object is measured - it’s around the line that says:
Greyim = OrigImage(rmin:rmax,cmin:cmax);

I think that grayscale image is actually a little rectangular patch containing the object of interest, but it’s not masked to the portion that actually contains the object itself, so you will need to only save pixel values where the object is located (see BWim variable for that, I believe). Play with a code a bit and let us know what the situation is and if you are able to figure it out.

Once you get the pixel values out, you can save the result in whatever format you would like - as a Matlab variable to the workspace for example. Or, if you want to be fancy you can save it in a way that allows exporting to some other format.