IJ1 Macro: apply a display range to a single channel in a composite image

contrast
luts
imagej1
macro
Tags: #<Tag:0x00007fd548947d00> #<Tag:0x00007fd5489477b0> #<Tag:0x00007fd548947300> #<Tag:0x00007fd548946e78>

#1

Dear Forum,
I am facing this “problem”:
how can I apply a LUT to a composite image to a single channel of a composite Image in a IJ1 Macro?

By now I am using this code:

run("Neuron (1.6M, 5 channels)");
Stack.setDisplayMode("color");
Stack.setChannel(2);
setMinAndMax(293, 4218);
run("Apply LUT");

It works but it keeps asking if I want to process all the stacks or just the current channel and it’s annoying since I have to use this code in a batch process folder way.

Thank you,
Emanuele


#2

Hi @emartini,

Isn’t run("Apply LUT","slice"); doing what you want ?

Best


#3

yes perfect!
thank you very much,
just an add the problem rose because the macro recorder recorded just run(“Apply LUT”) without the “slice”.
Thank you very much
Emanuele Martini