props_to_DataFrame

props_to_DataFrame(regionprops)[source]

Returns a Pandas DataFrame containing all the scalar metrics for each region, such as volume, sphericity, and so on, calculated by regionprops_3D.

Parameters

regionprops (list) – This is a list of properties for each region that is computed by regionprops_3D. Because regionprops_3D returns data in the same list format as the regionprops function in Skimage you can pass in either.

Returns

DataFrame – A Pandas DataFrame with each region corresponding to a row and each column corresponding to a key metric. All the values for a given property (e.g. ‘sphericity’) can be obtained as val = df['sphericity']. Conversely, all the key metrics for a given region can be found with df.iloc[1].

Return type

Pandas DataFrame

See also

prop_to_image, regionprops_3d