PythonToCppTileProcessorBridge¶
-
MLModule
¶ author Jan-Martin Kuhnigk
package FMEstable/ReleaseMeVis
dll MLPythonToCppTileProcessorBridge
definition PythonToCppTileProcessorBridge.def see also ApplyTileProcessorPageWise
keywords numpy
,PythonToCppTileClassifierBridge
,adapter
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 anoutCppTileProcessor
field) - The py/c++ conversion is quite slow, so it actually only makes sense if the tile processing itself is computationally expensive.
Input Fields¶
inPyTileProcessor¶
-
name:
inPyTileProcessor
, type:
MLBase
, deprecated name:
inPyTileClassifier
¶ Python tile processor as defined in
mlab_projects.TileProcessing.PythonTileProcessing.TileProcessor
. SeeExamplePythonTileProcessor
for an example.
inPyTileProcessorProperties¶
-
name:
inPyTileProcessorProperties
, type:
MLBase
, deprecated name:
inPyTileProperties,inPyTilePropertiesSource
¶ Python
TileProcessorProperties
object to be converted to a C++TileProcessorPropertiesSource
(which does not copy the properties, but references the python ones).
Output Fields¶
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. |