Problem with set pixel to NaN

Tags: #<Tag:0x00007fb88202f1d8> #<Tag:0x00007fb88202ef80> #<Tag:0x00007fb88202ed28>


Hi All,
I am new to ImageJ, and currently having a problem when I try to change some pixels to NaN.

I have an 32-bit tif image with pixel values of only 255 and 0, which is black and white. When I using macro changeValues(0,0,NaN); the whole image turn to black. but I can see that some pixels have value 255, and others NaN.
I tried this macro with another black & white image downloaded from google, and it works. in the google downloaded image, the white color range from 235~255, while black is 0.

Can anyone help me with this issue?

Best regards,

p.s. First time in this forum, anyone can tell me how to attach my image here?


Dear @Saiqi_Zeng,

The Lookup Table, i.e. the visual representation, gets automatically updated to the values in the images (which in your case is only 255). You can go back to your original image via Image > Adjust > Brightness/Contrast, clicking Set, and setting the minimum to 0.



Hi Stefan,
Thanks a lot for your advice! That solve the problem!