Re: change white into transparent

Posted by Tiago Ferreira-2 on
URL: http://imagej.273.s1.nabble.com/change-white-into-transparent-tp5001929p5001931.html

On 2013.03.01, at 08:52 , marie louise wrote:

> Hi,
>
> I would like to gather the grey scale distubution of an area using
> Analyze>Plot profile, However there are certain spots (which are white,
> 255,255,255 in the file) which i like to exclude from this analysis, so to
> not take them into account. Is there  a way to do this? Can i for example
> change all the white in my image to transparent?
> Any hints are welcome!

Assuming you are dealing with grayscale values (you seem to be working with
RGB images[*]) perhaps the easiest way would be:

1) Convert to 32-bit (Image>Type>32-bit)
2) Apply a 0-254 threshold using Image>Adjust>Threshold...
3) Tick "Set Background Pixels to NaN" in the prompt

From that moment, 255 pixels should not appear in the profile plot as they
are set to NaN, "Not a Number"

[*] The ImageJ documentation pages should have a description of Image Types,
e.g.,<http://imagej.net/docs/guide/146-7.html>

-tiago

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html