[IGSTK-Developers] Application Wizard

Patrick Cheng cheng at isis.georgetown.edu
Mon Nov 21 12:30:26 EST 2005


Hi James,

The template file is a good idea, just like the CMake.in files. I will 
make such changes.

And for the fltk file. it's just generating a simple double window. user 
and design their gui based on that. We can also make it an option to 
generate this file or not. coz some people might want to use different guis.

Thank you for your suggestions.

Patrick

Hui Zhang wrote:
> Hi, Patrick,
> 
> It would be nice to have this wizard to generate the basic framework of 
> application or even IGSTK class later. In IGSTK class, there is a lot of 
> common part for declaration and logger. State machine is a big part in 
> IGSTK programming, so I vote option 3 to use XML to handle the state 
> machine diagram, which means state machine can be imort/export to other 
> applications.
> 
> Two questions:
> 1) I am not sure whether we should generate ApplicationGUI.fl in this 
> way. This file probably should be generated from fluid, and be designed 
> by the developer;
> 2) About the implementation. I suggest using another way instead of 
> writing the content of each line from the source code. For example, 
> current code:
> 
>   m_FileStream << "PROJECT( " << appName << " )\n\n";
> 
>    m_FileStream << "FIND_PACKAGE(IGSTK)\n";
>    m_FileStream << "IF (IGSTK_USE_FILE)\n";
>    m_FileStream << "  INCLUDE (${IGSTK_USE_FILE})\n";
>    m_FileStream << "ELSE (IGSTK_USE_FILE)\n";
>    m_FileStream << "  MESSAGE( FATAL_ERROR \"This application requires 
> IGSTK!\")\n";
>    m_FileStream << "ENDIF (IGSTK_USE_FILE)\n\n";
> 
> .....
> 
> I prefer to build several template files, (CMakeListsTemplate.txt, 
> ApplicationTemplate.h, ApplicationTemplate.cxx, and mainTemplate.cxx) 
> and save them in the ApplicationWizard directory. Instead of letting the 
> program generate these files, the program can simply copy these template 
> files from ApplicationWizard directory to the designated directory and 
> rename the files. Of course some change should be made, such as the 
> project name. It is an elegant way, comparing letting the program write 
> each line of the files. Another benefit is it is easy to change the 
> template file by any txt editor.
> 
> Thanks,
> James
> 
> 
> ----- Original Message ----- From: "Patrick Cheng" 
> <cheng at isis.georgetown.edu>
> To: "'IGSTK-developers'" <igstk-developers at public.kitware.com>
> Sent: Monday, November 21, 2005 10:36 AM
> Subject: [IGSTK-Developers] Application Wizard
> 
> 
>> Hi everyone,
>>
>> I wrote a application wizard program, not quite finished yet.
>> The purpose of this program is to provide the user (application
>> developer) a skeleton of the application code.
>>
>> Right now, you need to provide a directory, the name of the application
>> class, and the name of the GUI class. it will generate the
>> CMakeLists.txt, ApplicationGUI.fl, Application.h, Application.cxx, and
>> main.cxx file for you.
>>
>> The next step is to expending it to the state machine. I have been
>> investigating some possible ways to do this.
>>
>> 1. Use my gui and simple combobox to add states, inputs, and transition.
>> Drawback: not so intuitive to user.
>>
>> 2. Implement the state machine editor function in my gui so that user
>> can draw and edit the state machine in the gui. drawback: too much work
>> to do. :(
>>
>> 3. Use third party tool to design state machine and export to xml file.
>> and my application can ready in the xml file and generate the code.
>>
>> I personally prefer the 3rd option. I found FSME can do the job, but it
>> requires Qt. There is another StateMachineEditor in MITK, but it's in 
>> Java.
>>
>> Anyone has some suggestions?
>>
>> Thank you.
>>
>> Patrick
>>
>> BTW: to try the code, put them under the Sandbox/Example directory, and
>> add a subdir in the upper level CMakeLists.txt
>>
>>
>> -- 
>> Peng (Patrick) Cheng
>> Software Engineer
>> cheng at isis.georgetown.edu
>>
>> Imaging Science and Information Systems (ISIS) Center
>> Department of Radiology, Georgetown University Medical Center
>> 2115 Wisconsin Avenue, Suite 603
>> Washington, DC, 20007
>>
>> Work phone: 202-687-2902
>> Work fax:   202-784-3479
>> Cell phone: 202-674-5626
>>
> 
> 
> -------------------------------------------------------------------------------- 
> 
> 
> 
>> _______________________________________________
>> IGSTK-Developers mailing list
>> IGSTK-Developers at public.kitware.com
>> http://public.kitware.com/cgi-bin/mailman/listinfo/igstk-developers
>>
> 
> 
> 
> 

-- 
Peng (Patrick) Cheng
Software Engineer
cheng at isis.georgetown.edu

Imaging Science and Information Systems (ISIS) Center
Department of Radiology, Georgetown University Medical Center
2115 Wisconsin Avenue, Suite 603
Washington, DC, 20007

Work phone: 202-687-2902
Work fax:   202-784-3479
Cell phone: 202-674-5626



More information about the IGSTK-Developers mailing list