How to determine the current LUT name

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

How to determine the current LUT name

Stein Rørvik
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.

Stein


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: How to determine the current LUT name

Michael Schmid
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