We recently released Dafne, a new free and open source application that exploits federated learning for MR image segmentation.
Leggi tutto “Introducing Dafne: a federated learning approach to MR segmentation”Tasty bagels in Basel with Arbuckles!
This is a shoutout to my good friend Vicki who makes the best bagels in Basel (Switzerland).
Visit her at arbuckles.ch! She has a great online shop and she’s also offering brunch options on weekends!

Advanced Input Dialog for Python with PyQt5
I recently implemented a swift generic input dialog for PyQt5 which extends the functionality of QInputDialog
. It supports multiple inputs in the same window, with text, numeric, boolean, and option inputs.
Its usage is simple and intuitive as demonstrated by the following code snippet:
import sys from PyQt5.QtWidgets import QApplication import GenericInputDialog app = QApplication(sys.argv) app.setQuitOnLastWindowClosed(True) accepted, values = GenericInputDialog.show_dialog("Test", [GenericInputDialog.TextLineInput('Text input'), GenericInputDialog.IntSpinInput('My Int', 10, -100, 100), GenericInputDialog.FloatSpinInput('My Float'), GenericInputDialog.IntSliderInput('My slider'), GenericInputDialog.BooleanInput('Bool value'), GenericInputDialog.OptionInput('My string options', [ 'option 1', 'option 2', 'option 3' ], 'option 3'), GenericInputDialog.OptionInput('My int options', [ ('option 1', 1.1), ('option 2', 2.2), ('option 3', 3.3) ], 2.2) ]) # Note: for option inputs, the value list can be a list # of strings, and then the output is the string itself, or a # list of tuples, where the first element is a string (the label) # and the second is the returned value (any). # The default value for options can be the label string, the # default returned value, or an integer index. # returned values can be accessed by key or by position print(values['My Int']) print(values[2]) # they can be iterated like a list for v in values: print(v)
Which produces the following:

The code is in the public domain and is available at https://gist.github.com/fsantini/13bca4e5f57af1f5df66a3006ac441a9
Diving in Liguria 2020
Diving in Liguria (Portofino Natural Park) with Massub diving. August 2020.
Lezione di Python online – parte II
Il giorno 18 Aprile 2020 ho tenuto la seconda lezione online di programmazione in Python sulla lettura e la visualizzazione dei dati sulla pandemia di COVID-19.
Leggi tutto “Lezione di Python online – parte II”Lezione di Python online – parte I
Il giorno 11 Aprile 2020 ho dato una prima lezione online di programmazione in Python sulla lettura e la visualizzazione dei dati sulla pandemia di COVID-19.
Leggi tutto “Lezione di Python online – parte I”DIY Hand Sanitizer Calculator
The World Health Organization published a guide on how to produce an effective hand sanitizer when a commercial one is not available. While they discourage home production, with the COVID-19 pandemics in action, finding hand sanitizer has become challenging everywhere in the world.
I’ve made a google sheet for the calculation of the quantities needed for home production using the WHO recipe. You will need:
Leggi tutto “DIY Hand Sanitizer Calculator”SimpleElastix precompiled Python modules
I have produced a number of precompiled SimpleElastix Python modules. As it is a pain to recompile it every time, I publish them here in case someone finds it useful. Let me know at francesco.santini@gmail.com if you need more.
Use easy_install to install the .egg files and pip to install the .whl files.
All the modules are compiled for the x86_64 architecture.
- Microsoft Windows (7+)
- Python 3.7 (egg): SimpleITK-1.2.0rc2.dev1167+gd4cf2-py3.7-win-amd64.egg
- Python 3.8 (egg): SimpleITK-1.2.0rc2.dev1167+gd4cf2-py3.8-win-amd64.egg
- Microsoft Windows 10
- Python 3.8 (whl): SimpleITK-2.0.0rc2.dev908+g8244e-cp38-cp38-win_amd64.whl
- Python 3.9 (whl): SimpleITK-2.0.0rc2.dev908+g8244e-cp39-cp39-win_amd64.whl
- Linux
- Python 2.7 (egg): SimpleITK-1.2.0rc2.dev1162+g2a79d-py2.7-linux-x86_64.egg
- Python 3.6 (egg): SimpleITK-1.2.0rc2.dev1162+g2a79d-py3.6-linux-x86_64.egg
- Python 3.7 (whl): SimpleITK-1.2.0rc2.dev1162+g2a79d-cp37-none-linux_x86_64.whl
- Python 3.8 (egg): SimpleITK-1.2.0rc2.dev1167+gd4cf2-py3.8-linux-x86_64.egg
- Python 3.9 (egg): SimpleITK-2.0.0rc2.dev908+g8244e-py3.9-linux-x86_64.egg
- Mac OS X
- Python 2.7 (egg): SimpleITK-1.2.0rc2.dev1162+g2a79d-py2.7-macosx-10.15-x86_64.egg
- Python 3.7 (egg): SimpleITK-1.2.0rc2.dev1162+g2a79d-py3.7-macosx-10.15-x86_64.egg
- Python 3.8 (egg): SimpleITK-1.2.0rc2.dev1162+g2a79d-py3.8-macosx-10.15-x86_64.egg
- Python 3.8 (whl): SimpleITK-2.0.0rc2.dev908+g8244e-cp38-cp38-macosx_10_15_x86_64.whl
More Jupyter resources for MRI
I’ve added some more Jupyter resources on quantitative MRI on my github page.
Now interactive controls for k-space manipulation are active, and a notebook on simple quantitative T1 and T2 fitting was also added.
Check it out directly on binder: https://mybinder.org/v2/gh/fsantini/qMRI_example/master
MRI teaching resources
I’ve recently published some scripts that show some basic quantitative MRI methods on my github page.
I’m going to convert all the examples into Jupyter notebooks, so far there is one about K-Space which you can access directly online from here: https://mybinder.org/v2/gh/fsantini/qMRI_example/master