Medical GUI Application With Python

John Hunter jdhunter at ace.bsd.uchicago.edu
Sat Feb 5 07:07:27 EST 2005


>>>>> "Evrim" == Evrim Ozcelik <evrim at ankabt.com> writes:

    Evrim> We are developing a medical software about PSG
    Evrim> (PolySomnoGraphy) analysis. The application takes signal
    Evrim> data from an electronic device and we will show this
    Evrim> continious signal function on the interfaces. There are
    Evrim> about 20-30 signal channels and the user selected channels
    Evrim> are shown. We want to run this application over different
    Evrim> platforms.

    Evrim> My question is:

    Evrim>    1. What must be our IDE 2. What class library for GUI
    Evrim> must be use (wxWindows, Qt, GTK, etc.)  3. Is there any GUI
    Evrim> package for visulazing signal functions (like sinozodial
    Evrim> functions) in real time; this module will behave as an
    Evrim> oscilloscope

I wrote an EEG viewer in python using pygtk for the GUI and matplotlib
for the 2D plotting (and VTK for the 3D).  It runs unchanged on OSX,
linux and win32.  You can see a few screenshots at
http://pbrain.sf.net .

The underlying 2D plotting library, matplotlib, does handle animations
(dynamic plots) and can be embedded in the GUI of your choice (Tk, WX,
GTK, FLTK and QT).  I also wrote matplotlib, as a first step in
developing the application above.  The performance of dynamic animated
plots (what you call real time) varies for different backends.  GTK is
typically fastest: on a modern P4 you can do about 50 frames/sec for
simple plots and 10-15 frames/sec for more complicated plots (images,
larger data sets).  The performance for the Tk GUI is considerably
slower.

Most people who say real time don't really mean it, they mean they
want frequent updates and should assess whether the plotting library
can support refresh rates (frames/sec) that are fast enough to be
visually pleasing and to be true to the signal plotted.  matplotlib is
not the fastest 2D python plotting library, but it is one of the most
feature complete and may be fast enough for your purposes --
http://matplotlib.sf.net .  My guess is that for 20-30 channels the
refresh rate in the current implementation will be slower than you
want, but these things are always improving since matplotlib is under
active development and there are some performance bottlenecks that
could be removed with a little work.

The examples directory which is in the src distributions has a number
of examples illustrating dynamic plots: anim.py, system_monitor.py,
dynamic_image_gtkagg.py, dynamic_image_wxagg.py, dynamic_demo.py.

JDH



More information about the Python-list mailing list