Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <mitkIPythonService.h>
Public Member Functions | |
virtual std::string | Execute (const std::string &pythonCommand, int commandType=SINGLE_LINE_COMMAND)=0 |
virtual void | ExecuteScript (const std::string &pathToPythonScript)=0 |
Executes a python script. More... | |
virtual bool | PythonErrorOccured () const =0 |
virtual std::vector< PythonVariable > | GetVariableStack () const =0 |
virtual bool | DoesVariableExist (const std::string &name) const =0 |
virtual void | AddPythonCommandObserver (PythonCommandObserver *observer)=0 |
adds a command observer which is informed after a command was issued with "Execute" More... | |
virtual void | RemovePythonCommandObserver (PythonCommandObserver *observer)=0 |
removes a specific command observer More... | |
virtual void | NotifyObserver (const std::string &command)=0 |
virtual bool | IsSimpleItkPythonWrappingAvailable ()=0 |
virtual bool | CopyToPythonAsSimpleItkImage (mitk::Image *image, const std::string &varName)=0 |
virtual mitk::Image::Pointer | CopySimpleItkImageFromPython (const std::string &varName)=0 |
virtual bool | IsOpenCvPythonWrappingAvailable ()=0 |
virtual bool | CopyToPythonAsCvImage (mitk::Image *image, const std::string &varName)=0 |
virtual mitk::Image::Pointer | CopyCvImageFromPython (const std::string &varName)=0 |
virtual bool | IsVtkPythonWrappingAvailable ()=0 |
virtual bool | CopyToPythonAsVtkPolyData (mitk::Surface *surface, const std::string &varName)=0 |
virtual mitk::Surface::Pointer | CopyVtkPolyDataFromPython (const std::string &varName)=0 |
virtual ctkAbstractPythonManager * | GetPythonManager ()=0 |
virtual | ~IPythonService () |
nothing to do here More... | |
Static Public Member Functions | |
static std::string | ForceLoadModule () |
Static Public Attributes | |
static const int | SINGLE_LINE_COMMAND |
static const int | MULTI_LINE_COMMAND |
static const int | EVAL_COMMAND |
The central service for issuing Python Code The class also enables to transfer mitk images to python as itk::Image and vice versa
Definition at line 58 of file mitkIPythonService.h.
|
virtual |
nothing to do here
Definition at line 19 of file mitkIPythonService.cpp.
|
pure virtual |
adds a command observer which is informed after a command was issued with "Execute"
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::QmitkPythonVariableStackTableModel().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableView::OnVariableStackDoubleClicked().
|
pure virtual |
copies an itk image from the python process that is named "varName"
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableView::OnVariableStackDoubleClicked().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::dropMimeData().
|
pure virtual |
copies an mitk image as itk image into the python interpreter process the image will be available as "varName" in python if everythin worked
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::dropMimeData().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::dropMimeData().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableView::OnVariableStackDoubleClicked().
|
pure virtual |
Implemented in mitk::PythonService.
|
pure virtual |
Executes a python command.
Implemented in mitk::PythonService.
|
pure virtual |
Executes a python script.
Implemented in mitk::PythonService.
|
static |
Definition at line 23 of file mitkIPythonService.cpp.
References MITK_INFO.
Referenced by QmitkCtkPythonShell::QmitkCtkPythonShell().
|
pure virtual |
Implemented in mitk::PythonService.
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::CommandExecuted().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::dropMimeData().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::dropMimeData().
|
pure virtual |
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::dropMimeData().
|
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.
|
pure virtual |
Implemented in mitk::PythonService.
|
pure virtual |
removes a specific command observer
Implemented in mitk::PythonService.
Referenced by QmitkPythonVariableStackTableModel::~QmitkPythonVariableStackTableModel().
|
static |
Constant representing a single line command x which is run as "eval(x)"
Definition at line 72 of file mitkIPythonService.h.
Referenced by mitk::PythonService::Execute().
|
static |
Constant representing a command in which the commands are seperated by new lines, i.e. "\\n"
Definition at line 68 of file mitkIPythonService.h.
Referenced by mitk::PythonService::CopyCvImageFromPython(), mitk::PythonService::CopySimpleItkImageFromPython(), mitk::PythonService::CopyToPythonAsCvImage(), mitk::PythonService::CopyToPythonAsSimpleItkImage(), mitk::PythonService::CopyToPythonAsVtkPolyData(), mitk::PythonService::CopyVtkPolyDataFromPython(), mitk::PythonService::Execute(), QmitkCtkPythonShell::executeCommand(), and QmitkPythonTextEditor::on_RunScript_triggered().
|
static |
Constant representing a single line command
Definition at line 64 of file mitkIPythonService.h.
Referenced by QmitkCtkPythonShell::dropEvent(), mitk::PythonService::Execute(), mitk::PythonService::IsOpenCvPythonWrappingAvailable(), mitk::PythonService::IsSimpleItkPythonWrappingAvailable(), and mitk::PythonService::IsVtkPythonWrappingAvailable().