One part of Bachelor’s study programme (Biomedical Technology and Bioinformatics) is a compulsory practical/professional experience “course”. Passing this one is the mandatory prerequisite to be allowed to take final state exam and to defend one’s thesis. Many students usually go to the hospitals to be employed as assistents to various clinical professionals.

But I wanted to try something else, something interesting and enjoyable at once. At the time, I was a great fan of LaTeX typesetting system. Anything I was to prepare to school as homeworks, technical documents, articles, I always used LaTeX and typesetted everything by myself (I know, overcomplicating things, but). So after one lecture about MRI (Magnetic Resonance Imaging) fundamentals and physics, I asked the teacher if they could use a helping hand to update their lectures’ slides. I was allowed to help afterwards and took the little internship at Institute of Scientific Instrumets of the Czech Academy of Sciences (ISI CAS) in Brno.

sources

As the main external source of animations and figures about physics and mathematics, we used public site of prof. J. P. Hornak The Basics of MRI, and mriquestions.com site.

Presentations/slides were meant to be updated and retypesetted, so leading sources were of course also the old slides and presentation set.

Fig. 1: Frequency keying using gradient coils.

beamer package and template

As I was to typeset the set of presentations, I decided to use standard beamer package. To unify the visual style of the presentation(s) with the university visual style, I used vizual VUT (CZ) templates and template presentation from the faculty web on LaTeX.

Fig. 2: K-space, complex signal space.

LaTeX and animations

Interesting challenge was to make animated GIFs into the presentations, to make them animated even when compiled into a PDF.

Fig. 3: Spin echo simplified timelapse.

ImageMagick

For this purpose, I needed to create a PDF-compliant static sequence from the original GIF using Image Magick tool. Using this tool I could create N slices numbered ascendentally via %d template.

1
2
3
dnf install imagemagick

convert original_animated.gif -coalesce original_animated_animate_%d.pdf

Sometimes the output was numerous, making the target dir full of slices.

Fig. 4: Sliced spin echo into static figures, ready to be imported using animatedgraphics package.

LaTeX

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
\docuemntclass[...]{beamer}

% animations
\usepackage{graphicx}
\usepackage{animate}

...

\begin{document}

\begin{frame}
  \frametitle{Frame title}

  \centering
  \animategraphics[
    width=0.3\linewidth,
    autoplay,
    loop]{12}{anim/original_animated_animate_}{0}{255}

\end{frame}

\end{document}