find_disconnected_voxels

find_disconnected_voxels(im, conn=None)[source]

This identifies all pore (or solid) voxels that are not connected to the edge of the image. This can be used to find blind pores, or remove artifacts such as solid phase voxels that are floating in space.

Parameters
  • im (ND-array) – A Boolean image, with True values indicating the phase for which disconnected voxels are sought.

  • conn (int) – For 2D the options are 4 and 8 for square and diagonal neighbors, while for the 3D the options are 6 and 26, similarily for square and diagonal neighbors. The default is the maximum option.

Returns

image – An ND-image the same size as im, with True values indicating voxels of the phase of interest (i.e. True values in the original image) that are not connected to the outer edges.

Return type

ND-array

Notes

imageND-array

The returned array (e.g. holes) be used to trim blind pores from im using: im[holes] = False

Examples

Click here to view online example.