Login  Register

Re: How to programmatically apply a lut to an image

Posted by Eddie Iannuccelli on Jul 27, 2006; 5:40pm
URL: http://imagej.273.s1.nabble.com/How-to-programmatically-apply-a-lut-to-an-image-tp3701957p3701967.html

Thank you very much wayne, it works perfectly !

> -----Message d'origine-----
> De : ImageJ Interest Group [mailto:[hidden email]] De la
> part de Wayne Rasband
> Envoyé : jeudi 27 juillet 2006 18:11
> À : [hidden email]
> Objet : Re: How to programmatically apply a lut to an image
>
> > Hello,
> > Is it possible to programmatically set a lut, let's say
> Red, green or
> > Blue, to a 8 bit Image without using IJ.run("color")
> because my images
> > are not visibles during processing.
> >
> > I would like my plugin to save images with differents lut.
>
> In a macro, you can can apply a LUT to a non-visible image by
> running the macro in batch mode. Here is an example:
>
>     setBatchMode(true);
>     run("Blobs (25K)");
>     run("Fire");
>     saveAs("Tiff", "/Users/wayne/blobs.tif");
>
> In a plugin, you can do it by using the
> WindowManager.setTempCurrentImage() method:
>
>     ImagePlus img = IJ.openImage("/Users/wayne/blobs.tif");
>     WindowManager.setTempCurrentImage(img);
>     IJ.run("Fire");
>     IJ.saveAs("Tiff", "/Users/wayne/blobs2.tif");
>
> -wayne
>