Dear Wayne,
You are completely right as your macro below indeed works as expected.
In fact the issue is in the case of point selections (which was the case in my
given applications).
See the following macro which I derived from yours and is reproducing the issue:
newImage("Untitled", "8-bit ramp", 512, 512, 1);
setFont("SansSerif", 116, " antialiased");
setColor("white");
Overlay.drawString("1", 82, 193, 0.0);
Overlay.drawString("2", 193, 310, 0.0);
Overlay.drawString("3", 348, 435, 0.0);
Overlay.show();
newImage("Untitled", "8-bit ramp", 512, 512, 1);
xpoints = newArray( 55, 23, 205);
ypoints = newArray( 43, 103, 43);
makeSelection("point", xpoints, ypoints);
Overlay.addSelection("blue");
Overlay.show();
run("Images to Stack", "use keep");
Kindest regards,
Philippe
----- Mail original -----
De: "Wayne Rasband" <[email protected]>
À: "imagej" <[email protected]>
Envoyé: Dimanche 16 Mars 2025 18:46:56
Objet: Re: Issue with the Overlays when doing Images_to_stack since 1.54k22
> On Mar 15, 2025, at 7:27 PM, CARL Philippe (LBP) <[email protected]>
> wrote:
>
> Dear all (probably Wayne),
> Before the version 1.54k9 (this is at least the last working version I had in
> stock) when I was doing an Image>Stacks> Images_to_Stack on images containing
> Overlays, all overlays were correctly attributed to the corresponding images
> within the obtained stack.
> And since the version 1.54k22 (which is the first version having issues from
> the ones I have in stock), all the overlays of the original pictures are
> mixed and shown over all the pictures within the obtained stack.
Dear Philippe,
I am not able to reproduce this problem using the latest version of ImageJ
(1.54p).
The macro below works as expected.
-wayne
newImage("Untitled", "8-bit ramp", 512, 512, 1);
setFont("SansSerif", 116, " antialiased");
setColor("white");
Overlay.drawString("1", 82, 193, 0.0);
Overlay.show();
Overlay.drawString("2", 193, 310, 0.0);
Overlay.show();
Overlay.drawString("3", 348, 435, 0.0);
Overlay.show();
newImage("Untitled", "8-bit ramp", 512, 512, 1);
Overlay.drawString("a", 213, 166, 0.0);
Overlay.show();
Overlay.drawString("b", 204, 331, 0.0);
Overlay.show();
Overlay.drawString("c", 202, 487, 0.0);
Overlay.show();
run("Images to Stack", "use keep");
> I suspect this issue as having been introduced by the following "1.54m 5
> December 2024" update:
> "Thanks to Gilles Carpentier, fixed several Hyperstack type conversion bugs."
> Thanks a lot in advance for your help on this.
> Kindest regards,
> Philippe
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html