Workspace 6.21.5
Namespaces | Classes | Typedefs | Functions
CSIRO::Python Namespace Reference

Namespaces

namespace  LogCapture
 
namespace  ObjectGroupInternal
 

Classes

class  NumPyToArray3dScalarAdaptor
 
class  PythonGuard
 
class  PythonInitialiser
 
class  PythonMeshInterface
 
class  PythonNumpyInterface
 Provides interface to support the python numpy type. More...
 
class  PythonObjectGroup
 Options class for visualisation of ChArucoBoard3dViz. More...
 
class  PythonObjectGroupBase
 
class  PythonPlugin
 Provides Python operations to support the running of Python code from within the Workspace. More...
 
class  PythonTypesRegistry
 A registry of PythonTypesRegistry implementations which can be used to create new instances. More...
 
class  RunPythonScript
 Provides support for the running of Python code within a Workspace workflow. More...
 

Typedefs

using PythonArray = pybind11::array
 

Functions

bool adaptNumpyToQImage (DataExecution::DataObject &src, DataExecution::DataObject &dest, bool copy)
 
bool adaptQImageToNumpy (DataExecution::DataObject &src, DataExecution::DataObject &dest, bool copy)
 
void InitializeTypeMaps ()
 
pyb::object map (const QVariant &var, bool &succeeded)
 
void map (pyb::dict &parent, const ObjectGroup &parentGroup, bool &succeeded)
 
pyb::object mapBool (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapDouble (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapInt (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapMeshModelInterface (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapPythonNumpyInterface (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapQByteArray (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapQJsonDocument (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapQPointF (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapQString (DataExecution::DataObject &obj, bool &succeeded)
 
pyb::object mapQVariant (DataExecution::DataObject &obj, bool &succeeded)
 
 PYBIND11_EMBEDDED_MODULE (workspace, m)
 
QVariant unmap (pyb::object obj)
 
bool unmapBool (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapDouble (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapInt (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapMeshModelInterface (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapPythonNumpyInterface (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapQByteArray (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapQJsonDocument (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapQPointF (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapQString (pyb::object pyObj, DataExecution::DataObject &obj)
 
bool unmapQVariant (pyb::object pyObj, DataExecution::DataObject &obj)
 

Typedef Documentation

◆ PythonArray

using PythonArray = pybind11::array

Function Documentation

◆ adaptNumpyToQImage()

bool adaptNumpyToQImage ( DataExecution::DataObject src,
DataExecution::DataObject dest,
bool  copy 
)

◆ adaptQImageToNumpy()

bool adaptQImageToNumpy ( DataExecution::DataObject src,
DataExecution::DataObject dest,
bool  copy 
)

◆ InitializeTypeMaps()

void InitializeTypeMaps ( )

Register all the default supported types.

◆ map() [1/2]

pyb::object map ( const QVariant &  var,
bool &  succeeded 
)

Maps a QVariant to a Python object.

Parameters
varThe QVariant to convert to a Python object.
succeededTrue if the conversion succeeded, false if it failed.
Returns
The Python object containing the QVariant value or a null Python object if the conversion failed.

◆ map() [2/2]

void map ( pyb::dict &  parent,
const ObjectGroup parentGroup,
bool &  succeeded 
)

Maps an ObjectGroup to a Python object hierarchy.

Parameters
parentThe Python object into which the ObjectGroup is copied.
parentGroupThe ObjectGroup to convert.
succeededTrue if the conversion succeeded, false if it failed.

◆ mapBool()

pyb::object mapBool ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a bool object to a Python object.

◆ mapDouble()

pyb::object mapDouble ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a double object to a Python object.

◆ mapInt()

pyb::object mapInt ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a int object to a Python object.

◆ mapMeshModelInterface()

pyb::object mapMeshModelInterface ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a MeshModelInterface object to a Python object.

◆ mapPythonNumpyInterface()

pyb::object mapPythonNumpyInterface ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a PythonNumpyInterface object to a Python object.

◆ mapQByteArray()

pyb::object mapQByteArray ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a QByteArray object to a Python object.

◆ mapQJsonDocument()

pyb::object mapQJsonDocument ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a QJsonDocument object to a Python object.

◆ mapQPointF()

pyb::object mapQPointF ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a QPointF object to a Python object.

◆ mapQString()

pyb::object mapQString ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a QString object to a Python object.

◆ mapQVariant()

pyb::object mapQVariant ( DataExecution::DataObject obj,
bool &  succeeded 
)

Maps a QVariant object to a Python object.

◆ PYBIND11_EMBEDDED_MODULE()

PYBIND11_EMBEDDED_MODULE ( workspace  ,
 
)

◆ unmap()

QVariant unmap ( pyb::object  obj)

Converts a Python object to QVariant.

Parameters
objThe Python object to convert.
Returns
Returns a QVariant containing the object value or an invalid QVariant if the conversion failed.

◆ unmapBool()

bool unmapBool ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to bool.

◆ unmapDouble()

bool unmapDouble ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to double.

◆ unmapInt()

bool unmapInt ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to int.

◆ unmapMeshModelInterface()

bool unmapMeshModelInterface ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to MeshModelInterface.

◆ unmapPythonNumpyInterface()

bool unmapPythonNumpyInterface ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to PythonNumpyInterface.

◆ unmapQByteArray()

bool unmapQByteArray ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to QByteArray.

◆ unmapQJsonDocument()

bool unmapQJsonDocument ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to QJsonDocument.

◆ unmapQPointF()

bool unmapQPointF ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to QPointF.

◆ unmapQString()

bool unmapQString ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to QString.

◆ unmapQVariant()

bool unmapQVariant ( pyb::object  pyObj,
DataExecution::DataObject obj 
)

Converts a Python object to QVariant.