Purpose

The module Threshold applies a relative or an absolute threshold to a voxel image. It can be defined what should be written to those voxels which pass or which fail the adjustable comparison.

Details

The module may change the min/max value and the data type of the output image.

If any value to be written is of floating point type and the input image is of integer type, the output image will be of floating point type.

If any value to be written exceeds the min/max values of the input image, the output image’s min/max values are adjusted so that all write values are in the min/max range.

If the new min/max range of the output image exceeds the data type’s range, the data type is adjusted to the smallest data type that can hold the new min/max range.

Windows

Default Panel

../../../Modules/ML/MLMiscModules/mhelp/Images/Screenshots/Threshold._default.png

Input Fields

input0

name: input0, type: Image

Output Fields

output0

name: output0, type: Image

Parameter Fields

Visible Fields

Threshold

name: threshold, type: Double, default: 0, deprecated name: Threshold

Sets a threshold value, either as an absolute gray value or a relative value.

Use relative threshold

name: relativeThreshold, type: Bool, default: FALSE, deprecated name: RelativeThreshold

If checked, the threshold is interpreted as a value relative to the min-max-range of the image.

Comparison

name: comparisonOperator, type: Enum, default: Greater

Defines the comparison operator that is applied to test each input voxel value against the Threshold.

Values:

Title Name
< Less
<= LessEqual
== Equal
!= NotEqual
> Greater
>= GreaterEqual

Write (conditionTrueWriteValue)

name: conditionTrueWriteValue, type: Enum, default: UserDef

Defines which value is written to the output image for input voxels that pass the comparison test.

Values:

Title Name Description
Img Min ImgMin The input image’s minimum value is written.
Img Max ImgMax The input image’s maximum value is written.
Img Orig ImgOrig The input image’s original voxel value is written.
Img Max Minus Img Orig ImgMaxMinusImgOrig The input image’s maximum value minus the original value is written.
User Def UserDef The user defined value set in User Value is written.
Threshold Threshold The Threshold’s absolute value is written.

User Value (userConditionTrueValue)

name: userConditionTrueValue, type: Double, default: 1

Sets a user value that is written if so chosen in Write.

Write (conditionFalseWriteValue)

name: conditionFalseWriteValue, type: Enum, default: UserDef

Defines which value is written to the output image for input voxels that fail the comparison test.

Values:

Title Name Description
Img Min ImgMin The input image’s minimum value is written.
Img Max ImgMax The input image’s maximum value is written.
Img Orig ImgOrig The input image’s original voxel value is written.
Img Max Minus Img Orig ImgMaxMinusImgOrig The input image’s maximum value minus the original value is written.
User Def UserDef The user defined value set in User Value is written.
Threshold Threshold The Threshold’s absolute value is written.

User Value (userConditionFalseValue)

name: userConditionFalseValue, type: Double, default: 0

Sets a user value that is written if so chosen in Write.