Brain QR Modem

Are you ever annoyed how hard it is to get brain data off the scanner? The fact that scanners usually contain private information about patients and are thus embedded in maximally restrictive clinical cyber-security environments, makes it quite complicated to get access to the data. Especially when visiting collaborative sites.

In this this Hackathon project, we aim to develop a purely uni-directional (safe) data streaming “hack” to transfer MRI data directly to the cloud by means dynamic QR codes.

In the early days of the Internet, modems (modulator-demodulator) were used to (i) convert digital information into audio streams, (ii) transfer them across telephone lines, and (iii) convert them back into the digital domain. Here, we aim to do the same thing with pixel data of MRI scans. However, instead of audio signal we will use machine-readable visual information: QR codes.




Specific aims of the Brain QR modem

1.) We will develop an ICE-Functor that converts pixel data to QR codes in real time

2.) We will develop an Android app that converts the streamed QR coded into a series of png that are directly streamed to the cloud (Drive folder).

3.) We will develop a LayNii program that converts stacks of PNG images into Nii files.

This project contains many consecutive components of a modem. And will likely take 2-3 rounds of Hackathons to be completed.


Project Pitch






Result presentation:






1.) ICE-functor to convert brain pixel data into QR codes.

This functor will convert pixel data into a series of QR codes. In order to maximise data transfer rates with minimal bit losses. QR-code version 10 or 25 with level Q error correction (25%) will be tried first. Taking libraries from Nayuki might be a good start

The functor will have an adjustable frame rate around 9Hz.

Adding the Brain Modem Fucntor in the ICE chain

2.) Android App for receiving streamed QR codes

There are codes for similar Android Apps available from Github:

Thus, it is easiest to use Android Studio and Java scrip code available for the streaming of successive PNG images and directly store them google Drive.

3.) LayNii Program to combine stack of PNGs in the nifty format.

A branch of the LayNii software suite will be extended with the libpng (requires zlib) or spng to read png files. Dependent on minimal user input about header info, they will be converted in to nii time series.

Getting started

  • Get familiar with ICE-functor programming.
  • Get familiar with the QR code generator code by Nayuki.
  • Install Android studio and the TXQR Tester.


Since SIEMENS’ reconstruction code of ICE functors cannot be freely shared. Participation of parts of this project might officially require a Research agreement of your site with SIEMENS as well as a C2P agreement between all participants.

Hackathon issue page:

Running Agenda

First things to do about Modulator: Wednesday and Thursday

  • Getting familiar with ICE.
  • Figure out how to best present QR-codes: E.g. Dicom stream or Terminal.
  • How to control viewing rate. 
  • How to include external packages into ICE, e.g. Laynii, QR encoder, dependencies of zlib
  • How to access pixel data one by one.
  • Convert pixel data as dicom stream, nii, or png. Pngs are easiest to decode but harder to encode (png libraries needed on the MRIR). NII would have many other uses.
  • How to save files via ice, for retrospective QR streaming. 
  • Testing it with a real sequence: compile a quick dummy sequence with the adapted ICE chain.

First things to do about Demodulator:

  • Get familiar with Android studio. 
  • Make “Hallo-world” app for android. 
  • Take TXQR and test it with their tester
  • Understand how and if it is possible to send other data types. E.g. nii. Via gomobile

Success moments:

1.) Adding our own custom functor into the recon Ice-chain of a standard sequence (TFL)

2.) Viewing ASCII art QR codes at the scanner during the scan by means of error messages.

Unfortunately, ANSI characters are nor supported, so we use ASCIIi, instead

3.) Controlling refresh rate by means of custom delay function.

screen capture of ICE-simu

4.) getting access to pixel orientation information.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s