Re: Programmaticly applying an LUT to an ImagePluse
Posted by
Michael Schmid on
Nov 19, 2013; 9:00am
URL: http://imagej.273.s1.nabble.com/Programmaticly-applying-an-LUT-to-an-ImagePluse-tp5005592p5005596.html
Hi Nate,
'Fire' (like the other LUT names) is a menu command, so you can use the macro recorder in 'java' mode. You can also use something like
IJ.run("Fire");
or, if you want to specify an image (which need not be the foreground image)
IJ.run(imp, "Fire", null);
With Plugins>Utilities>Find Commands, you can also find the class responsible for this command, which is ij.plugin.LutLoader. Looking at its source, I suspect that something like the following will also work for the current foreground image:
new LutLoader.run("fire");
Michael
________________________________________________________________
On Nov 18, 2013, at 22:18, Robert Lockwood wrote:
> I'd like to try to apply an LUT such as "fire" to my very low contrast 16
> bit unsigned ImagePlus. The image displays very well using the below code:
>
> ContrastEnhancer ce = new ContrastEnhancer();
> ce.equalize(imp);
>
> I've not been able to find an example using Google so have come to drink
> from the well of knowledge again, Thanks.
>
> Nate
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html