FieldListener

MacroModule
genre Fields
author MeVis Medical Solutions AG
package MeVisLab/Standard
definition helpers.def
see also FieldTracer
keywords inspector, monitor, log, trace, debug

Purpose

The module FieldListener displays information about a field and log field changes.

Usage

To listen to or just inspect a source field, select the Active Input Field and, depending on that, create a connection from the source field to this module’s [connect here], inImage, or inObject, respectively.

The FieldListener displays the source field name, type and value and the type and instance name of the owner module. If enableConsoleLog is enabled, all changes to the source field are logged to the console.

Details

Parameter fields can be connected to the [connect here] by drag and drop or using the Connections Inspector. In addition, it is possible to listen to image fields (connected to inImage) or base fields (via inObject).

Inventor fields cannot be listened to because they do not work with notifications.

Windows

Default Panel

../../../Modules/Macros/Helpers/mhelp/Images/Screenshots/FieldListener._default.png

Input Fields

inImage (hidden)

name: inImage, type: Image

Connect and set Active Input Field to ‘MLImage’ to listen to output image field. Only visible if Active Input Field is ‘MLImage’.

inObject (hidden)

name: inObject, type: MLBase

Connect and set Active Input Field to ‘MLBase’ to listen to an output base field. Only visible if Active Input Field is ‘MLBase’.

Parameter Fields

Visible Fields

Active Input Field

name: mode, type: Enum, default: Parameter

Defines the current operation mode. Choose between Image (inImage), Object (inObject field), and Parameter ([connect here] field).

Values:

Title Name Description
Parameter Parameter Investigate source field of [connect here] connection
MLImage MLImage Listen to ML image field changes at inImage.
MLBase MLBase Listen to ML image field changes at inObject.

[connect here]

name: inParameter, type: String, deprecated name: listenField

The parameter field which shall be observed and listened to must be connected here (e.g. via drag&drop).

Update automatically

name: shouldAutoUpdate, type: Bool, default: TRUE

If enabled, all source field changes result in immediate output updates. If disabled, source field changes result in clearing the output fields.

Update

name: update, type: Trigger

Updates connection info.

Clear

name: clear, type: Trigger

Clears connection info.

[connect from here]

name: updateDone, type: Trigger, persistent: no

Output trigger notified after each update (i.e. initial connect or source field touch).

Hidden Fields

enableConsoleLog

name: enableConsoleLog, type: Bool, default: FALSE, deprecated name: consoleLog

If checked, log messages about changes of the source field are printed to the console.

sourceFieldFullName

name: sourceFieldFullName, type: String, persistent: no, deprecated name: sourceName

Full source field name (module instance name + field name)

sourceFieldModuleType

name: sourceFieldModuleType, type: String, persistent: no, deprecated name: module

Type of the connection’s source module.

sourceFieldModuleName

name: sourceFieldModuleName, type: String, persistent: no, deprecated name: instance

Instance name of the connection’s source module.

sourceFieldName

name: sourceFieldName, type: String, persistent: no, deprecated name: name

Name of the connection’s source field.

sourceFieldValue

name: sourceFieldValue, type: String, persistent: no, deprecated name: value

Field value: * For parameter fields: The parameter value as a string * For (base) object fields: If valid, the base object’s type (e.g. XMarkerList), ‘NULL’ otherwise * For image fields: If valid, ‘Valid’, otherwise ‘Invalid’

sourceFieldType

name: sourceFieldType, type: String, persistent: no, deprecated name: type

Field Type: For Image, for (base) objects: MLBase, for parameters: parameter type

sourceFieldAllowedMLBaseTypes

name: sourceFieldAllowedMLBaseTypes, type: String, persistent: no

Allowed Types (MLBase only)