upxo.propOps.morphops module

Morphological property helpers for labelled grain structures.

upxo.propOps.morphops.volumes_with_bincount(label_image, nlabels=None)[source]

Return voxel counts indexed by label ID.

upxo.propOps.morphops.volume_dict(label_image, labels)[source]

Return {label: voxel_count} for requested labels.

upxo.propOps.morphops.values_array(prop_dict)[source]

Return property dictionary values as an array.

upxo.propOps.morphops.gids_with_value(prop_dict, value)[source]

Return one-based IDs whose property equals value.

upxo.propOps.morphops.gids_with_min(prop_dict)[source]

Return IDs whose property equals the minimum value.

upxo.propOps.morphops.gids_with_max(prop_dict)[source]

Return IDs whose property equals the maximum value.

upxo.propOps.morphops.gids_le(prop_dict, threshold)[source]

Return IDs whose property is less than or equal to threshold.

upxo.propOps.morphops.gids_ge(prop_dict, threshold)[source]

Return IDs whose property is greater than or equal to threshold.

upxo.propOps.morphops.prop_values_for_gids(prop_dict, gids)[source]

Return floored property values for requested IDs.

upxo.propOps.morphops.gids_in_range(prop_dict, low=10, high=15, low_ineq='ge', high_ineq='le')[source]

Return IDs whose property values fall in the requested range.

upxo.propOps.morphops.voxel_volume(spacing)[source]

Return voxel volume from spacing.

upxo.propOps.morphops.voxel_surface_areas(spacing, ret_metric='mean')[source]

Return voxel face areas for a spacing tuple.