Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jcfr/slicermixmatchextension
This extension illustrates some atypical integration of Slicer module components
https://github.com/jcfr/slicermixmatchextension
Last synced: 1 day ago
JSON representation
This extension illustrates some atypical integration of Slicer module components
- Host: GitHub
- URL: https://github.com/jcfr/slicermixmatchextension
- Owner: jcfr
- Created: 2016-04-01T21:00:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-04-01T22:29:21.000Z (almost 9 years ago)
- Last Synced: 2024-11-24T07:42:05.727Z (2 months ago)
- Language: Python
- Homepage:
- Size: 45.9 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SlicerMixMatchExtension
This is an example of extension bundling atypical modules.
## Modules
### ScriptedMixMatch
Scripted module building and using a c++ Loadable module logic.
Until [Slicer issue #3730](http://www.na-mic.org/Bug/view.php?id=3730) is resolved, prior instantiating the logic using `slicer.vtkSlicerScriptedMixMatchLogic()`:
* within Slicer core, this workaround is required:
```
import vtkSlicerScriptedMixMatchModuleLogic
setattr(slicer, 'vtkSlicerScriptedMixMatchLogic', vtkSlicerScriptedMixMatchModuleLogic.vtkSlicerScriptedMixMatchLogic)
```* within an extension, this workaround is required:
```
import os
import sys
logic_path=os.path.join(os.path.dirname(slicer.modules.scriptedmixmatch.path), '../qt-loadable-modules')
sys.path.append(logic_path)
sys.path.append(os.path.join(logic_path, './Python'))
import vtkSlicerScriptedMixMatchModuleLogic
setattr(slicer, 'vtkSlicerScriptedMixMatchLogic', vtkSlicerScriptedMixMatchModuleLogic.vtkSlicerScriptedMixMatchLogic)
```In both case, waiting the Slicer is resolved, approach similar to what is done in [6b6272d](https://github.com/jcfr/SlicerMixMatchExtension/commit/6b6272d512801e103cf4d4f795a22bf0be792d14) is suggested.
## Build and Run
Prerequisites:
* [Build Slicer](http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/Build_Instructions)Build:
```
cmake -DSlicer_DIR=/home/jcfr/Projects/Slicer-Release/Slicer-build/ ../SlicerMixMatchExtension
```Run:
```
cd /home/jcfr/Projects/Slicer-Release/Slicer-build
./Slicer --additional-module-paths /home/jcfr/Projects/SlicerMixMatchExtension-Release/```