Create LUT

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

Create LUT

Ihiertje
Hi,

I have a question about creating my own LUT.
For my code I would like to create my own LUT with about 3 colours for which I can define the values.
So for example:
red --> 0-10
orange -->10-20
Green -->20-30

However I can't find a way in image J to create this LUT. It is possible to select the colors, but not to give them specific values. Is it possible to make such a LUT in imagej or is there another way to do the same thing?

Thanks!

Iris

Reply | Threaded
Open this post in threaded view
|

Re: Create LUT

Herbie
Good day Iris,

it's always a good idea to consult the ImageJ user guide.
In this case I recommend "LUT Editor":
<https://imagej.nih.gov/ij/docs/guide/146-28.html#toc-Subsection-28.5>

Perhaps you start with opening an existing LUT and modifying it
according to your needs.

HTH

Herbie

::::::::::::::::::::::::::::::::::::::
Am 28.10.16 um 16:00 schrieb Ihiertje:

> Hi,
>
> I have a question about creating my own LUT.
> For my code I would like to create my own LUT with about 3 colours for which
> I can define the values.
> So for example:
> red --> 0-10
> orange -->10-20
> Green -->20-30
>
> However I can't find a way in image J to create this LUT. It is possible to
> select the colors, but not to give them specific values. Is it possible to
> make such a LUT in imagej or is there another way to do the same thing?
>
> Thanks!
>
> Iris
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Create-LUT-tp5017497.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: Create LUT

Michael Schmid
In reply to this post by Ihiertje
Hi Iris,

simply create three arrays reds, blues, greens, each with 256 entries
(byte arrays if you do it in java)
Then for the first 10 entries, set reds[i] to 255 (leave the others zero).
For entries 10-19 being orange, set reds[i] = 255 and greens[i] = 128.
For green, obviously, greens[i] = 255

Macro: setLut(reds, greens, blues)
Java:  LUT lut = new LUT(8, 256, reds, greens, blues);

Michael
________________________________________________________________
On 2016-10-28 16:00, Ihiertje wrote:

> Hi,
>
> I have a question about creating my own LUT.
> For my code I would like to create my own LUT with about 3 colours for which
> I can define the values.
> So for example:
> red --> 0-10
> orange -->10-20
> Green -->20-30
>
> However I can't find a way in image J to create this LUT. It is possible to
> select the colors, but not to give them specific values. Is it possible to
> make such a LUT in imagej or is there another way to do the same thing?
>
> Thanks!
>
> Iris
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Create-LUT-tp5017497.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: Create LUT

Herbie
In reply to this post by Ihiertje
Good day Iris,

meanwhile you've cross-posted to the forum for help but what about the
suggestion of Michael Schmid?

Here is a solution to

"For example:
Red = 100-150
Yellow = 50-100
Green =0-50"

with the suggested macro-approach:

//////////////////////////////////////
red = newArray(256);
green = newArray(256);
blue = newArray(256);
for (i=50; i<150; i++) {
        red[i] = 255;
}
for (i=0; i<100; i++) {
        green[i] = 255;
}
for (i=0; i<256; i++) {
        blue[i ]=0;
}
setLut(red, green, blue);
//////////////////////////////////////

Many examples are provided here:
<https://imagej.nih.gov/ij/macros/LookupTables.txt>

HTH

Herbie

::::::::::::::::::::::::::::::::::::::

Good day Iris,

it's always a good idea to consult the ImageJ user guide.
In this case I recommend "LUT Editor":
<https://imagej.nih.gov/ij/docs/guide/146-28.html#toc-Subsection-28.5>

Perhaps you start with opening an existing LUT and modifying it
according to your needs.

HTH

Herbie

::::::::::::::::::::::::::::::::::::::
Am 28.10.16 um 16:00 schrieb Ihiertje:

> Hi,
>
> I have a question about creating my own LUT.
> For my code I would like to create my own LUT with about 3 colours for which
> I can define the values.
> So for example:
> red --> 0-10
> orange -->10-20
> Green -->20-30
>
> However I can't find a way in image J to create this LUT. It is possible to
> select the colors, but not to give them specific values. Is it possible to
> make such a LUT in imagej or is there another way to do the same thing?
>
> Thanks!
>
> Iris
>
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.com/Create-LUT-tp5017497.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

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