Import Image Sequence

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

Import Image Sequence

Neil Fazel
I'm trying to open the .txt files in a directory as a stack (on a Mac) using File -> Import -> Image Sequence... The dialog box shown in section 26.6.1 of the ImageJ manual is not displayed; an Open Image Sequence... dialog is displayed, and when I select the directory containing the files, nothing happens. I was expecting a stack of .txt images to be created. Is this not the way to do it?

Thanks,
Neil

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

Re: Import Image Sequence

Rasband, Wayne (NIH/NIMH) [E]
On Sep 2, 2013, at 1:45 PM, Neil Fazel wrote:

> I'm trying to open the .txt files in a directory as a stack (on a Mac) using File -> Import -> Image Sequence... The dialog box shown in section 26.6.1 of the ImageJ manual is not displayed; an Open Image Sequence... dialog is displayed, and when I select the directory containing the files, nothing happens. I was expecting a stack of .txt images to be created. Is this not the way to do it?

You need to use this macro:

  dir = getDirectory("Choose directory");
  list = getFileList(dir);
  run("Close All");
  setBatchMode(true);
  for (i=0; i<list.length; i++) {
     file = dir + list[i];
     run("Text Image... ", "open=&file");
  }
  run("Images to Stack", "use");
  setBatchMode(false);

This macro is also available on the ImageJ website at

   http://imagej.nih.gov/ij/macros/ImportTextImageSequence.txt

-wayne

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

Re: Import Image Sequence

Neil Fazel
In reply to this post by Neil Fazel
Thanks for the tip; ImportTextImageSequence.txt seems to do the job. (I also noticed the script OpenTextImagesAsStack.txt; I tried it and it gave me an error; it seems not to like blanks in directory paths.)

ImportTextImageSequence.txt adds the images to the stack alphanumerically, which is not the order I want. Is there a way to re-order images in a stack? (I looked at the options under Stack menu but couldn't find one to move images around in a stack.)

Thanks,
Neil

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

Re: Import Image Sequence

Joel Sheffield
If you go to the plugins page, I believe you'll find something called
"Stack Sorter".  That might do what you want.

Joel



On Tue, Sep 3, 2013 at 3:10 PM, Neil Fazel <[hidden email]> wrote:

> Thanks for the tip; ImportTextImageSequence.txt seems to do the job. (I
> also noticed the script OpenTextImagesAsStack.txt; I tried it and it gave
> me an error; it seems not to like blanks in directory paths.)
>
> ImportTextImageSequence.txt adds the images to the stack alphanumerically,
> which is not the order I want. Is there a way to re-order images in a
> stack? (I looked at the options under Stack menu but couldn't find one to
> move images around in a stack.)
>
> Thanks,
> Neil
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>



--


Joel B. Sheffield, Ph.D
Department of Biology
Temple University
Philadelphia, PA 19122
Voice: 215 204 8839
e-mail: [hidden email]
URL:  http://astro.temple.edu/~jbs

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