Login  Register

Re: Setting values to NaN with a macro

Posted by Herbie on Nov 15, 2016; 9:02am
URL: http://imagej.273.s1.nabble.com/Re-Setting-values-to-NaN-with-a-macro-tp5017580p5017584.html

Dear Miguel,

perhaps you try

print("(1, 1) = " + getPixel(200, 200));

instead of

print("(1, 1) = " + getPixel(1, 1));

HTH

Herbie

::::::::::::::::::::::::::::::::::::::::::::::
Am 15.11.16 um 02:23 schrieb Miguel Tapia R.:
> newImage("Untitled", "8-bit black", 400, 400, 1);
> run("32-bit");
> makeRectangle(83, 88, 235, 228);
> setForegroundColor(50, 50, 50);
> run("Draw");
> run("Macro...", "code=[if (v==0) v=NaN]");
> print("(1, 1) = " + getPixel(1, 1));

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