3D Slicer plugin
NiftyRec includes a plugin for 3D Slicer for the reconstruction of SPECT images.
Build and install NiftyRec or install using the binary package for your operating system. When you build from the source, make sure that the following options are set to ON in the CMake configuration:
- NiftyRec_BUILD_APPS ON
- NiftyRec_SUPPORT_NRRD ON
Locate the binary 'rec_spect', generated when you build NiftyRec (with the NiftyRec_BUILD_APPS option ON) or included in the binary self installing package.
Launch 3D Slicer and modify its settings in order for the NiftyRec plugin to be loaded:
- Click on Wiev -> Application Settings.
- Click on Module Settings.
- Add the directory where 'rec_spect' is located to the list of directories that Slicer searches for plugin modules.
- Restart 3D Slicer.
- Now the plugin 'NiftyREC SPECT' is available in the 'Reconstruction' group in the 'Modules' dropdown list in the 3D Slicer GUI.
How does it work?
The plugin for 3D Slicer is based on the Slicer Execution Model. The NiftyRec command line executable 'rec_spect' performs reconstruction of SPECT images and can be executed from the shell (type ./rec_spect --help to visualize use instructions). When 'rec_spect' is launched with the option '--xml', it returns an XML file that contains a description (according to the Slicer Execution Model) of the input and output parameters of 'rec_spect'. When 3D Slicer starts, it attempts to execute all executables in the paths specified in Wiev -> Application Settings -> Module Settings with the '--xml' option. It then creates a new module for each executable that returns the Slicer Execution Model XML description and generates a Widget automatically according to the description.