> On Dec 3, 2024, at 8:35 AM, Christophe Leterrier > <[email protected]> wrote: > > Hi Wayne and ImageJers, > > I'm preparing some figures and I just realized there are two small issues, > one with the Stack>Combine command and one with the Selection>Straighten > command. > > 1) Stack>Combine does not preserve LUTs when combining a stack made of a > single multi-channel image.
Hi Christophe,
The ImageJ 1.54n3 daily build fixes bugs with how the
Image>Stacks>Tools>Combine command handles multi-channel images. The combined
image is RGB if the LUTs of the two source image do not match.
Here is an example:
run("HeLa Cells (48-bit RGB)");
setSlice(1);
run("Grays");
setSlice(2);
run("Red");
setSlice(3);
run("Green");
run("Duplicate...", "duplicate");
setSlice(1);
run("Cyan");
setSlice(2);
run("Blue");
setSlice(3);
run("Yellow");
run("Combine...", "stack1=hela-cells.tif stack2=hela-cells-1.tif combine”);
> Example:
> run("HeLa Cells (48-bit RGB)");
> run(" Grays ");
> run("Next Slice [>]");
> run(" 1 Red ");
> run("Next Slice [>]");
> run(" 2 Green ");
> run("Duplicate...", "duplicate");
> run("Combine...", "stack1=hela-cells.tif stack2=hela-cells-1.tif combine");
>
> The output stack is R/G/B rather than the W/R/B assigned before combining
> the two images. What would be expected is to retain the LUTs for each
> channel in the combined stack.
>
> 2) Selection>Straighten converts the image type to RGB when used on a
> multichannel image.
This bug is fixed in the ImageJ 1.54n3 daily build.
Here is a runnable example:
run("HeLa Cells (48-bit RGB)");
run("Grays");
run("Next Slice [>]");
run("Red");
run("Next Slice [>]");
run("Green");
makeLine(469,41,497,94,476,130,517,195,484,235,557,303);
run("Straighten...", "title=hela-cells-1.tif line=20 process”);
-wayne
> Example:
> run("HeLa Cells (48-bit RGB)");
> run(" Grays ");
> run("Next Slice [>]");
> run(" 1 Red ");
> run("Next Slice [>]");
> run(" 2 Green ");
> makeLine(469,41,497,94,476,130,517,195,484,235,557,303);
> run("Straighten...", "title=hela-cells-1.tif line=20 process");
>
> The output straightened three-channel stack is actually an RGB image (as
> displayed in the info line), as you can see by splitting the three channels
> of the output (Color>Split channels): as the LUTs are W/R/G, you get a mix
> of the second and third channels with the first one when splitting the RGB
> image.
>
> What would be expected is to keep the initial channels with their bit depth
> (16-bit) and the same contrast (Min/Max settings) as the input image for
> each channel. The same problem occurs when straightening a 3-channel, 8-bit
> image.
>
> Thank you,
>
> Christophe
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
smime.p7s
Description: S/MIME cryptographic signature
