Login  Register

Re: open images in a directory

Posted by Herbie on Oct 06, 2016; 11:33am
URL: http://imagej.273.s1.nabble.com/open-images-in-a-directory-tp5017299p5017302.html

Dear Martin,

if you only want to open the images in a folder and if you ae sure that
the folder contains only images that ImageJ can open then you may try
the following macro:

///////////////
dir = getDirectory( "Choose the Directory" );
list = getFileList( dir );
for ( i=0; i<list.length; i++ ) {
    open( dir + list[i] );
}
///////////////

HTH

Herbie

:::::::::::::::::::::::::::::::::::::::::::::::
Am 06.10.16 um 13:14 schrieb Braekevelt Martin:

> Dear Herbie,
>
> Thanks for the help. What I want is a macro that opens all images in
> a folder. This macro I want to use by a button on an action bar. I
> have different tasks that I want to put in different macro's so that
> I have flexibility of what I want to do, one of them is having a
> manual point count by use of a grid, the other one is roughness
> measurements on profiles. These are tests that need be installed on
> systems used by other microscopists of different level so it must be
> user friendly without have a lot of experience in imageJ. The primary
> need is open image folders and all images need be open.
>
> Thanks in advance for the help.
>
> Kindest regards, Martin.
>
> -----Original Message----- From: ImageJ Interest Group
> [mailto:[hidden email]] On Behalf Of Herbie Sent: Thursday,
> October 06, 2016 12:46 PM To: [hidden email] Subject: Re: open
> images in a directory
>
> Dear Martin,
>
> you don't really tell us what you want to do with your images.
>
> Do you really need to have all of them open or can you process one
> after the other?
>
> In the latter case, you need a loop to open, then process and finally
> close one image after the other.
>
> ImageJ comes with a lot of example macros
> <https://imagej.nih.gov/ij/macros/> and some, e.g.
> "BatchProcessFolders", deal with what you need to open images from a
> directory one after the other.
>
> HTH
>
> Herbie
>
> ::::::::::::::::::::::::::::::::::::::::::::::: Am 06.10.16 um 10:01
> schrieb Braekevelt Martin:
>> Dear,
>>
>> I want to open a set of images which are stored in a directory. By
>> the batch tutorial I can manage to get the directory but I cannot
>> find to open all images at once. Only one by one. Once I have all
>> images open I think I can use the array in batch mode to process
>> them all I guess. Any suggestion how I can do this in a macro ?
>>
>> Thanks in advance Kindest regards, Martin.
>
>
>
> -- View this message in context:
> http://imagej.1557.x6.nabble.com/open-images-in-a-directory-tp5017299p5017300.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
>

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