Hi Martin,
did you try setMetadata("Label", string) ?
From:
http://rsb.info.nih.gov/ij/developer/macro/functions.html#setMetadatasetMetadata("Label", string)
Sets string as the label of the current image or stack slice. The first 60 characters, or up to the first newline, of the label are displayed as part of the image subtitle. The labels are saved as part of the TIFF header.
(note that "Label" is a constant; your label goes into the 'string' variable)
Michael
________________________________________________________________
On Aug 14, 2012, at 11:00, Martin Höhne wrote:
> Dear list,
>
> I´m looking for a way to rename the slices of a stack (in a macro) but can´t
> find it.
>
> What I mean is changing the info one gets with
> getInfo("slice.label");
>
> A work around would be to duplicate each slice separately with the new slice
> label as title and after each slice is duplicated recombine the images again
> into a stack with
> run("Images to Stack", "name=newstackname title=[] use");
>
> But is there an easier way to do this?
>
> Thanks,
> Martin
>
>
>
>
> --
> View this message in context:
http://imagej.1557.n6.nabble.com/rename-slices-tp4999754.html> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html