CIBC:Seg3D2:Plugins

From SCIRun Documentation Wiki
Jump to navigation Jump to search

How To Extend Seg3D 2 With Plugins

Adding A Filter

Sample code showing how to create a new filter (wrapping the ITK noise image filter) as a Seg3D 2 plugin has been saved in Workshop_plugin_sources.zip. The zip file should be extracted in Seg3D 2's Plugins directory.

Plugin Architecture

When the sample plugin code (Workshop_plugin_sources.zip) has been extracted in Seg3D's Plugins directory, Seg3D 2 source should resemble this image:

Seg3d plugin.png

GUI

Each filter or tool has a GUI component, which is designed in Qt Designer. Qt Designer generates an XML file that is compiled to C++ code - this is controlled by Seg3D's CMake based build. Most of the time, this is a fairly simple Qt widget. Qt Designer source can be found under Interface/ToolInterface, both in the main sources (below), or under Plugins (see above).

Seg3d toolinterface.png

Wrapper files, which are also placed in Interface/ToolInterface, are required to wrap the Qt generated GUI class.

Actions

Filters

Building Seg3D 2

Compile plugin code to add it to Seg3D.

Windows

Windows users will have to configure a Visual Studio project using CMake. The release build instructions explain how to compile Seg3D from source. The NSIS requirement and packaging instructions can be ignored if an installer does not need to be built.

Mac OS X

Mac OS X can be built using the supplied build.sh script. The build.sh script can be used to generate either an Xcode project (use the --xcode-build flag), or run a full Seg3D 2 build using GNU makefiles (the default). If a GNU makefile based build is used, the make parallel build flag -j option is supported and can be passed to make.

Linux

The build.sh script can be used to run a full Seg3D 2 build using GNU makefiles (the default). If a GNU makefile based build is used, the make parallel build flag -j option is supported and can be passed to make.