CSOImageStatisticsOverTime

MacroModule
author Christian Kanthak
package FMEstable/ReleaseMeVis
definition CSOImageStatisticsOverTime.def
keywords cso, image, statistics, time

Purpose

The module calculates image statistics from voxels covered by the input CSOs for each and all time points of the input image. The overall statistics are provided as parameter fields. The time point specific statistics are provided as a Python list at module’s Base output field.

Usage

Connect an input image and a CSOList containing at least one CSO. Trigger an update afterwards.

Details

Internally a mask image is used to calculate the image statistics. A voxel is added to the mask according to module’s input parameter settings. The statistics are calculated afterwards considering voxels of the input image covered by the mask.

Tips

Note that the module does not react to CSOEvents. This can be achieved using the CSOManager which typically is always involved into networks using CSOs. Set CSOManager’s boolean fields “enableFinishedNotification” and “useFinishedCSONotification” to “TRUE” and connect CSOManager’s trigger field “notifyOnFinishedCSO” to “CSOImageStatisticsOverTime.update”. Have a look at module’s example network which makes use of this strategy.

Input Fields

inImage

name: inImage, type: Image

A missing input image is an error.

inCSOList

name: inCSOList, type: MLBase

A missing or empty input CSOList is an error. A CSO which time point is not contained in input image is an error. A CSO not covering any image voxel is an error.

Output Fields

outTimePointStatistics

name: outTimePointStatistics, type: MLBase

A Python list containing for each time point a dict object providing the CSOs based image statistics calculated for the specific time point. In difference to the overall statistics the time point specific statistics also contain the number of covered voxels and the volume (mm^3).

Parameter Fields

Field Index

[]: Trigger On Input Change Behavior: Enum
Border Voxel Inclusion: Enum Status Code: Enum
Clear: Trigger Status Message: String
Covered Volume Threshold: Double Std. Deviation: Double
Has Valid Output: Bool Update: Trigger
Maximum: Double Variance: Double
Mean: Double  
Minimum: 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: shouldUpdateAutomatically,shouldAutoUpdate

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.

Border Voxel Inclusion

name: inBorderVoxelInclusion, type: Enum, default: Include

Declares how partially covered voxels (border voxels) are handled in order to decide about their inclusion into statistics.

Values:

Title Name Description
Include Include Every partly covered voxel is included.
Covered Center CoveredCenter A partly covered voxel is included if its center is covered by a contour.
Covered Volume CoveredVolume A partly covered voxel is included if the covered volume by a contour fulfills the threshold: Covered Volume Threshold.
Exclude Exclude All partly covered voxels are excluded. Only fully covered voxels are taken into account.

Covered Volume Threshold

name: inCoveredVolumeThreshold, type: Double, default: 0.5, minimum: 0, maximum: 1

Declares the minimal required volume coverage of a border voxel by a contour in order to include it into statistics.

Minimum

name: outMinimum, type: Double, persistent: no

Minimum value of covered voxels over all time points

Maximum

name: outMaximum, type: Double, persistent: no

Maximum value of covered voxels over all time points

Mean

name: outMean, type: Double, persistent: no

Mean value of covered voxels over all time points

Variance

name: outVariance, type: Double, persistent: no

Variance of values of covered voxels over all time points

Std. Deviation

name: outStdDeviation, type: Double, persistent: no

Standard deviation of values of covered voxels over all time points