Select objects with certain value in labeled image

Hi everyone,

I used H-watershed to segment and label fluorescently stained nuclei in a 3D image. As an output I receive a 3D image in which objects are labeled with onging numbers starting from 1. Every object has one number and every number is given only once. Then I measured the mean intensity of each object using the 3D Intensity Measure plugin. This plugin calculates mean intensities of the given objects using the original intensity image.
Now I want to select only those objects, which mean intensities are within a given range (let´s say between 100-300). I know already, which number/label these objects have.

My question: How can I tell ImageJ that it should retain only those voxels with a given value (for instance object number 3, 10 and 12) and discard all the other?

Hope this was more or less understandable.

Thanks a lot!


changeValues(v1, v2, v3)
Changes pixels in the image or selection that have a value in the range v1 - v2 to v3 . For example, changeValues(0,5,5) changes all pixels less than 5 to 5, and changeValues(0x0000ff,0x0000ff,0xff0000) changes all blue pixels in an RGB image to red. In ImageJ 1.52d or later, use changeValues(NaN,NaN,value) to replaces NaN values.

Is this what you mean? Repetetive apply to your image…


in MorphoLibJ there is a plugin for keeping only the labels from a list given by the user. It seems it corresponds to what you want.
It is in Plugins -> MorphoLibJ -> Label Images -> Select Label(s)

Thanks, but as I am working with a lot of objects that is too time-consuming. The MorphoLibJ suggested by dlegland however works fine!

Thank you! Great idea :slight_smile: