[vtkusers] choosing the best tool for creating GUIs

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Sat Sep 21 07:59:48 EDT 2002


>>>>> "TD" == Thomas Deschamps <tdeschamps at lbl.gov> writes:

    >> You'd need to be more specific.
    TD> I have C++ routines, with lots of classes, namespaces, and
    TD> templates.  This code is mostly image processing code,
    TD> filtering, segmentation, etc...  I want to build a GUI
    TD> interface that will take care of the input of the parameters
    TD> to my routines (number of iterations of processes, but also
    TD> interaction with the vtkRenderWindow where I pick some
    TD> locations.  I have no experience with the interfaces, and I
    TD> would like to know if it is really needed to wrap my code in
    TD> another language like python. Is there another way to call

You only need to wrap those calls that you need to make from the
scripting interface.

    TD> directly the C++ routines fron an interface.  What is the gain
    TD> from using a scipting language? Is there a huge tradeoff in

  1. Rapid application development and prototyping.  

  2. Dynamic typing of Python is a huge advantage.  You wont realize
  how useful it is until you start using it.

  3. Scriptability of your code.  i.e. it is easy to extend the code
  and use it from the Python interpreter.

  4. Advanced and easy to use data types.

  5. Large set of standard libaries.

The possibilities are enormous.  The minus side is that you should not
write cpu intensive stuff in the scripted language (that too is
changing slowly but I wont go down that track right now).

So usually a scripting languages biggest plus is that it is extremely
useful as 'glue' language.

Also consider reading this:

  http://www.scriptics.com/doc/scripting.html

Its a very nice article.

    TD> the capabilities of the GUIs?  I know scripts are useful in
    TD> terms of developments and tests because you don't need to
    TD> compile them, etc... but not in terms of GUI.  Why PyQt and
    TD> not directly Qt for example?

Why not?

You could always write it in C++ but then again you could write it in
C.  Fortran?  Assembly? :-D

The Python layer is usually very thin and allows you to build nice
GUI's.  Plus there is so much choice.

prabhu



More information about the vtkusers mailing list