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.
When the sample plugin code (Workshop_plugin_sources.zip) has been extracted in Seg3D's Plugins directory, Seg3D 2 source should resemble this image:
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).
Wrapper files, which are also placed in Interface/ToolInterface, are required to wrap the Qt generated GUI class.
Building Seg3D 2
Compile plugin code to add it to Seg3D.
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.
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.