Histogram

MLModule
genre Histogram
status stable
authors Florian Link, Horst Hahn, Tobias Boskamp, Jan-Martin Kuhnigk
package MeVisLab/Standard
dll MLVolumetry
definition MLVolumetry.def
see also Diagram2D
keywords Histogram, Curve, Statistics, Mask

Purpose

The module Histogram computes the histogram of image values found in the input image.

A second image can optionally be used as a mask image.

Usage

The histogram of a input image is generated which can be displayed by the Diagram2D module.

Details

If the mask image is used, each input image value is weighted with the corresponding mask image value, after transforming mask image values such that the mask image's data range is mapped to the interval [0, 1].

Consequently, voxels where the mask image value equals the mask image's minimum data value are ignored.

Windows

Default Panel

../../../Modules/ML/MLVolumetry/mhelp/Images/Screenshots/Histogram._default.png

Input Fields

input0

name: input0, type: Image

Input Image

input1

name: input1, type: Image

Mask Image

Output Fields

outputHistogram

name: outputHistogram, type: MLBase

A Histogram object, used in HistogramVolumetrySimple.

outputHistogramCurve

name: outputHistogramCurve, type: MLBase

CurveData object, used in Diagram2D.

Parameter Fields

Field Index

Background Value: Float Status: String X-Range: Enum
Bin Size: Float Update: Trigger  
Clear: Trigger Update Mode: Enum  
containing: Enum upToDate: Bool  
Curve Style: Integer Use Background Value: Bool  
Curve Title: String Use Bin Size One Representation: Bool  
Curve Type: Enum Use mask: Bool  
progress: Float Use Step Function: Bool  

Visible Fields

Use mask

name: useMask, type: Bool, default: TRUE

If checked, the optional second input image is used as a mask.

Otherwise, or if the second input image is unconnected, the histogram is computed for the whole image.

X-Range

name: xRange, type: Enum, default: Static Min/Max

Defines the X-range or image value range of the histogram.

Values:

Title Name Description
Static Min/Max Static Min/Max The static min/max values stored in the image are used.
Dynamic Min/Max Dynamic Min/Max The image is scanned for actual min/max values which are used for computation.

containing

name: maskMode, type: Enum, default: Weights

Defines the mode for the used mask values.

Values:

Title Name Description
Weights Weights The mask is interpreted as described in the Details section.
Labels Labels

The mask image contains several distinct integer values, each one identifying an object for which a separate histogram is computed.

Each non-empty histogram is appended to a Histogram List which is put out at output0. The id of the new list item will be set to the corresponding grey value in the mask. To retrieve a specific histogram from the list, the module DecomposeBaseList can be used. The same goes for the Curve List.

Another alternative for extracting an object from the list is the module ExtractObjectFromList. For its usage it is suggested that you connect its Index field from the DecomposeBaseList - Global List Index field if you want to access the curve with a specific ID (i.e. grey value in mask).

Curve Type

name: curveType, type: Enum, default: Line

Defines the type of the output curve.

Values:

Title Name
Line Line
Area Area

Curve Style

name: curveStyle, type: Integer, default: 0

Sets the style of the output curve.

Curve Title

name: curveTitle, type: String

Sets a title string for the output curve.

Update Mode

name: updateMode, type: Enum, default: Off, deprecated name: autoApply

Defines the update mode of this module.

Values:

Title Name Deprecated Name Description
Off Off FALSE Nothing happens on any field or input change.
Auto-Clear AutoClear   The output curve and histogram are cleared on any field or input change.
Auto-Update AutoUpdate   The output curve and histogram is updated on any field or input change.

Update

name: update, type: Trigger, deprecated name: getHistogram

If pressed, the module computes anew.

Clear

name: clear, type: Trigger, deprecated name: clearAll

If pressed, the output curve and histogram are cleared.

Status

name: status, type: String, persistent: no

Shows status information about the module.

Use Step Function

name: useStepFunction, type: Bool, default: FALSE

If checked, a curve of columns is created rather than of simple polygons.

This is a more plausible representation of the histogram. Nonetheless, for computational and export purposes, the old polygon representation should be used.

Use Bin Size One Representation

name: useBinSizeOneRepresentation, type: Bool, default: TRUE

If checked, the histogram will be treated by the old histogram methods which were only applicable for a bin size of one.

For different bin sizes, it is recommended to uncheck this option because otherwise, the results of histogram paramters will be invalid.

Use Background Value

name: useBackgroundValue, type: Bool, default: FALSE

If checked, each value that equals the background value will be ignored for the histogram computation.

Background Value

name: backgroundValue, type: Float, default: 0

Sets the data value to be ignored in the input image.

Bin Size

name: binSize, type: Float, default: 1

Sets the size of used bins.

Hidden Fields

upToDate

name: upToDate, type: Bool, persistent: no

progress

name: progress, type: Float, persistent: no