- map_to_regions(regions, values)¶
Maps pore values from a network onto the image from which it was extracted
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
regionsis n+1. This mismatch is caused by the fact that 0’s in the
regionsimage is assumed to be the backgroung phase, while pore index 0 is valid.
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.
Click here to view online example.