pngs to avi (making a stack) programatically

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

pngs to avi (making a stack) programatically

the6e
HI!

steps in the gui
---------------
1. open all your images in ImageJ. Make sure they are sequentially named in an order (like 001, 002,... etc)
2. make a stack of your images by (Image/stacks/convert images to stack)
3. save stack as AVI (fle/save/AVI)

Im trying to make an avi from a LARGE set of png images.  I know how to do this from the gui, however I have a few questions that I hoped someone knowledgable could answer for me...

questions
---------
1. Can this be achieved without the gui?  (im new to Imagej)

2. I was curious if there was a size limitation to the stack of images?  I thought I may have read somewhere that it maxes out at 1.7 gigabytes, but Im not sure if that makes sense.

3. How would I convert png image files into a stack programatically?


thanks!

Reply | Threaded
Open this post in threaded view
|

Re: pngs to avi (making a stack) programatically

Wayne Rasband
> steps in the gui
> ---------------
> 1. open all your images in ImageJ. Make sure they are sequentially  
> named in
> an order (like 001, 002,... etc)
> 2. make a stack of your images by (Image/stacks/convert images to  
> stack)
> 3. save stack as AVI (fle/save/AVI)
>
> Im trying to make an avi from a LARGE set of png images.  I know  
> how to do
> this from the gui, however I have a few questions that I hoped someone
> knowledgable could answer for me...
>
> questions
> ---------
> 1. Can this be achieved without the gui?  (im new to Imagej)
>
> 2. I was curious if there was a size limitation to the stack of  
> images?  I
> thought I may have read somewhere that it maxes out at 1.7  
> gigabytes, but Im
> not sure if that makes sense.
>
> 3. How would I convert png image files into a stack programatically?

A folder of images can be converted to an AVI using two commands. Use  
File>Import>Image Sequence to open the images as a stack and  
File>Save As>AVI to save it. There is no limit to the size of the  
stack if you enable "Use Virtual Stack" in the Import>Image Sequence  
dialog. To create a macro, run these commands with the recorder  
(Plugins>Macros>Record) running.  Save the macro in the macros folder  
as convert.txt and run it from the command line using something like:

     java -jar ij.jar -batch convert

-wayne
Reply | Threaded
Open this post in threaded view
|

Re: pngs to avi (making a stack) programatically

the6e

Wayne Rasband wrote
> steps in the gui
> ---------------
> 1. open all your images in ImageJ. Make sure they are sequentially  
> named in
> an order (like 001, 002,... etc)
> 2. make a stack of your images by (Image/stacks/convert images to  
> stack)
> 3. save stack as AVI (fle/save/AVI)
>
> Im trying to make an avi from a LARGE set of png images.  I know  
> how to do
> this from the gui, however I have a few questions that I hoped someone
> knowledgable could answer for me...
>
> questions
> ---------
> 1. Can this be achieved without the gui?  (im new to Imagej)
>
> 2. I was curious if there was a size limitation to the stack of  
> images?  I
> thought I may have read somewhere that it maxes out at 1.7  
> gigabytes, but Im
> not sure if that makes sense.
>
> 3. How would I convert png image files into a stack programatically?

A folder of images can be converted to an AVI using two commands. Use  
File>Import>Image Sequence to open the images as a stack and  
File>Save As>AVI to save it. There is no limit to the size of the  
stack if you enable "Use Virtual Stack" in the Import>Image Sequence  
dialog. To create a macro, run these commands with the recorder  
(Plugins>Macros>Record) running.  Save the macro in the macros folder  
as convert.txt and run it from the command line using something like:

     java -jar ij.jar -batch convert

-wayne
Thanks!  Totally awesome
Reply | Threaded
Open this post in threaded view
|

Re: pngs to avi (making a stack) programatically

Michael Schmid
In reply to this post by Wayne Rasband
Hi,

when creating AVI files from large amounts of data, note that
ImageJ only writes standard (old-format, "AVI 1")) AVI files,
which have a size limit of 2 GB. Some programs may handle files
in this format up to 4 GB, but this does not conform to the
standard.
ImageJ does not the check the size of the file written, so you
may end up with a file >2 GB or even >4 GB that cannot be read
by any standard software.
(ImageJ might still read these files, but I have never tried).

ImageJ can neither write nor read so-called "AVI 2.0" format,
which contains several "AVI-1"-like sections in a single RIFF
file, resulting in unlimited file size.

Michael
________________________________________________________________

On 19 Jun 2008, at 06:57, Rasband Wayne wrote:

>> steps in the gui
>> ---------------
>> 1. open all your images in ImageJ. Make sure they are sequentially  
>> named in
>> an order (like 001, 002,... etc)
>> 2. make a stack of your images by (Image/stacks/convert images to  
>> stack)
>> 3. save stack as AVI (fle/save/AVI)
>>
>> Im trying to make an avi from a LARGE set of png images.  I know  
>> how to do
>> this from the gui, however I have a few questions that I hoped  
>> someone
>> knowledgable could answer for me...
>>
>> questions
>> ---------
>> 1. Can this be achieved without the gui?  (im new to Imagej)
>>
>> 2. I was curious if there was a size limitation to the stack of  
>> images?  I
>> thought I may have read somewhere that it maxes out at 1.7  
>> gigabytes, but Im
>> not sure if that makes sense.
>>
>> 3. How would I convert png image files into a stack programatically?
>
> A folder of images can be converted to an AVI using two commands.  
> Use File>Import>Image Sequence to open the images as a stack and  
> File>Save As>AVI to save it. There is no limit to the size of the  
> stack if you enable "Use Virtual Stack" in the Import>Image  
> Sequence dialog. To create a macro, run these commands with the  
> recorder (Plugins>Macros>Record) running.  Save the macro in the  
> macros folder as convert.txt and run it from the command line using  
> something like:
>
>     java -jar ij.jar -batch convert
>
> -wayne