Migration Distance

Calculate migration distance for ROIs in a DICOM-RT structure set
9 Downloads
Updated 14 Dec 2023

View License

This function calculates the migration distance between ROIs in a DICOM-RT structure set.
The migration distance is a measure of the "distance" from a three-dimensional region-of-interest (ROI) X to three-dimensional ROI Y motivated by radiotherapy margin concepts. Informally, the migration distance from ROI X to Y is the minimum isotropic expansion of X such that Y is completely encompassed by the expansion. If Y is contained within X, the migration distance is negative with magnitude equal to the maximum isotropic contraction of X such that Y remains contained within contraction.
The figure below illustrates the migration distance (d_m) from the dark to light ROIs. In general, the migration distance is the smallest isotropic expansion of the dark ROI that encompasses the light ROI. Left: when a portion (or all) of the light ROI is outside the dark ROI, the migration distance is positive. Middle: when the light ROI is entirely within the dark ROI, the migration distance is negative reflecting a negative isotropic expansion (i.e. a contraction) of the dark ROI. Right: In the intermediate case, when the light ROI is within the dark ROI with an overlapping border segment, the migration distance is 0.
The migration distance is related to the Hausdorff distance. Specifically, the Hausdorff distance between ROIs X and Y is the maximum of:
  1. The migration distance from X to Y and
  2. The migration distance from Y to X.
The Hausdorff distance is commutative (operand order does not matter) while the migration distance is not commutative. In other words, while the Hausdorff distance measures the distance between ROIs, the migration distance measures the distance from one ROI to another. The migration distance may thus be more informative to distinguish between growing and regressing radiotherapy targets, for example.
This function requires MATLAB 2020a or above with the image processing toolbox.
Further details on the migration distance can be found in our manuscript available at https://doi.org/10.1002/mp.16872

Cite As

Stewart J, Sahgal A, Hudson J, et al. Technical note: The migration distance – a unidirectional distance metric for region-of -interest comparisons. Med. Phys. 2023;1-7. https://doi.org/10.1002/mp.16872

MATLAB Release Compatibility
Created with R2021b
Compatible with R2020a and later releases
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.12

Typo correction

1.11

Update description to include paper reference. No code changes.

1.1

Incorporate negative migration distances.

1.0.1

Updated description. No code changes.

1.0.0