Purpose

This module calculates the distance between two marker lists.

This module has a computation complexity of O(n*n). Take this in consideration if the number of XMarkers exceeds a few thousand, because otherwise the computing time easily becomes relevant. You may want to consider alternatives such as PCLCloudDistances, itkHausdorffDistanceImageFilter, MaskSurfaceDistance or other itk*Distance*ImageFilters.

Usage

Connect two marker lists (inMarkerList0, inMarkerList1), press Update and read the distances from the various output fields.

Details

Distances are computed between all markers using the Manhattan distance (1-norm), Euclidean distance (2-norm) and the Chebyshev distance.

The output fields (outManhattanDistanceField, outManhattanDistanceMinField etc.) provide the condensed distances. The curves at outDistanceCurves provide the individual distances between markers.

Tips

To calculate distances for XMarkerLists with different sizes, check both inAllowDifferentListSizes and inSelectClosestMarker.

Windows

Default Panel

../../../Projects/MLMarkerInfrastructure/XMarkerListDistance/Modules/mhelp/Images/Screenshots/XMarkerListDistance._default.png

Input Fields

inMarkerList0

name: inMarkerList0, type: MLBase, deprecated name: inputMarkerList0

An XMarkerList.

inMarkerList1

name: inMarkerList1, type: MLBase, deprecated name: inputMarkerList1

An XMarkerList.

Output Fields

outDistanceCurves

name: outDistanceCurves, type: MLBase

A CurveList with three curves (for Manhattan, Euclidean and Chebyshev distance measure) containing the marker-wise distances. The points are aligned with the left input marker list.

Parameter Fields

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: shouldAutoUpdate,shouldUpdateAutomatically

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

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.

Has Valid Output

name: hasValidOutput, type: Bool, persistent: no

Indicates validity of output field values (success of computation).

[]

name: updateDone, type: Trigger, persistent: no

Notifies that an update was performed (Check status interface fields to identify success or failure).

Hidden Fields

doNotClearOnFailedUpdate

name: doNotClearOnFailedUpdate, type: Bool, persistent: no

Prevents automated clear after update failed. This does not affect status fields. It enables the developer to analyze module’s state after failure.

outEuclideanDistanceField

name: outEuclideanDistanceField, type: Double, persistent: no, deprecated name: euclideanDistanceField

Average Euclidean distance.

outChebyshevDistanceField

name: outChebyshevDistanceField, type: Double, persistent: no, deprecated name: chebyshevDistanceField

Average Chebyshev distance.

outManhattanDistanceField

name: outManhattanDistanceField, type: Double, persistent: no, deprecated name: manhattanDistanceField

Average Manhattan distance.

outEuclideanDistanceMinField

name: outEuclideanDistanceMinField, type: Double, persistent: no, deprecated name: euclideanDistanceMinField

Minimum Euclidean distance.

outChebyshevDistanceMinField

name: outChebyshevDistanceMinField, type: Double, persistent: no, deprecated name: chebyshevDistanceMinField

Minimum Chebyshev distance.

outManhattanDistanceMinField

name: outManhattanDistanceMinField, type: Double, persistent: no, deprecated name: manhattanDistanceMinField

Minimum Manhattan distance.

outEuclideanDistanceMaxField

name: outEuclideanDistanceMaxField, type: Double, persistent: no, deprecated name: euclideanDistanceMaxField

Maximum Euclidean distance.

outChebyshevDistanceMaxField

name: outChebyshevDistanceMaxField, type: Double, persistent: no, deprecated name: chebyshevDistanceMaxField

Maximum Chebyshev distance.

outManhattanDistanceMaxField

name: outManhattanDistanceMaxField, type: Double, persistent: no, deprecated name: manhattanDistanceMaxField

Maximum Manhattan distance.

outEuclideanDistanceVariance

name: outEuclideanDistanceVariance, type: Double, persistent: no, deprecated name: euclideanDistanceVariance

Variance of Euclidean distance.

outChebyshevDistanceVariance

name: outChebyshevDistanceVariance, type: Double, persistent: no, deprecated name: chebyshevDistanceVariance

Variance of Chebyshev distance.

outManhattanDistanceVariance

name: outManhattanDistanceVariance, type: Double, persistent: no, deprecated name: manhattanDistanceVariance

Variance of Manhattan distance.

inSelectClosestMarker

name: inSelectClosestMarker, type: Bool, default: FALSE, deprecated name: selectClosestMarker,selectClosestVoxel

If checked, the second list will be resorted so that each position contains the marker closest to the marker at the corresponding position in the first list. If the second list is larger than the first list, it will be shortened by this. If it is smaller, some markers will be duplicated. Distances will then be calculated for corresponding indices.

If unchecked, distances will be calculated for corresponding indices in the original marker lists.

inAllowDifferentListSizes

name: inAllowDifferentListSizes, type: Bool, default: FALSE, deprecated name: allowDifferentListSizes,AllowDifferentListsSize

If checked, the module will allow marker lists with different sizes. In this case, inSelectClosestMarker has to be checked as well.

If unchecked, the module will reject marker lists with different sizes.