Closed silvandeleemput closed 3 years ago
Default should be to use the memory efficient version.
This PR should be merged or rebased to master after https://github.com/comic/evalutils/pull/313 lands.
Looking at the constructions, wouldn't it be nicer to pass edt_method
around rather than have a boolean option and then a few switches everywhere, then default that to the one included in this library.
That would be both cleaner and more flexible, but as an interface for the user, I think you only would ever want to change between those two methods, hence a boolean should be simpler and sufficient.
However, if you think that directly supplying the edt_method is better, I would be happy to change it.
Merging #311 (a798c07) into master (992241b) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## master #311 +/- ##
=======================================
Coverage 85.24% 85.24%
=======================================
Files 13 13
Lines 881 881
Branches 127 127
=======================================
Hits 751 751
Misses 87 87
Partials 43 43
Impacted Files | Coverage Δ | |
---|---|---|
evalutils/stats.py | 86.30% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 992241b...a798c07. Read the comment docs.
No strong opinions about it, in general I think it's a better pattern and was just thinking to get it right now as public interfaces should never change.
Closes #303
This PR
use_memory_efficient_edt
switch to all methods computing edt transforms in stats.py.scipy.ndimage.morphology.distance_transform_edt
version.distance_transform_edt_float32
version in stats.py.@jmsmkn The current default was the memory-efficient version, but now it will use the (non-memory-efficient)
scipy.ndimage.morphology.distance_transform_edt
version. I figured that it would be more desirable to move away from custom methods. Is it ok to break it in this way, or would we rather put the default to the memory-efficient version we used before?