Use > 8bit LUT in Fiji

Dear All,
Dear @imagejan,

I was just wondering:
Can ImageJ apply 12- or 16 bit LUT to 16-bit images?

I have 16-bit segmentation results (stacks) with > 256 objects.
Thus, a 12- or 16 bit glasbey variant would be very useful.

The colors themselves could be repeated.

Thanks a lot &
Kind regards

Tobias

Hello Tobias -

As far as I am aware, ImageJ does not support LUTs larger
than 8 bits.

I don’t really understand your use case.

But as a possible work-around, you might be able to get the
richness of a 24-bit LUT by applying different LUTs to copies
of your 16-bit image (possibly rescaling or thresholding the
pixel values first), and then combining them into a single RGB
image.

Here’s an IJ Macro that illustrates this general idea:

newImage ("Slice-1", "16-bit ramp", 256, 256, 1);
run ("Duplicate...", "Title=Slice-2");
run ("Duplicate...", "Title=Slice-3");
selectWindow ("Slice-1");
run ("Fire");
run ("RGB Color");
selectWindow ("Slice-2");
run ("Rotate... ", "angle=45 ");
// de facto "Grays" LUT
run ("RGB Color");
selectWindow ("Slice-3");
run ("Rotate 90 Degrees Right");
run ("Ice");
run ("RGB Color");
run ("Images to Stack");
run ("Z Project...", "projection=[Sum Slices]");
saveAs ("PNG", "pseudo_lut.png");

Here is the “pseudo-lut” image as a regular RGB image:

pseudo_lut

Thanks, mm

1 Like

I think lines 2 and 3 should read:

run ("Duplicate...", "title=Slice-2");
run ("Duplicate...", "title=Slice-3");

(small case "title …)

1 Like

Dear @mountain_man ,

thanks a lot it is for making images like this:

image

Kind regards

Tobias

Dear @mountain_man,

thanks a lot!
I had hoped it works directly.

But your solution is a good work-around for now.
Thanks a lot!

I have stacks to start with.
Thus, i use the image calculator to average results.
(your solution would be easier for 2D).

Thanks again &
Kind regards

Tobias