[Insight-developers] [Fwd: [Insight-users] example style]
Stephen R. Aylward
aylward@unc.edu
Fri, 11 Oct 2002 13:26:08 -0400
Hi,
I really don't like this style of programming. It hurts portability to
non-GUI/non-FLTK apps. I know it is recommended for FLTK, but I really
think we should go with something that better modularizes our examples/apps.
Of course, since these will become apps, I deemed this discussion moot,
but since I user brought it up...
I'd rather have a simple
main.cxx
mainGUI.cxx/h generated by fltk
mainCallBacks.cxx that calls methods in
mainMethods.cxx/h that implements the methods as a class.
That way, mainMethods.cxx/h can be looked at without getting confused by
GUI issues.
The instance of the class defined in mainMethods can be passed as user
data to the callbacks, so no global vars are needed.
Stephen
-------- Original Message --------
Subject: [Insight-users] example style
Date: Fri, 11 Oct 2002 12:51:07 +0200
From: "Zein Salah" <salah@gris.uni-tuebingen.de>
To: "ITK Users" <insight-users@public.kitware.com>
hello friends,
I have notices that most (or all) the examples of ITK have the following
style:
example.cpp
example.h
exampleBASE.cpp
exampleBASE.h
exampleGUI.cpp
exampleGUI.h
exampleGUI.fl
I have no problem in understanding the examples. But I would like to
understand this style of dividing the program so that I can develope my
programs in the same style. Can somebody explain to me on what basis the
program is divided this way. I mean: what should each file contain.
Mainly, the relation/interaction between the GUI files and the other group.
Many thank for any explanations or help,
Zein
->8<------------->8<------------->8<------------->8<------------->8<------------->8<-
Zein I. Salah
Universität Tübingen, WSI-GRIS
Sand 14
72076 Tübingen
Email: salah@gris.uni-tuebingen.de <mailto:salah@gris.uni-tuebingen.de>
/ zeinsalah@hotmail.com <mailto:zeinsalah@hotmail.com>
Tel.: (07071) 29 75465 (GRIS) , (07071) 96 44 39 (privat)
Fax: (07071) 29 54 66
--
===============================================
Dr. Stephen R. Aylward
Assistant Professor of Radiology
Adjunct Assistant Professor of Computer Science
http://caddlab.rad.unc.edu
aylward@unc.edu
(919) 966-9695