converting multiple tiff stacks to avi files efficiently

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

converting multiple tiff stacks to avi files efficiently

jehangir cama
Hi,

I have a large number of tiff stacks, each around 675 MB in size, that I
want to convert to avi files. At the moment I am loading each stack
individually and converting it into an avi, but I wanted to know whether
there was a quicker way to do this. For example, can I just load a folder
containing the tiff stacks and get imageJ to convert them all into avi
files with the same name as the tiff stack?

Any help would be appreciated,

Thanks
Jehangir

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

Re: converting multiple tiff stacks to avi files efficiently

ctrueden
Hi Jehangir,

> can I just load a folder containing the tiff stacks and get imageJ to
> convert them all into avi files with the same name as the tiff stack?

Sadly, it looks like AVI is not on the list of formats for the Process >
Batch > Convert command. [1]

However, you can do it with a macro. Here are two examples:

https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/batchTiffConvert.txt
https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/recursiveTiffConvert.txt

Regards,
Curtis

[1] http://imagej.net/docs/guide/146-29.html#toc-Subsubsection-29.12.2




On Thu, Oct 10, 2013 at 9:33 AM, jehangir cama <[hidden email]>wrote:

> Hi,
>
> I have a large number of tiff stacks, each around 675 MB in size, that I
> want to convert to avi files. At the moment I am loading each stack
> individually and converting it into an avi, but I wanted to know whether
> there was a quicker way to do this. For example, can I just load a folder
> containing the tiff stacks and get imageJ to convert them all into avi
> files with the same name as the tiff stack?
>
> Any help would be appreciated,
>
> Thanks
> Jehangir
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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

Re: converting multiple tiff stacks to avi files efficiently

jehangir cama
Dear Curtis,

Thanks for the links. But it seems to me that both programs convert files
to TIFFs rather than from TIFF stacks to something else. Can this be easily
changed?

Regards

Jehangir


On Thu, Oct 10, 2013 at 3:53 PM, Curtis Rueden <[hidden email]> wrote:

> Hi Jehangir,
>
> > can I just load a folder containing the tiff stacks and get imageJ to
> > convert them all into avi files with the same name as the tiff stack?
>
> Sadly, it looks like AVI is not on the list of formats for the Process >
> Batch > Convert command. [1]
>
> However, you can do it with a macro. Here are two examples:
>
>
> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/batchTiffConvert.txt
>
> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/recursiveTiffConvert.txt
>
> Regards,
> Curtis
>
> [1] http://imagej.net/docs/guide/146-29.html#toc-Subsubsection-29.12.2
>
>
>
>
> On Thu, Oct 10, 2013 at 9:33 AM, jehangir cama <[hidden email]
> >wrote:
>
> > Hi,
> >
> > I have a large number of tiff stacks, each around 675 MB in size, that I
> > want to convert to avi files. At the moment I am loading each stack
> > individually and converting it into an avi, but I wanted to know whether
> > there was a quicker way to do this. For example, can I just load a folder
> > containing the tiff stacks and get imageJ to convert them all into avi
> > files with the same name as the tiff stack?
> >
> > Any help would be appreciated,
> >
> > Thanks
> > Jehangir
> >
> > --
> > 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
Reply | Threaded
Open this post in threaded view
|

Re: converting multiple tiff stacks to avi files efficiently

Bernhard Reber
Dear Jehangir,

There is the save as "avi" command. Maybe you have to change the desired output file format from "tiff" to "avi". Have a look at the first macro code.

Ext.openImagePlus(file);
    outFile = outputDirectory + fileList[i] + ".tiff";
    saveFile(outFile);

Regards

Bernie


Am 11.10.2013 um 13:13 schrieb jehangir cama:

