Posted by
Franklin Shaffer-2 on
Oct 07, 2014; 3:57pm
URL: http://imagej.273.s1.nabble.com/Thresholder-in-headless-macro-mode-results-in-NullPointerException-tp5009940p5009946.html
I want to change the rgb values of a single pixel.
I believe changeValues(v1, v2, v3); changes the values of all pixels within a certain range.
Thanks,
Frank
>>> Herbie <
[hidden email]> 10/7/2014 11:52 AM >>>
Frank Shaffer,
is this
"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."
ImageJ-macro command, what you are looking for?
For more macro commands have a look at:
<
http://rsb.info.nih.gov/ij/developer/macro/functions.html>
HTH
Herbie
:::::::::::::::::::::::::::::::::::::::::
On 07.10.14 17:44, Franklin Shaffer wrote:
> I'm reading values of color pixel from an image and converting the hex value to color values to r, g , b.
>
> I want to change the r,g,b values then write the new values to the pixel from a macro.
>
> I can make it work with the Fill tool, but it is extremely slow.
>
> Is there a better way to change the value of a color pixel from a macro?
>
> Thanks,
> Frank Shaffer
>
>
> Senior Research Engineer
> USDOE National Energy Technology Laboratory
> Office of Research & Development
> Mail Stop 84-202
> 626 Cochran's Mill Road
> Pittsburgh, PA 15236
>
>
[hidden email]
> Office: 412-386-5964
> Cell: 724-970-7262
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html