Hi Wayne,
Thanks for the macro.
ImageJ is giving an error in this macro that is associated with “Overlay.setPosition(i)”, though.
I cannot figure out what causes the error. Have you seen this before?
Regards,
Harald
From: Rasband, Wayne (NIH/NIMH) [E] [via ImageJ] [mailto:ml-node+[hidden email]]
Sent: Sunday, January 19, 2014 7:45 PM
To: Harald Verbraak
Subject: Re: Adding Filenames to images in a video
On Jan 17, 2014, at 6:03 PM, haraldverbraak wrote:
> Dear all,
>
> I am making a video of a stack of images by clicking File>Import>Image
> Sequence.
>
> Now I want to add the filename to each of these images in the video, but I
> do not know how I can do this.
Here is a macro that adds file names to a stack of images imported using File>Import>Image Sequence.
-wayne
setFont("SansSerif", 14);
setColor("white");
Overlay.remove;
for (i=1; i<=nSlices; i++) {
setSlice(i);
name = getMetadata("Label");
index = indexOf(name, "\n");
if (index>0)
name = substring(name, 0, index);
Overlay.drawString(name, 5, 20);
Overlay.setPosition(i);
}
Overlay.show;
--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
If you reply to this email, your message will be added to the discussion below:
http://imagej.1557.x6.nabble.com/Adding-Filenames-to-images-in-a-video-tp5006173p5006182.html
To unsubscribe from Adding Filenames to images in a video,
click here.
NAML
Free forum by Nabble | Disable Popup Ads | Edit this page |