EuclideanDTF

MLModule
genre Distance
status stable
authors Markus Krebs, Milo Hindennach
package MeVisLab/Standard
dll MLDTF
definition MLDTF.def
see also DistanceTransform
keywords distance, dtf, voronoi, distancetransform, transform, norm

Purpose

The module EuclideanDTF calculates the Euclidean Distance image in 1D, 2D or 3D.

It is also possible to calculate a Voronoi Division.

See Details for explanations of Euclidean Distance and Voronoi Division.

Details

The uclidean Distance is the distance between two points calculated with the Pythagorean formula.

The module EuclideanDTF calculates the distance of the considered voxel to the nearest voxel in the defined Foreground volume.

Possible maximum distance is maximum image extent.

The Voronoi Division is a special kind of decomposition of a space determined by distances to a specified discrete set of objects in the space, called Voronoi sites.

With the EuclideanDTF module, the Voronoi sites are defined by the Foreground volume. These site voxels keep their original value.

All other voxels get the value of their nearest site, decomposing the image to Voronoi regions.

The Voronoi Division works here like a nearest-neighbor interpolation with neighbors determined by the Foreground.

Windows

Default Panel

../../../Modules/ML/MLDTF/mhelp/Images/Screenshots/EuclideanDTF._default.png

Input Fields

input0

name: input0, type: Image

Only standard data types are fully supported. All other data types can cause unexpected results.

Output Fields

output0

name: output0, type: Image

This output contains the Euclidean Distance image.

output1

name: output1, type: Image

This output contains the Voronoi Division image.

Parameter Fields

Field Index

Apply Time: Enum Output Mode: Enum
Auto Update Mode: Enum Precision: Enum
Auto Update Time: Enum Scale: Float
cacheSizeKB: Integer Selected Algorithm: Enum
Clear: Trigger Update: Trigger
Dimension: Enum VirtualVolumeTraversals: Trigger
Max Value: Float  
Min Value: Float  

Visible Fields

Output Mode

name: outputMode, type: Enum, default: DistanceOnly

Defines which output image will be calculated.

It is recommendable to select just the needed output to reduce memory consumption.

Values:

Title Name
Distance Only DistanceOnly
Distance And Voronoi Division DistanceAndVoronoiDivision
Voronoi Division Only VoronoiDivisionOnly

Precision

name: dtfPrecision, type: Enum, default: FloatPrecision

Defines the data type of the Euclidean Distance image.

Values:

Title Name Description
Integer Precision IntegerPrecision The distances will be given as rounded integers.
Float Precision FloatPrecision The distances will be given as floating points.

Scale

name: distanceScaling, type: Float, default: 1

Sets a scaling factor, the result of the Euclidean Distance is multiplied with.

Apply Time

name: applyTime, type: Enum, default: OnRequest

Defines the time when Scale and Precision will be applied on the Euclidean Distance.

Values:

Title Name Description
On Request OnRequest Allows value changes without recalculation but is slightly slower.
During Calculation DuringCalculation Changes need a recalculation of the hole distance result.

Dimension

name: dimension, type: Enum, default: 3D

Defines the dimensions considered for calculation of Euclidean Distance and Voronoi Division.

Values:

Title Name
1d 1D
2d 2D
3d 3D

Min Value

name: minValue, type: Float, default: 0

Sets the minimum value of the range defining a Foreground volume.

Max Value

name: maxValue, type: Float, default: 0

Sets the maximum value of the range defining a Foreground volume.

Selected Algorithm

name: selectedAlgorithm, type: Enum, default: AutoSelectFastest

Defines the memory implementation that will be used for calculations.

Values:

Title Name Description
Auto Select Fastest AutoSelectFastest Tries to use the faster implementation but if that fails, for example due to memory issues, it uses the Virtual Volume implementation.
Use Virtual Volume UseVirtualVolume Calculates on virtual volume (slow, but stable for huge images).
Use Single Memory Block UseSingleMemoryBlock Calculates on single memory block (fast, use only for small images).

Auto Update Mode

name: autoUpdateMode, type: Enum, default: Off

Defines the update mode.

Values:

Title Name Description
Off Off No automatical update.
Auto Clear AutoClear Deletes results automatically on parameter and input changes.
Auto Update AutoUpdate Recalculates results automatically on parameter and input changes.

Auto Update Time

name: autoUpdateTime, type: Enum, default: ImmediatelyOnInputChange

Defines the apply time of AutoUpdate.

This field is only used if AutoUpdate is selected as update mode.

Values:

Title Name Description
Immediately On Input Change ImmediatelyOnInputChange Recalculates results immediately on parameter and input changes.
On Output Request OnOutputRequest Recalculates results only if they are requested for further use.

Update

name: update, type: Trigger

If pressed, the module computes anew.

Clear

name: clear, type: Trigger

If pressed, the module deletes the results and release the memory.

Hidden Fields

cacheSizeKB

name: cacheSizeKB, type: Integer, default: -1

Sets the cache size in Kilobytes for virtual volumes to tweak performance (but no experiences yet) and might be used if the Selected Algorithm is Use Virtual Volume. "-1" uses a default value.

VirtualVolumeTraversals

name: VirtualVolumeTraversals, type: Trigger

This trigger has no effect at the moment but was meant for testing purposes.