[Insight-users] Re: format conversion

Amadeus minut at cablespeed.com
Sun Apr 24 11:09:17 EDT 2005


Thanks for the answer. I also found the solution, which I'll post, in case
other people might benefit from it. 

I work exclusively in Linux and one can use mplayer - the mother of all
multimedia tools - to dump each frame in a movie clip. MPlayer understands
just about any format under the sun and can use just about any codec as
well. E.g. to dump each frame in an avi clip to a separate png image

mplayer -vo png movie.avi

To see to what other formats one can output the frames to, 

mplayer -vo help


Then, the frames dumped by mplayer can be put together into a volume
using ImageSeriesReadWrite in InsightToolkit-2.0.0/Examples/IO/.

Of course, in Linux and other unixes the shell understands wildcards, 
so with minor changes, it ImageSeriesReadWrite can be modified to work
like this:

ImageSeriesReadWrite frame*.png output.mha   # or e.g. output.mhd

The input frames need not have the names that the original
ImageSeriesReadWrite expects. 



On Sat, 23 Apr 2005 18:00:26 -0400, Luis Ibanez wrote:

> Hi Amadeus,
> 
> 
> You could use ImageJ in order to read a QuickTime movie
> and treat it as a stack of 2D images:
> 
> 
>            http://rsb.info.nih.gov/ij/
> 
> 
> It needs the following plugin:
> 
> http://rsb.info.nih.gov/ij/plugins/movie-opener.html
> 
> 
> ITK will handle series of 2D files in formats:
> 
>          PNG, or JPG,  or TIFF, or BMP.
> 
> For a full list of ITK supported fileformats please
> look at the FAQ
> 
> http://www.itk.org/Wiki/ITK_FAQ#What_3D_file_formats_can_ITK_import_and_export.3F
> 
> For code examples on how to read series of 2D images,
> please look at the directory:
> 
> 
>            Insight/Examples/IO
> 
> 
> 
> Regards,
> 
> 
>      Luis
> 
> 
> ----------------
> Amadeus wrote:
> 
>> [quoted text muted]




More information about the Insight-users mailing list