Open all images in a folder from the command line

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

Open all images in a folder from the command line

Ray Wery-2
Can someone suggest a method (macro) to open all images in the folder that the current image is contained in.

Ray Wery, M.S., D.A.B.R.
Medical Physicist / Radiation Safety Officer
Aspirus Wausau Hospital
Wausau, WI   54401
[hidden email]
715-847-2031


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Open all images in a folder from the command line

Krs5
Dear Ray

Something like:

dir = getDirectory("image");
close();
list = getFileList(dir);
for (i=0; i<list.length; i++){
        if (File.isDirectory(dir+list[i])){}
        else
        open(dir+list[i]);
}

Best wishes

Kees


Dr Ir K.R. Straatman
Senior Experimental Officer
Centre for Core Biotechnology Services
University of Leicester
http://www.le.ac.uk/biochem/microscopy/home.html


-----Original Message-----
From: ImageJ Interest Group [mailto:[hidden email]] On Behalf Of Ray Wery
Sent: 20 September 2013 13:59
To: [hidden email]
Subject: Open all images in a folder from the command line

Can someone suggest a method (macro) to open all images in the folder that the current image is contained in.

Ray Wery, M.S., D.A.B.R.
Medical Physicist / Radiation Safety Officer Aspirus Wausau Hospital
Wausau, WI   54401
[hidden email]
715-847-2031


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

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