Login  Register

Re: Name of duplicated slice from a stack

Posted by Michael Schmid on May 25, 2016; 4:34pm
URL: http://imagej.273.s1.nabble.com/Name-of-duplicated-slice-from-a-stack-tp5016521p5016525.html

Hi Gabriel,

you can have it with a macro:

//create a stack for testing (no images should be open)
run("Blobs (25K)");
run("Duplicate...", "title=whiteBlobs");
run("Invert");
run("Images to Stack", "name=Stack title=[] use");

//duplicate a slice, then rename it according to the label:
//setSlice(2); if desired
label = getInfo("slice.label");
run("Duplicate...", " ");
if (label != "")
   rename(label);

Nevertheless, I agree that it would be handy to have a checkbox 'Image
name from slice label' or so, in case a stack gets duplicated. The
checkbox could get grayed out when 'Duplicate stack' gets selected.

Possibly more elegant: Automatically suggesting the slice label as a
name when duplicating a stack and switching to something like
'stackName-1' when the user clicks 'Duplicate stack'. Typing something
into the 'Title' field should disable the automatic title generation.

Michael
________________________________________________________________
On 2016-05-25 13:59, Gabriel Landini wrote:

> I wonder if this would be a useful improvement.
>
> This already works:
> When converting images to stack one can use the image name to be kept as a
> slice label.
> When converting a stack to images the images take the name of the label if it
> exists.
>
> But when duplicating a single slice from a stack, the title of the resulting
> image is derived from that of the stack, not the slice label, and
> unfortunately the slice label is lost.
>
> I wonder if it would be useful to add an option to use the original slice
> label when one only duplicating a single slice.
>
> Or maybe this can be done already?
>
> Cheers
>
> Gabriel
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html