[Insight-developers] programs creating GUI

Williams, Norman K norman-k-williams at uiowa.edu
Tue May 3 10:13:49 EDT 2011


The Qt library is more widely used than FLTK, and therefore has more
learning resources.

If you've never developed a GUI program, you need first to learn the
basics of building a GUI program.  In the case of Qt there's a very good
book to start with, "C++ GUI Programming with Qt 4"  http://amzn.to/kysYnn

Another way to approach this problem is with a scripting language, like
Python or Tcl.  Of the two, Python is a more elegant language with
widespread support.  There are Qt bindings for Python
http://www.riverbankcomputing.co.uk/software/pyqt/intro VTK (for
visualization, as in displaying image volumes) http://www.vtk.org/ ITK --
while it is still a work in progress, the ITK4 wrapping with Python is
more robust. http://www.cmake.org/Wiki/ITK/Git

Andras Lasso's suggestion to develop a plugin for 3D Slicer is also a good
one. There's some learning curve involved with Slicer3, but most of that
has to do with learning the user interface, not low level programming
concepts.

The Slicer Execution Model facilitates communication between a command
line program that does the actual processing and the Slicer user
interface.  Slicer 'asks' the command line program for an XML description
of the command line parameters, and generates a data entry panel for the
program.  When you run the program, it generates the command line
parameters for your program and invokes it.  After the program runs,
Slicer will then automatically load results.

The programming overhead involved is minimal -- you write the XML file
describing the command line arguments, and then a program that's part of
Slicer, GenerateCLP generates a C++ header file you include in your
program. This header contains code to parse the command line and
initialize variables for the various parameters for your program to use.

An added benefit is that your program gains documentation for it's
operation and is usable in batch programs or at the interactive command
line.

What route you take depends on your sophistication as a programmer.  While
it is a good thing, in general, to know how to build a nice GUI program,
that may be a time-sink and distraction from your real work, which is
implementing algorithms.  You need to decide how best to spend your time.

--
Kent Williams norman-k-williams at uiowa.edu


On 5/3/11 2:47 AM, "john smith" <mkinsightdeveloper at gmail.com> wrote:

>Hello,
>
>I want to create a GUI, which will contain a menu bar, in order to load
>an image, see the image slices of the 3 axies and the 3D volume.In the
>menu bar I want to create buttons, with which I will apply different kind
>of itk filters in my loaded image. Moreover, I would like to have
>interaction with my image and locate my own seed points using my mouse on
>the image. As I have read, I found two different programs to create my
>GUI. The first, is itk-snap which uses Qt and FLTK and the second is MITK
>which uses Qt and VTK. It's the first time that I am using a program to
>create my own GUI. I would like to know, which are the main differences
>between the itk-snap and MITK? Secondly, which one between these two
>programs you will recomend for a beginner in GUI developing?



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-developers mailing list