STIR at the IEEE MIC 2015 Short Course on Image Reconstruction

This page is for participants in the Short Course on Image Reconstruction at the IEEE MIC. It will be updated with extra information before the course.
Please refresh the page when you re-visit. Check the bottom of page for list of updates.

During the course, we will have practical exercises using STIR. These exercises are an integral part of the course. To be able to participate, students are asked to bring their own laptop if possible.

We provide a Virtual Machine with everything preinstalled for the course. Please follow the installation instructions below to get this on your laptop before the conference (we will be available 30 minutes before the course to help with installation problems and will have some USB sticks with us as well).

Please note that the STIR version that we will be using is more recent that the current 3.0. Therefore, please use the virtual machine. If you really want to do this all yourself, you will need to get STIR from github, install SWIG, Python, etc and compile STIR with Python support. You would then need to get the data and example scripts. Don't try this...

Please prepare for these exercises, see bottom of this page.

Virtual Machine installation instructions

If you have any problems, please first re-check this web-page. If you cannot solve your issue, please email k dot thielemans at ucl dot ac dot uk.

Initial download and installation

  1. Make sure you have enough free disk-space on your laptop (~10GB for installation).
  2. Install VirtualBox. Please note that this will require administrator permissions.
    You do not need to install the Oracle extensions to VirtualBox, although it might come in handy for USB support.
    Although other Virtual Machine software might work, we have not tried this and will not be able to help to get this going.
    Nikos Efthimiou says that if you run Ubuntu (or similar) on your laptop, VirtualBox might not install, unless you first upgrade to libvpx>1. You could try the following (but you might want to read-up on this first):
    1. wget
    2. sudo dpkg -i libvpx1*.deb
  3. Download the Virtual Image from the Sourceforge site (get the Lubuntu-STIR.ova file).
    Please be careful on Sourceforge. Do not press any attractive Download buttons as they are all ads.
    Alternative link in the UK: ZendTo at Manchester Univ, use Claim ID: YRBRJV7MeW7DrKHx, Claim Passcode: jt34GaQPaDX2r488
    Warning: this file is ~1.7GB. (You can of course download to a USB stick to save space on your laptop).
  4. Open the downloaded OVA file (double-click or whatever is appropriate for your system). This should start VirtualBox with the "Import" dialog box.
  5. Change settings of the virtual machine (you can still change this afterwards by using the Settings menu of VirtualBox). The only things that need your attention:
    1. CPU: use the same number of CPUs (i.e. cores) as your laptop (or 1 less)
    2. RAM: use about half the RAM of your laptop (assigning too much RAM will slow down your laptop dramatically, using not enough will slow down the virtual machine. 1.5GB seems to be enough though.)
    3. Virtual Disk Image: normally this filename is fine but you can save it somewhere else if you like
  6. Tick the box "Reinitialise the MAC address of all network cards"
  7. Press Import and wait for a few minutes (everything will be decompressed etc).
  8. In the VirtualBox window, select your new VM and press the Settings icon. In the "General" category, "Advanced" tab, check that "Shared Clipboard" is set to "bidirectional". You can try the "Drag and drop" feature to copy files across (but it did not work for KT).

Updating the virtual machine

Now you can start your virtual machine. If it fails to start with an error like "virtualbox vt-x is disabled in the bios", check here.

