ImageCompare

MLModule
genre Test
status stable
author Wolf Spindler
package MeVisLab/Standard
dll MLMiscModules
definition MLMiscModules.def
see also Arithmetic2
keywords compare, images, check, equality, comparison

Purpose

The module ImageCompare compares two ML input images.

The comparison can be limited to a certain set of features, e.g. to avoid that different data types or page extents are considered as a real difference.

If the second input image is not connected, the second image is assumed to have identical properties as the first input image with voxel values given by Input 1 Value ; this is useful to compare an entire image against a specific value.

Windows

Default Panel

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

Input Fields

The module has two inputs whose properties and/or contents are to be compared.

Both input voxel types can be of any fully operational scalar or non scalar voxel type.

If input voxel types differ they are implicitly cast to a matching larger/higher precison data type which can hold both input types before they are compared.

input0

name: input0, type: Image

input1

name: input1, type: Image

Parameter Fields

Visible Fields

Compare

name: compare, type: Trigger

If pressed, the comparison of both images is started.

Status

name: status, type: String, default: Input image 0 is invalid or not connected

Shows test results or information about failure.

Test Passed

name: testPassed, type: Bool, persistent: no

Shows whether there were differences found in a comparison.

Epsilon

name: epsilon, type: Double, default: 1e-06

Sets the maximum difference between values in voxel size and the world matrix before they are considered different.

Precision of Seconds

name: tPrecisionEpsilon, type: Integer, default: 3, minimum: 0, maximum: 15

Sets the number of digits after decimal point to be compared on DateTime comparisons.

DataType

name: checkDataType, type: Bool, default: TRUE

If checked, the data type of voxels of both images are being compared.

ImgExt

name: checkImgExt, type: Bool, default: TRUE

If checked, the image extents of both images are being compared.

PageExt

name: checkPageExt, type: Bool, default: TRUE

If checked, the page extents of both images are being compared.

MinVoxVal

name: checkMinVoxVal, type: Bool, default: TRUE

If checked, the minimum voxel values of both images are being compared.

MaxVoxVal

name: checkMaxVoxVal, type: Bool, default: TRUE

If checked, the maximum voxel values of both images are being compared.

UpToDate

name: checkUpToDate, type: Bool, default: TRUE

If checked, the up-to-date flags of both images are being compared.

VoxelSize

name: checkVoxelSize, type: Bool, default: TRUE

If checked, the voxel sizes of both images are being compared.

WorldMatrix

name: checkWorldMatrix, type: Bool, default: TRUE

If checked, the world matrices of both images are being compared.

IsWorldMatrixValid

name: checkIsWorldMatrixValid, type: Bool, default: TRUE

If checked, the validity flags of world matrices of both images are being compared.

CDimInfos

name: checkCDimInfos, type: Bool, default: TRUE

If checked, the cDimInfos of both images are being compared.

TDimInfos

name: checkTDimInfos, type: Bool, default: TRUE

If checked, the tDimInfos of both images are being compared.

UDimInfos

name: checkUDimInfos, type: Bool, default: TRUE

If checked, the uDimInfos of both images are being compared.

ImgPropExts

name: checkImgPropExts, type: Bool, default: TRUE

If checked, the string values of ImagePropertyExtensions are being compared.

VoxelData

name: checkVoxelData, type: Bool, default: TRUE

If checked, the values of image voxels are being compared.

Post error if difference is found

name: postErrorOnDiff, type: Bool, default: TRUE

If checked, an error message is send to the ML error manager if any differences are found on comparisons.

CompareAllVoxels

name: compareAllVoxels, type: Bool, default: FALSE

If checked, all voxels are being compared even if a difference has already been found.

If unchecked, the comparison stops at the first difference.

Input 1 Value

name: inp1Val, type: Double, default: 0

Sets a value used for emulated image input 1 voxel values.

Only used if Compare if second input is not connected is checked and input 1 is unconnected.

Compare if second input is not connected

name: compareIf2ndInputIsOpen, type: Bool, default: FALSE

If checked, the module compares only the voxel values of the first input image against the value set in Input 1 Value.

Update Mode

name: updateMode, type: Enum, default: AutoUpdate

Defines the update mode of this module.

Values:

Title Name Description
Auto Update AutoUpdate Updates on any parameter or input image change.
Auto Clear AutoClear Resets all output fields on any parameter or input change.