map_to_regions#

map_to_regions(regions, values)[source]#

Maps pore values from a network onto the image from which it was extracted

Parameters:
  • regions (ndarray) – An image of the pore space partitioned into regions and labeled

  • values (array_like) – An array containing the numerical values to insert into each region. The value at location n will be inserted into the image where regions is n+1. This mismatch is caused by the fact that 0’s in the regions image is assumed to be the backgroung phase, while pore index 0 is valid.

Notes

This function assumes that the array of pore values are indexed starting at location 0, while in the region image 0’s indicate background phase and the region indexing starts at 1. That is, region 1 corresponds to pore 0.

Examples

Click here to view online example.