If you see a dialog box about "starting in scaled mode", you can press OK to allow VirtualBox to scale the display larger or smaller, or you can press Cancel and start the machine again without scaling. (See the Virtualbox site for some info on the Host-Key etc).

  1. You should get a window where Lubuntu will be starting (might take a few minutes). Wait until you see the log-in prompt.
  2. Log in as user "stir" with password "virtual" (please note that if you have an Azerty-type keyboard, you will have to type "virtuql" until you change your Lubuntu keyboard settings). You should get the Lubuntu desktop.
  3. Adjust your Ubuntu settings:
    1. The keyboard type is set to English-UK. If this is not ok
      1. Right-click on the bottom bar of the desktop;
      2. Select "Add/Remove Panel Items";
      3. Click the "Add" button on the right hand side;
      4. Scroll down the list and select "Keyboard Layout Handler" and then click "Add" then close;
      5. You will see an English flag on the bottom right corner of the screen, that relates to the keyboard, right-click on it and choose "Keyboard Layout Handler Settings";
      6. Remove the tick from "Keep System layouts" then the click on the "Add" button and choose the flag depending on your keyboard and then "OK";
      7. Click "Close";
      8. Now on the bottom right corner you should see the flag you selected or the English flag, if you left-click on the flag, it will change from one keyboard to the other, pick the chosen one.
    2. Default settings should allow you to access the internet from in the virtual machine. If not, please check the Virtual Box documentation
  4. Double-click on the LXTerminal icon to open a terminal. Type
          cd ~
          bash ./
    enter the password "virtual".
    If you see a message about "Configuration file /etc/X11/Xsession.d/98vboxadd-xclient", answer Y to install the package maintainer's version.
  5. You should now have a HELP.htm on your desktop, double-click that one.

Note that when you are finished with the Virtual Machine (VM), you should do something like this

Shared folders and other VirtualBox advanced features

This section is optional.

Things work smoother if you have the VrtualBox Guest Additions (VGA), essentially a set of drivers for the guest OS. The VM has these already installed but they will work properly if you have VirtualBox 4.3.30. Fortunately, it is not very hard to install the VGA for your VirtualBox version. Please follow the standard instructions, skipping step 1 (about dkms) as this has been done for you. Reboot your VM after installing the VGA.
Please do this after updating your VM as above.

After installing the VGA, you might want to configure a shared directory between the host and the guest machine such that your virtual machine can "see" your "normal" files. Please read the Virtualbox documentation on Folder Sharing.
Summary of steps (courtesy Nikos Efthimiou):

  1. Right click on the Lubuntu VM in VirtualBox main window and choose Settings
  2. Choose "Shared Folders" (last item on the left)
  3. Add new folder, select the folder you want, and give it a name, e.g. MyLaptop (use small + button near the right edge of the dialog)
  4. Select folder and opt in "make permanent" and "auto mount"
  5. Start the Lubuntu VM (or switch to it) and open a terminal and type
            mkdir ~/MyLaptop
            sudo mount -t vboxsf -o rw,uid=1000,gid=1000 MyLaptop ~/MyLaptop
    You will have to type the last command whenever you reboot your VM, or you could make this permanent by pasting the above command to /etc/rc.local before "exit 0" (non-trivial because of admin permissions).

Next steps

The files will need another update before the course (but with minimal download time). In particular, the exercises themselves might still change. Therefore, please check this web-page occasionally.

Update process: open the terminal and just type

We recommend that you get yourself (somewhat) familiar with VirtualBox and Lubuntu and iPython. Links are provided in the HELP.htm and the exercises_document.pdf on the Desktop Here is some suggested material:

  1. If you have never used a Linux/Unix terminal before, have a look at this tutorial.
  2. The official Python tutorial. Just read Section 1, 3, a bit of 4 and a tiny bit of 6.
  3. Examples for matplotlib, the python module that allows you to make plots almost like in MATLAB.
It would also be useful to check some of the STIR documentation on the STIR web-site. You could even try to run some of the exercises already.

Page update history

  1. 25 Oct, 20.00 UTC: make VM available
  2. 26 Oct, 15.30 UTC: add alternative download link, give info on what to do with VT-X failures and VirtualBox installation on Ubuntu
  3. 27 Oct, 23.00 UTC: add text about VirtualBox Guest Additions, and suggested links for Lubuntu and Python
  4. 29 Oct, 13:50 UTC: added text about Configuration file during installation, and updated exercises.
  5. 30 Oct, 17:40 UTC: updated exercise PDF
  6. 31 Oct, 11:40 UTC: updated MAP exercises and updated PDF
  7. 02 Nov, 02:00 UTC: updated PSF and randoms exercises and updated PDF
  8. 02 Nov, 08:30 UTC: updated MCIR exercises and updated PDF
  9. 03 Nov, 08:30 UTC: minor fixes

This site uses no cookies, except for accessing the registered users section.

Contact webmaster.

Last modified: Nov 2, 2015