ImageIteratorEnd

MLModule
genre FlowControl
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLImageIterator
definition MLImageIterator.def
see also ImageIteratorStart
keywords iteration, induction, loop, cycle, start

Purpose

The modules ImageIteratorStart and ImageIteratorEnd permit the iteration of an image on network level.

Both modules need to be used as a pair for proper operation as explained below. Between those two modules, a module network can be used to filter an image a specified number of times.

Usage

Create the ImageIteratorStart and the ImageIteratorEnd and connect output 0 of ImageIteratorStart to input 0 of ImageIteratorEnd so that both modules can transfer iterated images between them.

To input 1 of ImageIteratorStart connect the image to be iterated and at output one connect the network which shall filter the image during iterations. The output of that network is connected to the second input of ImageIteratorEnd.

Then set the number of iterations in field Num Iterations, the maximum limit of iterations to be done and activate the iterations e.g. by using Iterate Once or Do Num Iterations. At the output of ImageIteratorEnd the result of the iteration process is available.

Details

  1. Intermediate filtering and/or iteration results are buffered in a memory or file buffer inside the ImageIteratorEnd module dependent on the selected Buffering Mode.

Intermediate results are transported internally between both modules via the connection between output 0 and input 0. Iterations will not work without that connection.

  1. The buffering mode File even allows for iterating images larger than the physical or even the virtual memory size of the system if page extents have been set adequately such that all intermediate page results can be stored in memory. The maximum size for iterated images is given by the file system which must be able to store twice the image.
  2. During operation notifications and presses on buttons are usually suppressed and not detected by most modules. The Stop Iteration button, however, also detects them. This behavior is useful to make the number of iterations dependent on other modules or scripts which send a notification as an “end” signal via a field connection to this button.

Advanced technical note:

Be aware that changes on fields/buttons from inside any Module::calculate* method will still not be detected, because notifications from those fields are generally not sent during image processing.

Windows

Default Panel

../../../Modules/ML/MLImageIterator/mhelp/Images/Screenshots/ImageIteratorEnd._default.png

Input Fields

input0

name: input0, type: Image

input1

name: input1, type: Image

Output Fields

output0

name: output0, type: Image

Parameter Fields

Field Index

Auto iterate: Bool Reset To Start: Trigger
Buffer Mode: Enum Stop Iteration: Trigger
Do Num Iterations: Trigger Tmp File Prefix: String
Done Iterations: Integer  
Info: String  
Iterate Once: Trigger  
Max Iteration Num: Integer  
Num Iterations: Integer  

Visible Fields

Iterate Once

name: iterateOnce, type: Trigger

If pressed, one iteration step is being performed.

Do Num Iterations

name: doNumIterations, type: Trigger

If pressed, the module iterates as often as specified in Num Iterations.

Stop Iteration

name: stopIterations, type: Trigger

If pressed, the current iteration is being stopped.

Reset To Start

name: resetIterations, type: Trigger

If pressed, the current iteration number is reset to 0.

Buffer Mode

name: bufferingMode, type: Enum, default: InMemory

Defines where to store the temporary image.

Values:

Title Name Description
Memory InMemory Stores the intermediate result in memory.
File InFile Stores the intermediate result in a file.

Num Iterations

name: numIterations, type: Integer, default: 1

Sets the number of iterations that are to be performed.

Max Iteration Num

name: maxIterations, type: Integer, default: 10

Sets a maximum iteration step which is not exceeded.

Done Iterations

name: iterationCount, type: Integer, default: 0

Shows the iterations that are already done.

Auto iterate

name: autoIterate, type: Bool, default: FALSE

If checked, the module automatically iterates to max if the input0 is touched.

Info

name: textInfo, type: String

Shows information about the iteration process or the result.

Tmp File Prefix

name: tmpFileNamePrefix, type: String

Sets a prefix for the temporary file name while using file buffering.