Export measurement for each pixel within an object?

Hi,

I want to measure the thickness of an epithelium and have drawn one yellow at the bottom part and one blue line at the upper part of the epithelium. To measure the distance between the two lines i’m using Morph/ distance on the blue line image and then I measure the intensities in the yellow line (as an object). I can then export mean, median, max values etc.

  1. I would like to export the intensity values from each pixel in my object (the yellow line), (not only the integrated intensity) is it possible to do this, or possible to add such a function?
  2. I can display a histogram of these intensities by using MaskImage, but i can’t change the axes nor export these histograms automatically, it would be great to be able to export the histogram (and then also the measurement values), is it possible to add that functionality?

Thank so much!
Gabriella

Hmmm… Whether these things are possible to add is a better question for @agoodman , but pretty sure neither is currently possible* nor currently likely to be added; 2) was considered as a feature to add a long time ago but rejected at the time as being very difficult to implement and only helpful for a small set of users; 1) I don’t think was ever considered purely from a practical perspective- It’s not uncommon for an image to be 4million (or more!) pixels, and for there to be 4 or more channels (now we’re up to 16 million), and more than 100 images to segment (1.6 billion)- you can see where exporting pixel-by-pixel data starts getting out of hand very quickly.

2 things therefore-
A) You may not be able to automatically generate these histograms, but you can probably re-create the image-by-image ones (and a lot more information too) in CellProfilerAnalyst, and if you want just a single histogram for the whole set you can use DisplayHistogram as a data tool at the end of an analysis (read the help for that module as a place to start)
B) Why do you want the values of every pixel? IE is there something particular about your images you want to uncover that we may be able to help you get at a different way?

*Disclaimer- to the best of my knowledge. This is outside the usual scope, so there may be stuff I don’t know.

Hi!

Ok, i can see that it may be a lot of data to export each pixelvalue! We are measuring the thickness of the cervix epithelium which can vary a lot within one image, and from image to image (a thick epithelium protects better against pathogens). If we had all the values we could plot the distribution of the thickness, and potentially also get a nice graph, kind of a “reconstruction” of the epithelium thickness. I will look into what CPA can do! Thanks for your help!

Hmmm, I see!

If you want, you can upload your pipeline and a sample image or two; I have a wacky idea that might work to get you the data you want, but I won’t know until I try it.

Great, sounds exciting! I’ve attached one images and the pipeline. Let me know if you have any questions!
Thanks,
Best
Gabriella

And here is the pipeline!

Distance_measure_160513_Final.cpproj (664 KB)

So I think this’ll basically work- I took your pipeline and masked your yellow line with a 1 pixel wide grid (once regularly, once inverted so that you keep all the data), then defined objects from that- you get slightly more objects than you’d think (~1800 for a 1632 pixel-wide image), I think because your line sometimes curves back on itself a bit, but it should basically now have a small object at every pixel width, the median/mean intensity of which you could measure.

I included the updated pipeline, a grid that’s the size of the one image you gave me, and a grid that’s 2048^2 because I have a suspicion that you cropped that down from a larger field given the dimensions; if you use this approach, you’re going to want to have all the images the same size or theoretically you’d have to make an equal-sized grid for each one and analyze them one at a time.

stripes1632.zip (14.4 KB)