> Dear Curtis,
>
> Thanks for the links. But it seems to me that both programs convert files
> to TIFFs rather than from TIFF stacks to something else. Can this be easily
> changed?
>
> Regards
>
> Jehangir
>
>
> On Thu, Oct 10, 2013 at 3:53 PM, Curtis Rueden <[hidden email]> wrote:
>
>> Hi Jehangir,
>>
>>> can I just load a folder containing the tiff stacks and get imageJ to
>>> convert them all into avi files with the same name as the tiff stack?
>>
>> Sadly, it looks like AVI is not on the list of formats for the Process >
>> Batch > Convert command. [1]
>>
>> However, you can do it with a macro. Here are two examples:
>>
>>
>> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/batchTiffConvert.txt
>>
>> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/recursiveTiffConvert.txt
>>
>> Regards,
>> Curtis
>>
>> [1] http://imagej.net/docs/guide/146-29.html#toc-Subsubsection-29.12.2
>>
>>
>>
>>
>> On Thu, Oct 10, 2013 at 9:33 AM, jehangir cama <[hidden email]
>>> wrote:
>>
>>> Hi,
>>>
>>> I have a large number of tiff stacks, each around 675 MB in size, that I
>>> want to convert to avi files. At the moment I am loading each stack
>>> individually and converting it into an avi, but I wanted to know whether
>>> there was a quicker way to do this. For example, can I just load a folder
>>> containing the tiff stacks and get imageJ to convert them all into avi
>>> files with the same name as the tiff stack?
>>>
>>> Any help would be appreciated,
>>>
>>> Thanks
>>> Jehangir
>>>
>>> --
>>> 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


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

Re: converting multiple tiff stacks to avi files efficiently

jehangir cama
Dear Bernie,

Thanks, will give it a try.

Regards

Jehangir

On 11 Oct 2013, at 12:27, Bernhard Reber <[hidden email]> wrote:

> Dear Jehangir,
>
> There is the save as "avi" command. Maybe you have to change the desired output file format from "tiff" to "avi". Have a look at the first macro code.
>
> Ext.openImagePlus(file);
>    outFile = outputDirectory + fileList[i] + ".tiff";
>    saveFile(outFile);
>
> Regards
>
> Bernie
>
>
> Am 11.10.2013 um 13:13 schrieb jehangir cama:
>
>> Dear Curtis,
>>
>> Thanks for the links. But it seems to me that both programs convert files
>> to TIFFs rather than from TIFF stacks to something else. Can this be easily
>> changed?
>>
>> Regards
>>
>> Jehangir
>>
>>
>> On Thu, Oct 10, 2013 at 3:53 PM, Curtis Rueden <[hidden email]> wrote:
>>
>>> Hi Jehangir,
>>>
>>>> can I just load a folder containing the tiff stacks and get imageJ to
>>>> convert them all into avi files with the same name as the tiff stack?
>>>
>>> Sadly, it looks like AVI is not on the list of formats for the Process >
>>> Batch > Convert command. [1]
>>>
>>> However, you can do it with a macro. Here are two examples:
>>>
>>>
>>> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/batchTiffConvert.txt
>>>
>>> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/recursiveTiffConvert.txt
>>>
>>> Regards,
>>> Curtis
>>>
>>> [1] http://imagej.net/docs/guide/146-29.html#toc-Subsubsection-29.12.2
>>>
>>>
>>>
>>>
>>> On Thu, Oct 10, 2013 at 9:33 AM, jehangir cama <[hidden email]
>>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I have a large number of tiff stacks, each around 675 MB in size, that I
>>>> want to convert to avi files. At the moment I am loading each stack
>>>> individually and converting it into an avi, but I wanted to know whether
>>>> there was a quicker way to do this. For example, can I just load a folder
>>>> containing the tiff stacks and get imageJ to convert them all into avi
>>>> files with the same name as the tiff stack?
>>>>
>>>> Any help would be appreciated,
>>>>
>>>> Thanks
>>>> Jehangir
>>>>
>>>> --
>>>> 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
>
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html

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

Re: converting multiple tiff stacks to avi files efficiently

ctrueden
In reply to this post by jehangir cama
Hi Jehangir,

> But it seems to me that both programs convert files to TIFFs rather
> than from TIFF stacks to something else. Can this be easily changed?

Yes, just change the ".tif" extension to ".avi" and you are all set.

However, if you want to save a compressed .avi, ImageJ is much less adept
at that. You may want to transcode your video afterward to reduce the file
size if that is a problem for you. There are dedicated video encoding tools
with many years of developer effort behind them for this.

Alternately, you could try Johannes Schindelin's experimental FFMPEG update
site for Fiji [1]. You would need to change the macros to use that
functionality rather than the Bio-Formats Exporter to write the image
stacks.

Regards,
Curtis

[1] http://fiji.sc/List_of_update_sites


On Fri, Oct 11, 2013 at 6:13 AM, jehangir cama <[hidden email]>wrote:

