Purpose

Applies up to three different processors, one for each orthogonal orientation (sagittal, coronal, transversal).

Usage

Connect image and processors and update.

Details

See ApplyTileProcessorPageWise for details on tile size computation, border filling, and ROI application.

Processor Hot Switching

In certain situations, e.g. when switching between different models for sagittal, coronal, etc. via a single remote server connection (cf. TensorFlowServingTileProcessor), it may be necessary to set a new processor for each orientation during processing. This is supported by ignoring input processor field updates when updating the field Currently Active Processor for the next orientation to process. The user can attach a listener to the field and provide a new processor depending on its value. An example for this use case is provided in the Test Suite (search for “hot switching”).

Tips

  • If you want to see the tile sizes and other parameters used for processing, check outParameterInfo or outCombinedParameterInfo.
  • If you have only a single processor that can somehow handle all three orientations (but of course needs to know which one it is dealing with), you can let him know via the Currently Active Processor field, which is set before using a different processor.

Windows

Default Panel

../../../Projects/TileProcessing/ApplyTileProcessor/ApplyTileProcessorsPageWiseOrtho/Modules/mhelp/Images/Screenshots/ApplyTileProcessorsPageWiseOrtho._default.png

Input Fields

inImage

name: inImage, type: Image, deprecated name: input0

Input image to be classified

inTileProcessorSagittal

name: inTileProcessorSagittal, type: MLBase, deprecated name: inTileClassifierSagittal

Processor used for sagittal 2d processing

inTileProcessorCoronal

name: inTileProcessorCoronal, type: MLBase, deprecated name: inTileClassifierCoronal

Processor used for coronal 2d processing

inTileProcessorTransversal

name: inTileProcessorTransversal, type: MLBase, deprecated name: inTileClassifierTransversal

Processor used for transversal 2d processing

inSharedTileProcessorConnection

name: inSharedTileProcessorConnection, type: MLBase, deprecated name: inSharedTileClassifierConnection

If Use a Single, Shared Processor Input Connection is enabled, you must use this field to connect your processors to.

Output Fields

outSagittal

name: outSagittal, type: Image

sagittal prediction

outCoronal

name: outCoronal, type: Image

coronal prediction

outTransversal

name: outTransversal, type: Image

transversal prediction

outParameterInfo

name: outParameterInfo, type: MLBase

Parameter information with one separate entry per orientation, comprising information about processor application (top level) and the processor itself (below the ‘processor’ key).

outCombinedParameterInfo

name: outCombinedParameterInfo, type: MLBase

Parameter information combined across orientations, comprising information about processor application (top level) and the processor itself (below the ‘processor’ key).

The combination works as follows: In the toplevel key COMBINED_INFO_IDS you can see the enabled orientations in the order used also in the following. For all other keys:

  • different values are given as a list in orientation order
  • identical values are combined into a single one
  • string values differing only in the orientation substring are given as a single value with [view_direction] inserted instead of the orientation substring

Parameter Fields

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.

Use a Single, Shared Processor Input Connection

name: inUseSingleProcessorConnection, type: Bool, default: FALSE, deprecated name: inUseSingleClassifierConnection

If you want to hot-switch processors depending on orientation, you probably only need a single, shared connection.

Enable this flag if this is the case, connect to inSharedTileProcessorConnection. To trigger the switching of your processors, you have to listen to either Currently Active Processor or Index which are updated during processing, and switch your processor synchronously.

Force Parameter Info Update

name: inUpdateModelParameterInfoFromSingleProcessorConnection, type: Trigger, deprecated name: inUpdateModelParameterInfoFromSingleClassifierConnection

When using a single, shared processor connection (cf. Use a Single, Shared Processor Input Connection), you may still want to update the (combined) processor parameter infos before actually running the processing, which is what this trigger is for.

Transversal

name: inEnableTransversal, type: Bool, default: TRUE

If enabled, transversal processing is performed (a corresponding processor must be connected)

Sagittal

name: inEnableSagittal, type: Bool, default: TRUE

If enabled, sagittal processing is performed (a corresponding processor must be connected)

Coronal

name: inEnableCoronal, type: Bool, default: TRUE

If enabled, coronal processing is performed (a corresponding processor must be connected)

Restrict processing to ROI (as opposed to running on the whole image)

name: inUseProcessingRoi, type: Bool, default: FALSE, deprecated name: inUseClassificationRoi

If enabled, processing (and hence all output images) are restricted to Processing ROI Voxel Box.

Processing ROI Voxel Box

name: inProcessingRoi_voxel, type: String, default: 0 0 0 0 0 0 -1 -1 -1 -1 -1 -1, deprecated name: inClassificationRoi\_voxel

If Restrict processing to ROI (as opposed to running on the whole image) is enabled, this box is used to clamp the output to prevent unnecessary computation efforts. The box is to be given in integer voxel coordinates relative to the input image.

Use (inUseCustomOutputTileSizeTransversal)

name: inUseCustomOutputTileSizeTransversal, type: Bool, default: FALSE

If enabled, Custom Output Tile Size is used instead of the proposition from the connected processor.

Use (inUseCustomOutputTileSizeSagittal)

name: inUseCustomOutputTileSizeSagittal, type: Bool, default: FALSE

If enabled, Custom Output Tile Size is used instead of the proposition from the connected processor.

Use (inUseCustomOutputTileSizeCoronal)

name: inUseCustomOutputTileSizeCoronal, type: Bool, default: FALSE

If enabled, Custom Output Tile Size is used instead of the proposition from the connected processor.

Custom Output Tile Size (inCustomOutputTileSizeTransversal)

