Login  Register

Re: Jet colormap (LUT)

Posted by Jerome Mutterer-3 on Jun 04, 2013; 9:37pm
URL: http://imagej.273.s1.nabble.com/Jet-colormap-LUT-tp5003222p5003224.html

Dear Neil, dear Gabriel,

the jet LUT can also be computed by this macro I adapted from a blog
post from Matt Stine that I found at http://www.metastine.com/?p=7

Jerome.


r=newArray(256);g=newArray(256);b=newArray(256);
for (i=0;i<256;i++) {
i4=4*i/256;
r[i]=255*minOf(maxOf(minOf(i4-1.5,-i4+4.5),0),1);
g[i]=255*minOf(maxOf(minOf(i4-0.5,-i4+3.5),0),1);
b[i]=255*minOf(maxOf(minOf(i4+0.5,-i4+2.5),0),1);
}
setLut(r,g,b);




On 4 June 2013 23:18, Gabriel Landini <[hidden email]> wrote:

> On Tuesday 04 Jun 2013 21:35:46 Neil Fazel wrote:
>> Under Image -> Lookup Tables, there are several dozen colormaps, but
> not
>> what's known at "Jet". (That's what Matlab calls it.) I think it's a
>> popular colormap. (The color progression looks somewhat like that in
> the
>> visible spectrum.) Is it perhaps hiding under a different name?
>
> I have one lut called jet (attached).
> Cheers
>
> Gabriel
>
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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