12 #ifndef mitkIPythonService_h
13 #define mitkIPythonService_h
16 #include <MitkPythonExports.h>
24 class ctkAbstractPythonManager;
60 static const int SINGLE_LINE_COMMAND = 0;
64 static const int MULTI_LINE_COMMAND = 1;
68 static const int EVAL_COMMAND = 2;
73 virtual std::string Execute(
const std::string& pythonCommand,
int commandType = SINGLE_LINE_COMMAND ) = 0;
76 virtual void ExecuteScript(
const std::string& pathToPythonScript ) = 0;
79 virtual bool PythonErrorOccured()
const = 0;
82 virtual std::vector<PythonVariable> GetVariableStack()
const = 0;
85 virtual bool DoesVariableExist(
const std::string& name)
const = 0;
88 virtual std::string GetVariable(
const std::string& name)
const = 0;
100 virtual void NotifyObserver(
const std::string& command ) = 0;
104 virtual bool IsSimpleItkPythonWrappingAvailable() = 0;
109 virtual bool CopyToPythonAsSimpleItkImage(
mitk::Image* image,
const std::string& varName ) = 0;
117 virtual bool IsOpenCvPythonWrappingAvailable() = 0;
120 virtual bool CopyToPythonAsCvImage(
mitk::Image* image,
const std::string& varName ) = 0;
127 virtual bool IsVtkPythonWrappingAvailable() = 0;
130 virtual bool CopyToPythonAsVtkPolyData(
mitk::Surface* surface,
const std::string& varName ) = 0;
136 virtual ctkAbstractPythonManager* GetPythonManager() = 0;
143 static std::string ForceLoadModule();
145 virtual void AddRelativeSearchDirs(std::vector< std::string > dirs) = 0;
147 virtual void AddAbsoluteSearchDirs(std::vector< std::string > dirs) = 0;