On Jul 23, 2014, at 3:48 AM, Christophe Leterrier wrote:
> Hi,
>
> Consider the following:
>
> run("Overlay Options...", "stroke=none width=0 fill=none set");
> run("Bat Cochlea Volume (19K)");
> run("Stack to Hyperstack...", "order=xyczt(default) channels=1 slices=2
> frames=57 display=Color");
> makeRectangle(11, 13, 48, 60);
> run("Add Selection...");
>
> Now the overlay is correctly associated with the first Z slice, but appears
> on all T points (if you move the T slider, the overlay stays visible). I'm
> wondering if the slice association of overlays (when the "set stack
> position" option is checked in the overlay options) is supposed to behave
> like this? Shouldn't slice association be the same for C, Z and T?
The Overlay.setPosition(c,z,t) macro function is the best way to position overlay elements. The following macro opens the 5D Mitosis hyperstack, sets its position to (c=1,z=4,t=15), creates a red overlay selection associated with (c=1,z=4,t=15), a green overlay selection associated with (z=4,t=15), a cyan overlay selection associated with (z=4) and a yellow overlay selection displayed at all positions.
-wayne
run("Mitosis (26MB, 5D stack)");
Stack.setPosition(1, 4, 15);
makeOval(5, 25, 30, 30);
Overlay.addSelection("red", 2);
Overlay.setPosition(1, 4, 15);
makeOval(45, 25, 30, 30);
Overlay.addSelection("green", 2);
Overlay.setPosition(0, 4, 15);
makeOval(85, 25, 30, 30);
Overlay.addSelection("cyan", 2);
Overlay.setPosition(0, 4, 0);
makeOval(125, 25, 30, 30);
Overlay.addSelection("yellow", 2);
Overlay.setPosition(0, 0, 0);
run("Select None");
> Thanks for your help,
>
> Christophe
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html