Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
mitk::PythonService Class Reference

#include <mitkPythonService.h>

Inheritance diagram for mitk::PythonService:
Collaboration diagram for mitk::PythonService:

Public Member Functions

 PythonService ()
 instantiate python manager here More...
 
 ~PythonService () override
 empty implementation... More...
 
std::string Execute (const std::string &pythonCommand, int commandType=SINGLE_LINE_COMMAND) override
 
void ExecuteScript (const std::string &pathToPythonScript) override
 
bool PythonErrorOccured () const override
 
std::vector< PythonVariableGetVariableStack () const override
 
bool DoesVariableExist (const std::string &name) const override
 
std::string GetVariable (const std::string &name) const override
 
void AddPythonCommandObserver (PythonCommandObserver *observer) override
 
void RemovePythonCommandObserver (PythonCommandObserver *observer) override
 
void NotifyObserver (const std::string &command) override
 
bool IsSimpleItkPythonWrappingAvailable () override
 
bool CopyToPythonAsSimpleItkImage (mitk::Image *image, const std::string &varName) override
 
mitk::Image::Pointer CopySimpleItkImageFromPython (const std::string &varName) override
 
bool IsOpenCvPythonWrappingAvailable () override
 
bool CopyToPythonAsCvImage (mitk::Image *image, const std::string &varName) override
 
mitk::Image::Pointer CopyCvImageFromPython (const std::string &varName) override
 
bool IsVtkPythonWrappingAvailable () override
 
bool CopyToPythonAsVtkPolyData (mitk::Surface *surface, const std::string &varName) override
 
mitk::Surface::Pointer CopyVtkPolyDataFromPython (const std::string &varName) override
 
ctkAbstractPythonManager * GetPythonManager () override
 
void AddRelativeSearchDirs (std::vector< std::string > dirs) override
 
void AddAbsoluteSearchDirs (std::vector< std::string > dirs) override
 
- Public Member Functions inherited from mitk::IPythonService
virtual ~IPythonService ()
 nothing to do here More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mitk::IPythonService
static std::string ForceLoadModule ()
 
- Static Public Attributes inherited from mitk::IPythonService
static const int SINGLE_LINE_COMMAND
 
static const int MULTI_LINE_COMMAND
 
static const int EVAL_COMMAND
 

Detailed Description

implementation of the IPythonService using ctkabstractpythonmanager

See also
IPythonService

Definition at line 29 of file mitkPythonService.h.

Constructor & Destructor Documentation

◆ PythonService()

mitk::PythonService::PythonService ( )

instantiate python manager here

◆ ~PythonService()

mitk::PythonService::~PythonService ( )
override

empty implementation...

Member Function Documentation

◆ AddAbsoluteSearchDirs()

void mitk::PythonService::AddAbsoluteSearchDirs ( std::vector< std::string >  dirs)
overridevirtual

Implements mitk::IPythonService.

◆ AddPythonCommandObserver()

void mitk::PythonService::AddPythonCommandObserver ( PythonCommandObserver observer)
overridevirtual

◆ AddRelativeSearchDirs()

void mitk::PythonService::AddRelativeSearchDirs ( std::vector< std::string >  dirs)
overridevirtual

Implements mitk::IPythonService.

◆ CopyCvImageFromPython()

mitk::Image::Pointer mitk::PythonService::CopyCvImageFromPython ( const std::string &  varName)
overridevirtual

◆ CopySimpleItkImageFromPython()

mitk::Image::Pointer mitk::PythonService::CopySimpleItkImageFromPython ( const std::string &  varName)
overridevirtual
See also
IPythonService::CopyItkImageFromPython()

Implements mitk::IPythonService.

◆ CopyToPythonAsCvImage()

bool mitk::PythonService::CopyToPythonAsCvImage ( mitk::Image image,
const std::string &  varName 
)
overridevirtual

◆ CopyToPythonAsSimpleItkImage()

bool mitk::PythonService::CopyToPythonAsSimpleItkImage ( mitk::Image image,
const std::string &  varName 
)
overridevirtual
See also
IPythonService::CopyToPythonAsItkImage()

Implements mitk::IPythonService.

◆ CopyToPythonAsVtkPolyData()

bool mitk::PythonService::CopyToPythonAsVtkPolyData ( mitk::Surface surface,
const std::string &  varName 
)
overridevirtual

◆ CopyVtkPolyDataFromPython()

mitk::Surface::Pointer mitk::PythonService::CopyVtkPolyDataFromPython ( const std::string &  varName)
overridevirtual

◆ DoesVariableExist()

bool mitk::PythonService::DoesVariableExist ( const std::string &  name) const
overridevirtual

◆ Execute()

std::string mitk::PythonService::Execute ( const std::string &  pythonCommand,
int  commandType = SINGLE_LINE_COMMAND 
)
overridevirtual

◆ ExecuteScript()

void mitk::PythonService::ExecuteScript ( const std::string &  pathToPythonScript)
overridevirtual

◆ GetPythonManager()

ctkAbstractPythonManager* mitk::PythonService::GetPythonManager ( )
overridevirtual
Returns
the ctk abstract python manager instance

Implements mitk::IPythonService.

◆ GetVariable()

std::string mitk::PythonService::GetVariable ( const std::string &  name) const
overridevirtual

◆ GetVariableStack()

std::vector<PythonVariable> mitk::PythonService::GetVariableStack ( ) const
overridevirtual

◆ IsOpenCvPythonWrappingAvailable()

bool mitk::PythonService::IsOpenCvPythonWrappingAvailable ( )
overridevirtual

◆ IsSimpleItkPythonWrappingAvailable()

bool mitk::PythonService::IsSimpleItkPythonWrappingAvailable ( )
overridevirtual
See also
IPythonService::IsItkPythonWrappingAvailable()

Implements mitk::IPythonService.

◆ IsVtkPythonWrappingAvailable()

bool mitk::PythonService::IsVtkPythonWrappingAvailable ( )
overridevirtual

◆ NotifyObserver()

void mitk::PythonService::NotifyObserver ( const std::string &  command)
overridevirtual

◆ PythonErrorOccured()

bool mitk::PythonService::PythonErrorOccured ( ) const
overridevirtual

◆ RemovePythonCommandObserver()

void mitk::PythonService::RemovePythonCommandObserver ( PythonCommandObserver observer)
overridevirtual

The documentation for this class was generated from the following file: