prop_to_image(regionprops, shape, prop)[source]

Creates an image with each region colored according the specified prop, as obtained by regionprops_3d.

  • regionprops (list) – This is a list of properties for each region that is computed by PoreSpy’s regionprops_3D or Skimage’s regionsprops.

  • shape (array_like) – The shape of the original image for which regionprops was obtained.

  • prop (string) – The region property of interest. Can be a scalar item such as ‘volume’ in which case the the regions will be colored by their respective volumes, or can be an image-type property such as ‘border’ or ‘convex_image’, which will return an image composed of the sub-images.


image – An ND-image the same size as the original image, with each region represented by the values specified in prop.

Return type


See also

props_to_DataFrame, regionprops_3d