> How can I change a given value for another within a macro?
> For example, I want to replace all pixels with value 0 by values = 100.
> I understand I have to first select and then use setPixel(), but cannot
> find the way of selecting by value.
Have a look at the macro functions here:
http://imagej.nih.gov/ij/developer/macro/functions.htmlchangeValues(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.
Cheers
Gabriel
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html