name: inCustomOutputTileSizeTransversal, type: IntVector6, default: 128 128 1 1 1 1, deprecated name: inPatchSizeTransversal

If Use is enabled, this overrides the processor’s proposal for the tile size (without padding!) used for processing. See Details section for details.

Custom Output Tile Size (inCustomOutputTileSizeSagittal)

name: inCustomOutputTileSizeSagittal, type: IntVector6, default: 128 128 1 1 1 1, deprecated name: inPatchSizeSagittal

If Use is enabled, this overrides the processor’s proposal for the tile size (without padding!) used for processing. See Details section for details.

Custom Output Tile Size (inCustomOutputTileSizeCoronal)

name: inCustomOutputTileSizeCoronal, type: IntVector6, default: 128 128 1 1 1 1, deprecated name: inPatchSizeCoronal

If Use is enabled, this overrides the processor’s proposal for the tile size (without padding!) used for processing. See Details section for details.

Use (inUseCustomPadding)

name: inUseCustomPadding, type: Bool, default: FALSE

If enabled, Padding is used instead of the proposition from the connected processor.

Padding

name: inCustomPadding, type: IntVector6, default: 0 0 0 0 0 0, deprecated name: inPadding

If Use is enabled, this overrides the processor’s proposal for the (symmetric) padding applied to the tile size. Unit is ‘number of voxels’. See Details section for details.

Use (inUseCustomFillMode)

name: inUseCustomFillMode, type: Bool, default: FALSE

If enabled, Fill Mode is used instead of the proposition from the connected processor.

Fill Mode

name: inCustomFillMode, type: Enum, default: FillValue, deprecated name: inFillMode

If Use is enabled, this overrides the processor’s proposal for the fill mode, which defines how undefined input regions are to be filled.

Values:

Title Name Description
Fill Value FillValue Fill with a fixed value
Reflect Reflect Reflect valid region (but only within padding range). See ApplyTileProcessorPageWise ‘Details’ section for details.

Use (inUseCustomFillValue)

name: inUseCustomFillValue, type: Bool, default: FALSE

If enabled, Fill Value is used instead of the proposition from the connected processor.

Fill Value

name: inCustomFillValue, type: Double, default: 0, deprecated name: inFillValue

If Use is enabled, this overrides the processor’s proposal for the value to be used for filling if the used fill mode is ‘FillValue’.

Primary Channel Dimension

name: inExternalDimensionForChannel1, type: Enum, default: C

Defines which (external, i.e. in input and output image) dimension shall be used by the processor as primary CHANNEL dimension (if it needs one).

Values:

Title Name
X X
Y Y
Z Z
C C
T T
U U

Secondary Channel Dimension

name: inExternalDimensionForChannel2, type: Enum, default: U

Defines which (external, i.e. in input and output image) dimension shall be used by the processor as secondary CHANNEL dimension (if it needs one).

Values:

Title Name
X X
Y Y
Z Z
C C
T T
U U

Use (inUseCustomExternalToProcessorDimensionMapping)

name: inUseCustomExternalToProcessorDimensionMapping, type: Bool, default: FALSE, deprecated name: inUseCustomExternalToClassifierDimensionMapping

If enabled, Expected Dimensions (in ML Order, largest stride last) is used instead of the one provided by the processors. Should usually not be necessary, try to reconfigure your processors instead!

Expected Dimensions (in ML Order, largest stride last)

name: inCustomExternalToProcessorDimensionMapping, type: String, default: X, Y, CHANNEL, BATCH, deprecated name: inCustomExternalToClassifierDimensionMapping

Comma-separated list describing the order in which the input data dimensions are expected by the processor, in ML order, i.e. smallest stride (X) first. On top of the data (typically spatial) dimensions provided to the processor, you can specify where the input channel and batch dimensions are located. Valid elemental values are X, Y, Z, C, T, U, as well as CHANNEL (or CHANNEL1), CHANNEL2, BATCH and UNUSED. UNUSED can be used for all dimensions not required by the processor (but it can also be omitted).

Typical examples are

X, Y, CHANNEL, BATCH

for 2D processors with a channel and batch dimension, or

X, Y, Z, CHANNEL, BATCH

for 3D processors with a channel and batch dimension.

** Normally, you should not have to edit this here, as the processor should already propose the configuration it needs, so that Use can be left disabled. **

Input Image Size (outSagittalInputImageExtent)

name: outSagittalInputImageExtent, type: Vector6, persistent: no

Input Image Size (outCoronalInputImageExtent)

name: outCoronalInputImageExtent, type: Vector6, persistent: no

Input Image Size (outTransversalInputImageExtent)

name: outTransversalInputImageExtent, type: Vector6, persistent: no

Currently Active Processor

name: outCurrentlyActiveProcessor, type: Enum, persistent: no, deprecated name: outCurrentlyActiveClassifier

Indicates which processor is currently used. Set before using the processor, so that it is possible for a user to react to this.

Values:

Title Name
None None
Sagittal Sagittal
Coronal Coronal
Transversal Transversal

Index

name: outCurrentlyActiveProcessorIndex, type: Integer, persistent: no, deprecated name: outCurrentlyActiveClassifierIndex

Index of currently active processor (in the list of enabled processors). Set before using the processor, so that it is possible for a user to react to this.

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.

inEnableOutputTileSizeSnapping

name: inEnableOutputTileSizeSnapping, type: Bool, default: TRUE

If enabled (default) the module snaps the output tile sizes to valid values greater or equal to the proposed ones, if this is supported by the processor. Disabling the flag is only for those rare cases in which the processor errs on what he supports. Of course, it is better to fix the processor than to disable this flag.

progress

name: progress, type: Float, persistent: no