PythonToCppTileProcessorBridge¶
- MLModule¶
 author
package
dll
definition
see also
keywords
Purpose¶
The module PythonToCppTileProcessorBridge allows to connect python-based TileProcessors and TileProcessorProperties to ProcessTiles or ApplyTileProcessorPageWise.
Usage¶
Connect a TileProcessor and a (proposed) TileProcessorProperties object to its inputs, combine its outputs using a AddTileProcessorProperties module, and connect its output to ProcessTiles, ApplyTileProcessorPageWise or ApplyTileProcessor
Details¶
The module is responsible for converting c++ calls made by modules such as ProcessTiles or ApplyTileProcessorPageWise on the wrapper object provided at outCppTileProcessor into python calls on the python processor at inPyTileProcessor, and converting data back and forth. It also converts python TileProcessorProperties from inPyTileProcessorProperties to their C++ equivalent.
NOTES
Usually the module is not used on “top level” as it can easily be added to the actual python processor’s wrapper module, if existing (e.g. see module
ExamplePythonTileProcessor, which therefore also has anoutCppTileProcessorfield)The py/c++ conversion is quite slow, so it actually only makes sense if the tile processing itself is computationally expensive.
Windows¶
Default Panel¶
Input Fields¶
inPyTileProcessor¶
- name: inPyTileProcessor, type: MLBase, deprecated name: inPyTileClassifier¶
 Python tile processor as defined in
mlab_projects.TileProcessing.PythonTileProcessing.TileProcessor. SeeExamplePythonTileProcessorfor an example.
inPyTileProcessorProperties¶
- name: inPyTileProcessorProperties, type: MLBase, deprecated name: inPyTileProperties,inPyTilePropertiesSource¶
 Python
TileProcessorPropertiesobject to be converted to a C++TileProcessorPropertiesSource(which does not copy the properties, but references the python ones).
Output Fields¶
outCppTileProcessor¶
- name: outCppTileProcessor, type: MLBase, deprecated name: outCppTileClassifier¶
 C++ wrapper for the python tile processor connected at the input.
outCppTileProcessorProperties¶
- name: outCppTileProcessorProperties, type: MLBase, deprecated name: outCppTileProperties¶
 C++
TileProcessorPropertiesSource(which does not copy the python properties, but references them).
Parameter Fields¶
Visible Fields¶
Print Traceback for these Python Exceptions in processTile()¶
- name: inPrintTraceBackForPythonExceptions, type: Enum, default: OnlyUnspecific¶
 Selects for which exceptions in
processTile()the error traceback is printed. Note that the consumer module will always print at least one error with the exception’s message.
Values:
Title  | 
Name  | 
Description  | 
|---|---|---|
All  | 
All  | 
For all exceptions  | 
Only Unspecific  | 
OnlyUnspecific  | 
Only for ‘unspecific’ exceptions (e.g. TileProcessor.ProcessTileError is exempt)  | 
None  | 
None  | 
Never print a traceback.  |