ExamplePythonTileProcessor

MacroModule

genre

ML_Inference_Providers_Examples

author

Jan-Martin Kuhnigk

package

FMEstable/ReleaseMeVis

definition

ExamplePythonTileProcessorModule.def

see also

ApplyTileProcessorPageWise

keywords

patch, tile, classif, numpy, ExamplePythonTileClassifier

Purpose

Just an example module showing how to provide a python-based processor for ApplyTileProcessorPageWise. It transforms the input data values voxel-wise according to

out = ( in - Minimum Input Value ) / ( Maximum Input Value - Minimum Input Value )

Usage

See example network

Windows

Default Panel

../../../Projects/TileProcessing/ExamplePythonTileProcessor/Modules/mhelp/Images/Screenshots/ExamplePythonTileProcessor._default.png

Output Fields

outCppObject

name: outCppObject, type: MLBase, deprecated name: outCppTileClassifier,outCppTileProcessor

C++ wrapper for the python tile processor connected at the input.

outPyTileProcessor (hidden)

name: outPyTileProcessor, type: MLBase, deprecated name: outPyTileClassifier

Usually only required for testing, as py-cpp conversion is already done internally for convenience.

outPyProposedTileProcessorProperties (hidden)

name: outPyProposedTileProcessorProperties, type: MLBase, deprecated name: outPyProposedTileProperties

Usually only required for testing, as py-cpp conversion is already done internally for convenience.

Parameter Fields

Field Index

[]: Trigger

On Input Change Behavior: Enum

Add TileProcessorProperties Object: Bool

Status Code: Enum

Clear: Trigger

Status Message: String

doNotClearOnFailedUpdate: Bool

Update: Trigger

Fill Value: Double

Has Valid Output: Bool

Maximum Input Value: Double

Minimum Input Value: Double

Visible Fields

Update

name: update, type: Trigger

Initiates update of all output field values.

Clear

name: clear, type: Trigger

Clears all output field values to a clean initial state.

On Input Change Behavior

name: onInputChangeBehavior, type: Enum, default: Clear, deprecated name: shouldAutoUpdate,shouldUpdateAutomatically

Declares how the module should react if a value of an input field changes.

Values:

Title

Name

Deprecated Name

​Update

​Update

​TRUE

​Clear

​Clear

​FALSE

[]

name: updateDone, type: Trigger, persistent: no

Notifies that an update was performed (Check status interface fields to identify success or failure).

Has Valid Output

name: hasValidOutput, type: Bool, persistent: no

Indicates validity of output field values (success of computation).

Status Code

name: statusCode, type: Enum, persistent: no

Reflects module’s status (successful or failed computations) as one of some predefined enumeration values.

Values:

Title

Name

​Ok

​Ok

​Invalid input object

​Invalid input object

​Invalid input parameter

​Invalid input parameter

​Internal error

​Internal error

Status Message

name: statusMessage, type: String, persistent: no

Gives additional, detailed information about status code as human-readable message.

Minimum Input Value

name: inMinValue, type: Double, default: 0

Minimum value to be expected in the input data.

Maximum Input Value

name: inMaxValue, type: Double, default: 1

Maximum value to be expected in the input data.

Add TileProcessorProperties Object

name: inAllowProposingTileProcessorProperties, type: Bool, default: TRUE, deprecated name: inAllowProposingTileProperties

Fill Value

name: inFillValue, type: Double, default: 0.5

Hidden Fields

doNotClearOnFailedUpdate

name: doNotClearOnFailedUpdate, type: Bool, persistent: no

Prevents automated clear after update failed. This does not affect status fields. It enables the developer to analyze module’s state after failure.