Module: Distance Map On Disk Data ()
The Distance Map On Disk Data module performs a distance-map calculation on a 3D segmented Large Disk Data image. It creates a new Large Disk Data object where the value of each point of the foreground represents its shortest distance to the background or each background point represents the shortest distance to the foreground, depending on the option selected in the Map location port.
The chamfer map is first computed with integer values, which causes the real values of distances to be scaled by a coefficient (see ChamferMapScaleFactor below). If you want the units of your chamfer map to be the same as the units of the voxel, check the Float exact map box.
For isotropic images, you can choose the dimension and the size of the chamfer mask (its coefficients are pre-calculated). For anisotropic images, however, it first computes the chamfer mask coefficients that are most appropriate for the voxel size of your image. For this reason, using a mask wider than 3x3x3 for anisotropic images is strongly discouraged.
If the original image is not segmented, it will consider positive points as foreground and negative points as background.
Press the Apply button to start the computation.
Data [required]
Large Disk Data (should be segmented).
Filename
The result chamfer map will be saved as a Large Disk Data, but with additional parameters in the parameter database:
- ChamferMapScaleFactor: this factor is used to scale the chamfer map so that it uses the same units as the voxels. By default, Chamfer distance is computed with integer values. In order to have the real distances (in voxel length units), the integer values of the Chamfer map must be divided by the ChamferMapScaleFactor.
- ChamferMapMaxRelError: gives the max relative error relative to the exact Euclidean distance.
- ChamferMapIsExact: is set to 1 if ChamferMapScaleFactor = 1; is set to 0 otherwise.
Mask dimension
Choose 2D if you want the chamfer map to be computed slice by slice without considering the previous and following slices. This option is not available for anisotropic images.Mask size
The mask size for isotropic images. The wider the chamfer mask, the more precise the chamfer map, but the longer it takes to compute. This option is not available for anisotropic images.Map location
This option menu lets you select different map locations:
- foreground: Compute the minimum distance of each point of the foreground relative to the background
- background: Compute the minimum distance of each point of the background relative to the foreground
- both foreground and background: Compute the minimum distance of each point of the foreground relative to the background, with positive values; and the minimum distance of each point of the background relative to the foreground, with negative values.
Sign of result image
Determines the sign of the points of the foreground if you have chosen foreground in the Map location port, or the sign of the points of the background if you have chosen background.Float exact map
Computes a distance map in the same units as the voxel size units.