Handling image sequences w/o displaying the images



Dear all,

I would like to open an image sequence, select ROIs in each slice, and add them to RoiManager.
Now, because I need to work with thousands of images, speed is an important issue.
I believe that not showing the images significantly speeds up the process.
How can I handle with image sequences without displaying them with Java Plug-in?

I have tried to make an array of ImagePlus, and identified ROIs in every imp,
but Slice information is lacking for the selected ROIs.
Although SliceNumber of each imp can be indirectly known by the indices of the array,
(and roi.setPosition( ) might be used to associate the slice number to the ROIs),
I am wondering if there are better ways to do the job.


The following JavaScript code opens an image sequence as a virtual stack without displaying any of the images.

fo = new FolderOpener();
img = fo.openFolder("/users/wayne/stack/");
for (i=1; i<=img.getStackSize(); i++) {
  print(i+" "+img.getStatistics().mean);


Thank you Wayne, and sorry for my late response.
I will try your script!!