> Dear Curtis,
>
> Thanks for the links. But it seems to me that both programs convert files
> to TIFFs rather than from TIFF stacks to something else. Can this be easily
> changed?
>
> Regards
>
> Jehangir
>
>
> On Thu, Oct 10, 2013 at 3:53 PM, Curtis Rueden <[hidden email]> wrote:
>
> > Hi Jehangir,
> >
> > > can I just load a folder containing the tiff stacks and get imageJ to
> > > convert them all into avi files with the same name as the tiff stack?
> >
> > Sadly, it looks like AVI is not on the list of formats for the Process >
> > Batch > Convert command. [1]
> >
> > However, you can do it with a macro. Here are two examples:
> >
> >
> >
> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/batchTiffConvert.txt
> >
> >
> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/recursiveTiffConvert.txt
> >
> > Regards,
> > Curtis
> >
> > [1] http://imagej.net/docs/guide/146-29.html#toc-Subsubsection-29.12.2
> >
> >
> >
> >
> > On Thu, Oct 10, 2013 at 9:33 AM, jehangir cama <[hidden email]
> > >wrote:
> >
> > > Hi,
> > >
> > > I have a large number of tiff stacks, each around 675 MB in size, that
> I
> > > want to convert to avi files. At the moment I am loading each stack
> > > individually and converting it into an avi, but I wanted to know
> whether
> > > there was a quicker way to do this. For example, can I just load a
> folder
> > > containing the tiff stacks and get imageJ to convert them all into avi
> > > files with the same name as the tiff stack?
> > >
> > > Any help would be appreciated,
> > >
> > > Thanks
> > > Jehangir
> > >
> > > --
> > > 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
>

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

Re: converting multiple tiff stacks to avi files efficiently

jehangir cama
Dear Curtis,

Thanks for the help, I have Fiji installed so will probably give that a
try.

Regards
Jehangir


On Fri, Oct 11, 2013 at 7:04 PM, Curtis Rueden <[hidden email]> wrote:

> Hi Jehangir,
>
> > But it seems to me that both programs convert files to TIFFs rather
> > than from TIFF stacks to something else. Can this be easily changed?
>
> Yes, just change the ".tif" extension to ".avi" and you are all set.
>
> However, if you want to save a compressed .avi, ImageJ is much less adept
> at that. You may want to transcode your video afterward to reduce the file
> size if that is a problem for you. There are dedicated video encoding tools
> with many years of developer effort behind them for this.
>
> Alternately, you could try Johannes Schindelin's experimental FFMPEG update
> site for Fiji [1]. You would need to change the macros to use that
> functionality rather than the Bio-Formats Exporter to write the image
> stacks.
>
> Regards,
> Curtis
>
> [1] http://fiji.sc/List_of_update_sites
>
>
> On Fri, Oct 11, 2013 at 6:13 AM, jehangir cama <[hidden email]
> >wrote:
>
> > Dear Curtis,
> >
> > Thanks for the links. But it seems to me that both programs convert files
> > to TIFFs rather than from TIFF stacks to something else. Can this be
> easily
> > changed?
> >
> > Regards
> >
> > Jehangir
> >
> >
> > On Thu, Oct 10, 2013 at 3:53 PM, Curtis Rueden <[hidden email]>
> wrote:
> >
> > > Hi Jehangir,
> > >
> > > > can I just load a folder containing the tiff stacks and get imageJ to
> > > > convert them all into avi files with the same name as the tiff stack?
> > >
> > > Sadly, it looks like AVI is not on the list of formats for the Process
> >
> > > Batch > Convert command. [1]
> > >
> > > However, you can do it with a macro. Here are two examples:
> > >
> > >
> > >
> >
> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/batchTiffConvert.txt
> > >
> > >
> >
> https://github.com/openmicroscopy/bioformats/blob/v4.4.8/components/loci-plugins/utils/macros/recursiveTiffConvert.txt
> > >
> > > Regards,
> > > Curtis
> > >
> > > [1] http://imagej.net/docs/guide/146-29.html#toc-Subsubsection-29.12.2
> > >
> > >
> > >
> > >
> > > On Thu, Oct 10, 2013 at 9:33 AM, jehangir cama <[hidden email]
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > I have a large number of tiff stacks, each around 675 MB in size,
> that
> > I
> > > > want to convert to avi files. At the moment I am loading each stack
> > > > individually and converting it into an avi, but I wanted to know
> > whether
> > > > there was a quicker way to do this. For example, can I just load a
> > folder
> > > > containing the tiff stacks and get imageJ to convert them all into
> avi
> > > > files with the same name as the tiff stack?
> > > >
> > > > Any help would be appreciated,
> > > >
> > > > Thanks
> > > > Jehangir
> > > >
> > > > --
> > > > 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
> >
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

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