Skip to content

Configuration Steps for Console Computer

Tobias Block edited this page Feb 23, 2024 · 8 revisions

Note: These configuration steps are only needed for setting up the MRI4ALL console software on an actual console computer. They are not needed for getting started with the development using the dev environment.

Add Users

  • Create users mri4all and mri4all_admin (only this one should have sudo permissions)
  • Install all needed packages using the mri4all_admin account. This can be done by running the install script "sudo ./install.sh" (but change MRI4ALL_USER to mri4all! Particularly, change MRI4ALL_USER=vagrant to MRI4ALL_USER=mri4all)

Setup GNOME Styling

  • Create file ~/.config/gtk-3.0/gtk.css and add following content:
.titlebar, headerbar, UnityDecoration.top {
    background: #262c44;
    color: #FFF;
    border: 1px solid #262c44;
}

.titlebar:backdrop, headerbar:backdrop {
    background: #333333;
    color: #807D78;
}

decoration {
  border: 1px solid #262c44;
  background: #262c44;
}

headerbar {
  border-radius: 0px;
}

.titlebar,
.titlebar .background, * {
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  border-bottom-left-radius: 0px;
  border-bottom-right-radius: 0px;
}
  • Disable window transparency with:
transset 0

Create Startup Script

Create start script "run_mri4all.sh" in /home/mri4all with content (also found in /installation folder):

#!/bin/bash
source /opt/mri4all/env/bin/activate
cd /opt/mri4all/console
python run_ui.py
gnome-session-quit --logout --force

Add the script as startup program by pressing ALT-F2 and typing "gnome-session-properties". Create an entry for the startup script.

Install Services

  • Copy the files mri4all_acq.service and mri4all_recon.service from the /installation folder into /etc/systemd/system
  • Copy the file mri4all-sudoers from /installation into /etc/sudoers.d/

IP Setting for Red Pitaya

In the IPv4 properties for the Wired Connection, the Method needs to be set to "Shared to other computers". Otherwise, the system will not be able to connect with the Red Pitaya board.

Bilinear Interpolation for Viewers

By default, the PyQtGraph library, which is used for displaying the reconstructed DICOM images in the UI, uses a nearest-neighbor interpolation. Therefore, the images look blocky. To enable bilinear interpolation, the code of the PyQtGraph library needs to be patched (after installing the Python dependencies via pip).

Open the following file: /opt/mri4all/env/lib/python3.10/site-packages/pyqtgraph/graphicsItems/ImageItem.py

Find the function def paint(self, p, *args): and insert the following line before the p.drawImage function:

p.setRenderHints(QtGui.QPainter.SmoothPixmapTransform|QtGui.QPainter.Antialiasing)
p.drawImage(QtCore.QRectF(0,0,*shape), self.qimage)

Clone this wiki locally