nphase_border

nphase_border(im: ndarray[Any, dtype[_ScalarType_co]], conn: Literal['min', 'max'] = 'min')[source]

Identifies the voxels in regions that border N other regions.

Useful for finding triple-phase boundaries.

Parameters:
  • im (ndarray) – An ND image of the porous material containing discrete values in the pore space identifying different regions. e.g. the result of a snow-partition

  • conn (str) – Can be either ‘min’ or ‘max’ and controls the shape of the structuring element used to determine voxel connectivity. The default if ‘min’ which imposes the strictest criteria, so that voxels must share a face to be considered connected.

Returns:

image – A copy of im with voxel values equal to the number of uniquely different bordering values

Return type:

ndarray

Examples

Click here to view online example.