Closed FabianIsensee closed 6 months ago
correction: I can import __surface_distances
with from medpy.metric.binary import __surface_distances
but that is not good practice because __
is telling users not to import it
Sorry for the late reply. Sure I would accept a PR on that :)
Closed due to inactivity.
Hi there,
is there a specific reason for
__surface_distances
being hidden with the __ prefix? Imagine someone (hint: me :-) ) would like to compute multiple surface-based metrics for the same predicted segmentation (ASD, ASSD, HD, HD95 etc). Right now the surface distances (which are expensive to be computed) will need to be recomputed for each metric: that can be a lot of redundant computation.Suggestion: 1) make
__surface_distances
accessible by removing the __ prefix 2) let all surface metrics takesurface_distances=None
as additional argument. If it is None, the distances are computed (like they are right now). But users could also choose to precompute the distances and pass them to multiple surface-based metrics and thus save a lot of computation.Would you be willing to accept a PR on this?
(we would somehow need to handle gt->pred and pred-> gt distances which are sometimes needed, sometimes not. Maybe using two input arguments, one for each)
Best,
Fabian