12 #ifndef mitkIPythonService_h
13 #define mitkIPythonService_h
26 class ctkAbstractPythonManager;
62 static const int SINGLE_LINE_COMMAND = 0;
66 static const int MULTI_LINE_COMMAND = 1;
70 static const int EVAL_COMMAND = 2;
75 virtual std::string Execute(
const std::string& pythonCommand,
int commandType = SINGLE_LINE_COMMAND ) = 0;
78 virtual void ExecuteScript(
const std::string& pathToPythonScript ) = 0;
81 virtual bool PythonErrorOccured()
const = 0;
84 virtual std::vector<PythonVariable> GetVariableStack()
const = 0;
87 virtual bool DoesVariableExist(
const std::string& name)
const = 0;
90 virtual std::string GetVariable(
const std::string& name)
const = 0;
102 virtual void NotifyObserver(
const std::string& command ) = 0;
106 virtual bool IsSimpleItkPythonWrappingAvailable() = 0;
111 virtual bool CopyToPythonAsSimpleItkImage(
mitk::Image* image,
const std::string& varName ) = 0;
119 virtual bool IsVtkPythonWrappingAvailable() = 0;
122 virtual bool CopyToPythonAsVtkPolyData(
mitk::Surface* surface,
const std::string& varName ) = 0;
125 virtual ctkAbstractPythonManager* GetPythonManager() = 0;
132 static std::string ForceLoadModule();
134 virtual void AddRelativeSearchDirs(std::vector< std::string > dirs) = 0;
136 virtual void AddAbsoluteSearchDirs(std::vector< std::string > dirs) = 0;