From Slicer Wiki
Home < Documentation < Labs < CallingPythonMethodsFromCpp
This has been discussed during the NA-MIC engineering Tcon of Jan 31, 2012. The goal would be to create a class / object allowing to easily instanciate python call and call associated python method from Cpp.
The existing code allowing to call python methods is "duplicated" in two places: https://github.com/Slicer/Slicer/blob/master/Base/QTGUI/qSlicerScriptedLoadableModule.cxx https://github.com/Slicer/Slicer/blob/master/Libs/MRML/DisplayableManager/vtkMRMLScriptedDisplayableManager.cxx The idea would be to create a re-usable class allowing to easily achieve it.