Slicer3:Loadable Modules:HOWTO

From Slicer Wiki
Revision as of 23:30, 19 May 2008 by Tgl (talk | contribs) (New page: In order to allow a module to be detected and loaded at runtime (without explicitly being called from the main() routine in Applications/GUI/Slicer3.cxx), do the following: == ModuleName....)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Home < Slicer3:Loadable Modules:HOWTO

In order to allow a module to be detected and loaded at runtime (without explicitly being called from the main() routine in Applications/GUI/Slicer3.cxx), do the following:

ModuleName.txt

Create ModuleName.txt in the module's directory. ModuleName should follow the naming convention for the *GUI and *Logic classes.

For these two clases:

vtkOpenIGTLinkLogic
vtkOpenIGTLinkGUI

Create:

OpenIGTLink.txt

This file contains naming directives, as well as lists dependencies. At a minimum, the module name must be specified:


 Name: Open IGT Link
 

CMakeLists.txt

Now, edit the module's CMakeLists.txt file to call the Loadable Module Generator. NOTE: The macro should be placed after TCL wrapping is done, as it adds to the source variable.

For example:

 GENERATELM(OpenIGTLink_SRCS OpenIGTLink.txt)