Hi Francesco,
why not use the stack that you get with File>Import>Image Sequence?
With Plugins>Macros>Record, you can also record the IJ.run(...) command that you need for using this command in a plugin.
Alternatively, you could try the underlying method of ij.plugin.FolderOpener, e.g.
ImagePlus myNewImagePlusStack = Folderopener.open(path);
If the images would need too much memory, use the virtual stack option (only available with IJ.run): Then each image is loaded into memory only if you access the corresponding stack slice.
Michael
________________________________________________________________
On Jan 17, 2014, at 15:38, Francesco De Comite wrote:
> Hi all,
>
> I would like to write a plugin (not a macro) that read a whole directory of images and process them in order to produce a single image as a result.
> Do I have to use a stack ? Could someone show me a piece of code for loading several images
> and prepare them for processing ?
>
> Regards
>
> F. De Comité
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html