props_to_DataFrame#
- props_to_DataFrame(regionprops)[source]#
Create a
pandas
DataFrame containing all the scalar metrics for each region, such as volume, sphericity, and so on, calculated byregionprops_3D
.- Parameters:
regionprops (list) – This is a list of properties for each region that is computed by
regionprops_3D
. Becauseregionprops_3D
returns data in the samelist
format as theregionprops
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 withdf.iloc[1]
.- Return type:
Pandas DataFrame
See also
prop_to_image
,regionprops_3d
Examples
Click here to view online example.