Compute 3D distance transform. More...
Go to the source code of this file.
Functions | |
void | vil3d_distance_transform (vil3d_image_view< float > &image, const float distance_link_i=1, const float distance_link_j=1, const float distance_link_k=1) |
Compute 3d distance transform from zeros in original image. | |
void | vil3d_distance_transform_one_way (vil3d_image_view< float > &image, const float distance_link_i=1, const float distance_link_j=1, const float distance_link_k=1) |
Compute 3d distance transform from zeros in original image. | |
void | vil_distance_transform (const vil3d_image_view< bool > &mask, vil3d_image_view< float > &distance_image, float max_dist) |
Compute 3D distance function from true elements in mask. | |
void | vil3d_signed_distance_transform (vil3d_image_view< float > &image, const float distance_link_i=1, const float distance_link_j=1, const float distance_link_k=1) |
Compute signed distance transform in 3d from zeros in original image. | |
float | vil3d_min_equal (float const &a, float const &b, bool &eq) |
void | vil3d_distance_transform_one_way_with_dir (vil3d_image_view< float > &image, vil3d_image_view< vil_rgb< float > > &orient, const float distance_link_i=1, const float distance_link_j=1, const float distance_link_k=1) |
Compute directed 3D distance function from zeros in original image. | |
void | vil3d_distance_transform_with_dir (vil3d_image_view< float > &image, vil3d_image_view< vil_rgb< float > > &orient, const float distance_link_i, const float distance_link_j, const float distance_link_k) |
Compute distance transform in 3d from zeros in original image. | |
void | vil3d_signed_distance_transform (const vil3d_image_view< bool > &mask, vil3d_image_view< float > &image, float max_dist, const float distance_link_i=1, const float distance_link_j=1, const float distance_link_k=1) |
Compute 3d signed distance transform from true elements in mask. |
Compute 3D distance transform.
Definition in file vil3d_distance_transform.h.
void vil3d_distance_transform | ( | vil3d_image_view< float > & | image, |
const float | distance_link_i, | ||
const float | distance_link_j, | ||
const float | distance_link_k | ||
) |
Compute 3d distance transform from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. On exit, the values are the 8-connected distance to the nearest original zero voxel.
distance_link_i | use when calculating connected distance between i and i+1 |
distance_link_j | use when calculating connected distance between j and j+1 |
distance_link_k | use when calculating connected distance between k and k+1 |
Compute 3d distance transform from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero in the places of interest. On exit, the values are the 8-connected distance to the nearest original zero region.
Definition at line 128 of file vil3d_distance_transform.cxx.
void vil3d_distance_transform_one_way | ( | vil3d_image_view< float > & | image, |
const float | distance_link_i, | ||
const float | distance_link_j, | ||
const float | distance_link_k | ||
) |
Compute 3d distance transform from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. On exit, the values are the 8-connected distance to the nearest original zero voxel. One pass of distance transform, going from low to high i,j,k.
distance_link_i | use when calculating connected distance between i and i+1 |
distance_link_j | use when calculating connected distance between j and j+1 |
distance_link_k | use when calculating connected distance between k and k+1 |
Compute 3d distance transform from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. On exit, the values are the 8-connected distance to the nearest original zero region above or to the left of current point. One pass of distance transform, going from low to high i,j,k.
Definition at line 187 of file vil3d_distance_transform.cxx.
void vil3d_distance_transform_one_way_with_dir | ( | vil3d_image_view< float > & | image, |
vil3d_image_view< vil_rgb< float > > & | orient, | ||
const float | distance_link_i, | ||
const float | distance_link_j, | ||
const float | distance_link_k | ||
) |
Compute directed 3D distance function from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero at the places of interest. Directions are assumed to be filled with max_dist. On exit, the values are the 8-connected distance to the nearest original zero region above or to the left of current point. The direction shows the relative position of the closest pixel with value 0. e.g. pixel (10,10,10) has vector (-2,-2,-2), so the closest 0 is at (8,8,8). One pass of distance transform, going from low to high i,j,k.
Definition at line 379 of file vil3d_distance_transform.cxx.
void vil3d_distance_transform_with_dir | ( | vil3d_image_view< float > & | image, |
vil3d_image_view< vil_rgb< float > > & | orient, | ||
const float | distance_link_i, | ||
const float | distance_link_j, | ||
const float | distance_link_k | ||
) |
Compute distance transform in 3d from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero in the places of interest. On exit, the values are the 8-connected distance to the nearest original zero region.
Definition at line 147 of file vil3d_distance_transform.cxx.
float vil3d_min_equal | ( | float const & | a, |
float const & | b, | ||
bool & | eq | ||
) |
void vil3d_signed_distance_transform | ( | vil3d_image_view< float > & | image, |
const float | distance_link_i, | ||
const float | distance_link_j, | ||
const float | distance_link_k | ||
) |
Compute signed distance transform in 3d from zeros in original image.
Image is assumed to be filled with max_dist where there is background, and zero in the places of interest. On exit, the values are the signed 26-connected distance to the nearest original zero region. Positive values are outside the bounded region and negative values are inside. The values on the boundary are zero
distance_link_i | use when calculating connected distance between i and i+1 |
distance_link_j | use when calculating connected distance between j and j+1 |
distance_link_k | use when calculating connected distance between k and k+1 |
Image is assumed to be filled with max_dist where there is background, and zero in the places of interest. On exit, the values are the signed 26-connected distance to the nearest original zero region. Positive values are outside the bounded region and negative values are inside. The values on the boundary are zero
Definition at line 22 of file vil3d_distance_transform.cxx.
void vil3d_signed_distance_transform | ( | const vil3d_image_view< bool > & | mask, |
vil3d_image_view< float > & | image, | ||
float | max_dist, | ||
const float | distance_link_i, | ||
const float | distance_link_j, | ||
const float | distance_link_k | ||
) |
Compute 3d signed distance transform from true elements in mask.
On exit, values are 26 connected distance from the 'true' boundary. There are no zero values because the true boundary is the infinitesimally thin edge of the true and false regions of the mask. The values inside the mask are negative and those outside are positive
distance_link_i | use when calculating connected distance between i and i+1 |
distance_link_j | use when calculating connected distance between j and j+1 |
distance_link_k | use when calculating connected distance between k and k+1 |
On exit, values are 26 connected distance from the 'true' boundary. There are no zero values because the true boundary is the infinitesimally thin edge of the true and false regions of the mask. The values inside the mask are negative and those outside are positive
Definition at line 78 of file vil3d_distance_transform.cxx.
void vil_distance_transform | ( | const vil3d_image_view< bool > & | mask, |
vil3d_image_view< float > & | distance_image, | ||
float | max_dist | ||
) |
Compute 3D distance function from true elements in mask.
On exit, the values are the 26-connected distance to the nearest original zero region (or max_dist, if that is smaller).