Label points in a distance transform that are closer to image boundary than solid

These points could potentially be erroneously high since their distance values do not reflect the possibility that solid may have been present beyond the border of the image but was lost by trimming.


dt (ndarray) – The distance transform of the phase of interest.


image – An ndarray the same shape as dt with numerical values indicating the maximum amount of error in each volxel, which is found by subtracting the distance to nearest edge of image from the distance transform value. In other words, this is the error that would be found if there were a solid voxel lurking just beyond the nearest edge of the image. Obviously, voxels with a value of zero have no error.

Return type:



Click here to view online example.