Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <mitkPythonService.h>
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< PythonVariable > | GetVariableStack () 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 |
![]() | |
virtual | ~IPythonService () |
nothing to do here More... | |
Additional Inherited Members | |
![]() | |
static std::string | ForceLoadModule () |
![]() | |
static const int | SINGLE_LINE_COMMAND |
static const int | MULTI_LINE_COMMAND |
static const int | EVAL_COMMAND |
implementation of the IPythonService using ctkabstractpythonmanager
Definition at line 25 of file mitkPythonService.h.
mitk::PythonService::PythonService | ( | ) |
instantiate python manager here
Definition at line 39 of file mitkPythonService.cpp.
References EXTERNAL_DIST_PACKAGES, EXTERNAL_SITE_PACKAGES, MITK_INFO, mitkThrow, and PYTHON_LIBRARY.
|
override |
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 101 of file mitkPythonService.cpp.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 209 of file mitkPythonService.cpp.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 89 of file mitkPythonService.cpp.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 734 of file mitkPythonService.cpp.
References DeterminePixelType(), Execute(), mitk::ImageWriteAccessor::GetData(), MITK_DEBUG, mitk::IPythonService::MULTI_LINE_COMMAND, and mitk::Image::New().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 515 of file mitkPythonService.cpp.
References DeterminePixelType(), Execute(), MITK_DEBUG, mitk::IPythonService::MULTI_LINE_COMMAND, and mitk::Image::New().
|
overridevirtual |
Build a string in the format [1024,1028,1] to describe the dimensionality. This is needed for simple itk to know the dimensions of the image
Implements mitk::IPythonService.
Definition at line 630 of file mitkPythonService.cpp.
References Execute(), mitk::PixelType::GetComponentType(), mitk::ImageAccessorBase::GetData(), mitk::Image::GetDimensions(), mitk::PixelType::GetNumberOfComponents(), mitk::Image::GetPixelType(), MITK_DEBUG, MITK_WARN, and mitk::IPythonService::MULTI_LINE_COMMAND.
|
overridevirtual |
Build a string in the format [1024,1028,1] to describe the dimensionality. This is needed for simple itk to know the dimensions of the image
Implements mitk::IPythonService.
Definition at line 229 of file mitkPythonService.cpp.
References Execute(), mitk::FillVector3D(), mitk::PixelType::GetComponentType(), mitk::ImageAccessorBase::GetData(), mitk::Image::GetDimensions(), mitk::BaseData::GetGeometry(), mitk::BaseGeometry::GetIndexToWorldTransform(), mitk::PixelType::GetNumberOfComponents(), mitk::BaseGeometry::GetOrigin(), mitk::PixelType::GetPixelType(), mitk::Image::GetPixelType(), mitk::BaseGeometry::GetSpacing(), MITK_DEBUG, MITK_WARN, and mitk::IPythonService::MULTI_LINE_COMMAND.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 843 of file mitkPythonService.cpp.
References Execute(), mitk::Surface::GetVtkPolyData(), MITK_DEBUG, and mitk::IPythonService::MULTI_LINE_COMMAND.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 799 of file mitkPythonService.cpp.
References Execute(), MITK_DEBUG, mitk::IPythonService::MULTI_LINE_COMMAND, and mitk::Surface::New().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 192 of file mitkPythonService.cpp.
References GetVariableStack().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 109 of file mitkPythonService.cpp.
References mitk::IPythonService::EVAL_COMMAND, mitk::IPythonService::MULTI_LINE_COMMAND, NotifyObserver(), and mitk::IPythonService::SINGLE_LINE_COMMAND.
Referenced by CopyCvImageFromPython(), CopySimpleItkImageFromPython(), CopyToPythonAsCvImage(), CopyToPythonAsSimpleItkImage(), CopyToPythonAsVtkPolyData(), CopyVtkPolyDataFromPython(), IsOpenCvPythonWrappingAvailable(), IsSimpleItkPythonWrappingAvailable(), and IsVtkPythonWrappingAvailable().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 133 of file mitkPythonService.cpp.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 794 of file mitkPythonService.cpp.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 180 of file mitkPythonService.cpp.
References GetVariableStack().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 143 of file mitkPythonService.cpp.
References mitk::PythonVariable::m_Name, mitk::PythonVariable::m_Type, and mitk::PythonVariable::m_Value.
Referenced by DoesVariableExist(), and GetVariable().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 885 of file mitkPythonService.cpp.
References Execute(), PythonErrorOccured(), and mitk::IPythonService::SINGLE_LINE_COMMAND.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 867 of file mitkPythonService.cpp.
References Execute(), MITK_ERROR, PythonErrorOccured(), and mitk::IPythonService::SINGLE_LINE_COMMAND.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 893 of file mitkPythonService.cpp.
References Execute(), PythonErrorOccured(), and mitk::IPythonService::SINGLE_LINE_COMMAND.
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 220 of file mitkPythonService.cpp.
References MITK_DEBUG.
Referenced by Execute().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 902 of file mitkPythonService.cpp.
Referenced by IsOpenCvPythonWrappingAvailable(), IsSimpleItkPythonWrappingAvailable(), and IsVtkPythonWrappingAvailable().
|
overridevirtual |
Implements mitk::IPythonService.
Definition at line 215 of file mitkPythonService.cpp.