Tuesday, 21 October 2014

Creating a video from PDF slides with ffmpeg and ImageMagick

To illustrate the role of autocontext in [1], I created a video from the successive probability maps obtained in the segmentation of the left ventricle in 3D echocardiography. This post is a quick overview of the bash and LaTeX code I used for this video. The XKCD style for beamer is presented in a previous blog post.



The slides are first converted from PDF to PNG using ImageMagick, then each slide is transformed into a single movie in order to easily control the time spent on each frame (-t option of ffmpeg), as well as the insertion of other movies.

Monday, 6 October 2014

Automated segmentation of the fetal brain in MRI

This summer, I had a paper accepted in NeuroImage [1] on a fully automated pipeline for motion correction of the fetal brain in MRI. My main contribution is on detecting the brain and extracting it in the unprocessed data in order to automatically provide an input for motion correction. The motion correction code is the work of Maria Murgasova [2], I incorporated in it the realignment of the slice segmentations in  order to refine the brain extraction throughout the motion correction process.

I recently installed the code on a new machine and tested it using the example on github. As installing research code is rarely a simple matter of downloading the source and running "make", I took notes of all the steps for future reference: