PyNutil.quantify_coords#
- PyNutil.quantify_coords(result, atlas_labels)[source]#
Summarize atlas-space extraction results by atlas region.
- Parameters:
result – Extraction result returned by
PyNutil.seg_to_coords(),PyNutil.image_to_coords(), orPyNutil.xy_to_coords().atlas_labels – Atlas labels to use when building the output table. This may be a labels
pandas.DataFrame, anAtlasDatainstance, or a BrainGlobe atlas object.
- Returns:
Whole-series quantification table. For segmentation-based extraction, the output includes object and area statistics. For intensity-based extraction, the output includes summed and mean intensity statistics. Common columns include
idxandnameplus region-level summary fields such asregion_area,object_count,object_pixels,area_fraction, or intensity columns such assum_intensityandmean_intensitydepending on the extraction mode. Damage-related columns are included automatically when damage mask data is present.- Return type:
pandas.DataFrame
Examples
Quantify an extraction result against atlas regions:
>>> label_df = quantify_coords(result, atlas) >>> label_df[ ... ["idx", "name", "region_area", "object_count", "area_fraction"] ... ].head()