Macro to open image sequence

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Macro to open image sequence

Prefoninsane
I have folders full of images that I would like to import to imagej through a macro.

The macro should do the following:

1. Prompt user to choose a directory
2. Open all images in that folder (they are all .png) and import it as an image squence in numeric order.


Here is what I have so far:

dir = getDirectory("Choose Source Directory ");
list = getFileList(dir);
run("Image Sequence...", "open=[dir+list] sort");

It doesnt seem to work though, gives me error saying "no images", when there are definelty images in the?
folder I selected.

Thanks for any help!
Reply | Threaded
Open this post in threaded view
|

Re: Macro to open image sequence

Krs5
Dear Prefoninsane,

You have to use: run("Image Sequence...", "open=["+dir+list[1]+"] sort");


Best wishes

Kees

-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Prefoninsane
Sent: 15 July 2014 13:34
To: [hidden email]
Subject: Macro to open image sequence

I have folders full of images that I would like to import to imagej through a macro.

The macro should do the following:

1. Prompt user to choose a directory
2. Open all images in that folder (they are all .png) and import it as an image squence in numeric order.


Here is what I have so far:

dir = getDirectory("Choose Source Directory "); list = getFileList(dir); run("Image Sequence...", "open=[dir+list] sort");

It doesnt seem to work though, gives me error saying "no images", when there are definelty images in the?
folder I selected.

Thanks for any help!



--
View this message in context: http://imagej.1557.x6.nabble.com/Macro-to-open-image-sequence-tp5008738.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