Thursday, August 10, 2006

Movie Of Registration

A copy of the Registration process movie can be found here.

To construct a movie of the Registration process I implemented the vtkWindowToImageFilter that would take the output of the renderer and convert that to the VTK image type. Using the image type as the input to vtkTIFFWriter I was able to create a series of images that represented each succeeding step in the registration process. Then, to turn those images into a movie I used the "convert" command which comes with the ImageMagick suite and should be available with most versions of linux. I used the command "convert *.tif reg.mpg" to create the movie but came upon the error: Delegate failed `"mpeg2encode" "%i" "%o". I resolved the problem by finding that the converter lacked the required codecs to encode the MPEG movie and added them using the following commands:

wget ftp://ftp.mpegtv.com/pub/mpeg/mssg/mpeg2vidcodec_v12.tar.gz
tar xvzf mpeg2vidcodec_v12.tar.gz
cd mpeg2
make
cd src/mpeg2dec
cp mpeg2decode /usr/local/bin
cd ../mpeg2enc
cp mpeg2encode /usr/local/bin

For viewing the MPEG movies the Berkeley MPEG Player worked well since it was really easy to set up. My initial movies were much too fast to be useful. To alleviate this issue I constructed a movie using three images depicting the same information for each iteration. This allowed the movie to proceed at a slower pace.

0 Comments:

Post a Comment

<< Home