#include <mitkIPythonService.h>
The central service for issuing Python Code The class also enables to transfer mitk images to python as itk::Image and vice versa
- See also
- IPythonService::GetVariableStack()
Definition at line 56 of file mitkIPythonService.h.
◆ ~IPythonService()
virtual mitk::IPythonService::~IPythonService |
( |
| ) |
|
|
virtual |
◆ AddAbsoluteSearchDirs()
virtual void mitk::IPythonService::AddAbsoluteSearchDirs |
( |
std::vector< std::string > |
dirs | ) |
|
|
pure virtual |
◆ AddPythonCommandObserver()
adds a command observer which is informed after a command was issued with "Execute"
Implemented in mitk::PythonService.
◆ AddRelativeSearchDirs()
virtual void mitk::IPythonService::AddRelativeSearchDirs |
( |
std::vector< std::string > |
dirs | ) |
|
|
pure virtual |
◆ CopySimpleItkImageFromPython()
virtual mitk::Image::Pointer mitk::IPythonService::CopySimpleItkImageFromPython |
( |
const std::string & |
varName | ) |
|
|
pure virtual |
copies an itk image from the python process that is named "varName"
- Returns
- the image or 0 if copying was not possible
Implemented in mitk::PythonService.
◆ CopyToPythonAsSimpleItkImage()
virtual bool mitk::IPythonService::CopyToPythonAsSimpleItkImage |
( |
mitk::Image * |
image, |
|
|
const std::string & |
varName |
|
) |
| |
|
pure virtual |
copies an mitk image as itk image into the python interpreter process the image will be available as "varName" in python if everything worked
- Returns
- true if image was copied, else false
Implemented in mitk::PythonService.
◆ CopyToPythonAsVtkPolyData()
virtual bool mitk::IPythonService::CopyToPythonAsVtkPolyData |
( |
mitk::Surface * |
surface, |
|
|
const std::string & |
varName |
|
) |
| |
|
pure virtual |
◆ DoesVariableExist()
virtual bool mitk::IPythonService::DoesVariableExist |
( |
const std::string & |
name | ) |
const |
|
pure virtual |
- Returns
- true if a variable with this name is defined in the main namespace, false otherwise
Implemented in mitk::PythonService.
◆ Execute()
virtual std::string mitk::IPythonService::Execute |
( |
const std::string & |
pythonCommand, |
|
|
int |
commandType = SINGLE_LINE_COMMAND |
|
) |
| |
|
pure virtual |
Executes a python command.
- Returns
- A variant containing the return value as string of the python code (if any)
Implemented in mitk::PythonService.
◆ ExecuteScript()
virtual void mitk::IPythonService::ExecuteScript |
( |
const std::string & |
pathToPythonScript | ) |
|
|
pure virtual |
◆ ForceLoadModule()
static std::string mitk::IPythonService::ForceLoadModule |
( |
| ) |
|
|
static |
◆ GetPythonManager()
virtual ctkAbstractPythonManager* mitk::IPythonService::GetPythonManager |
( |
| ) |
|
|
pure virtual |
◆ GetVariable()
virtual std::string mitk::IPythonService::GetVariable |
( |
const std::string & |
name | ) |
const |
|
pure virtual |
- Returns
- value of variable with this name as string, empty string if variable does not exist
Implemented in mitk::PythonService.
◆ GetVariableStack()
virtual std::vector<PythonVariable> mitk::IPythonService::GetVariableStack |
( |
| ) |
const |
|
pure virtual |
◆ IsSimpleItkPythonWrappingAvailable()
virtual bool mitk::IPythonService::IsSimpleItkPythonWrappingAvailable |
( |
| ) |
|
|
pure virtual |
◆ IsVtkPythonWrappingAvailable()
virtual bool mitk::IPythonService::IsVtkPythonWrappingAvailable |
( |
| ) |
|
|
pure virtual |
◆ NotifyObserver()
virtual void mitk::IPythonService::NotifyObserver |
( |
const std::string & |
command | ) |
|
|
pure virtual |
notify all observer. this should only be used if it can be garantueed that the current python interpreter instance got another command from anywhere else the the Execute() method of this service, e.g. the shell widget uses this function since it does not use Execute()
Implemented in mitk::PythonService.
◆ PythonErrorOccured()
virtual bool mitk::IPythonService::PythonErrorOccured |
( |
| ) |
const |
|
pure virtual |
- Returns
- true if the last call to Execute...() resulted in an error, false otherwise
Implemented in mitk::PythonService.
◆ RemovePythonCommandObserver()
◆ EVAL_COMMAND
const int mitk::IPythonService::EVAL_COMMAND |
|
static |
◆ MULTI_LINE_COMMAND
const int mitk::IPythonService::MULTI_LINE_COMMAND |
|
static |
◆ SINGLE_LINE_COMMAND
const int mitk::IPythonService::SINGLE_LINE_COMMAND |
|
static |
The documentation for this class was generated from the following file: