http://imagej.273.s1.nabble.com/Replace-one-value-by-NaN-tp3698434p3698436.html
Thank you.
R1.
> How about something like this
>
> float[] pixels = (float[])ip.getPixels();
> for (int i=0; i<pixels.length; i++)
> if (pixels[i]==100f) pixels[i] = Float.NaN;
>
> which replaces the value 100 by NaN.
>
> -wayne
>
> On Sep 4, 2007, at 10:29 AM, erwan bocher wrote:
>
> > Dear,
> >
> > I'd like to replace a value in my image by NaN.
> > Currently I use this method :
> >
> > ip.setThreshold(0.0d, 500.0d, ImageProcessor.NO_LUT_UPDATE);
> >
> > ImagePlus imp = new ImagePlus("",ip);
> >
> >
> > WindowManager.setTempCurrentImage(imp);
> > IJ.run("NaN Background");
> >
> > imp.show();
> >
> > Is it possible to replace only one pixel value ?
> >
> > R1.
> >
> >
> > --
> > Ingénieur de recherche
> > Docteur en géographie,
> > spécialité géomatique
> > École Centrale de Nantes
> > Institut de recherche en sciences et techniques de la ville
> >
http://www.irstv.cnrs.fr/> >
http://geosysin.iict.ch/irstv-trac/wiki> >
http://r1.bocher.free.fr> >
http://www.projet-sigle.org> >
>