Thresholding image and measuring mean grey values in thresholded selection

bonej

#1

Hi all,

I am working with whole body micro-CT of mice. My goal is to segment out the entire skeleton (as best as possible) and compare grey values to that of a phantom to assess variation in bone density across experimental groups. As of right now, I highlight the bone using a manual threshold, but I can only measure the grey value in the highlighted area on one slice.

I have two questions

  1. Is there a way to select the entire skeleton without turning it into a binary image via the threshold tools? As I understand it that would erase the underlying grey values. An automatic method would be ideal, and optimize threshold does not seem to select the bone.

  2. How can I measure the grey values of the selected material across the entire stack?

Thank you for your help.

-Ben


#2

Yes, but it will take multiple steps. You can do a stack threshold or an adaptive threshold to get a binary mask, then use the mask to make a third image where the background is black (or NaN) and the foreground is the pixel values from the masked parts of the input image. Something like an AND or image calculator > multiply should do the trick. That’s only one way and I’m sure there are others - just realise that the binary image is a way of labelling the locations of pixels you want to keep, which you then have to use in conjunction with the input image to get the result you want.

Use Image > Stack > Statistics to get summary statistics across the entire stack. Bear in mind though that the zeroes will get counted too, so you may have to convert those to NaN, or make sure the thresholding step sets the background to NaN. NaNs are not counted in the summary stats, whereas zeroes are.


#3

Thanks! I will give this a try.