Re: How to determine the current LUT name

Posted by Michael Schmid on
URL: http://imagej.273.s1.nabble.com/How-to-determine-the-current-LUT-name-tp5017978p5017979.html

On 31/01/2017 11:34, Stein Rørvik wrote:

 > Is there any way an ImageJ macro can determine the name of the
currently loaded LUT for the active image?
 > I can't find it under "Show Info" or anywhere else.
________________________________________________________________

Hi Stein,

as far as I can say, ImageJ does not store the name of the LUT.  If you
apply a LUT to an image, it only remembers the 256 R, G, B values (these
are set as ColorModel to the ImageProcessor holding the image).

You would have to write a plugin that takes the LUT of the current image
and compares it with the built-in ones (the list is available as
IJ.getLUTs).
You would have to create a dummy image, apply the luts one after the
other, and see whether it matches. (I see no way to access the ImageJ
built-in LUTs without applying them to an image; see the code of
ij.plugin.LutLoader).


Michael

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