New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add function to remove near objects in nd-image #4165
base: main
Are you sure you want to change the base?
Commits on Sep 29, 2019
-
Configuration menu - View commit details
-
Copy full SHA for d929614 - Browse repository at this point
Copy the full SHA d929614View commit details -
Add remove_close_objects function
This function iterates over all objects (connected pixels that are True) inside an image and removes neighboring objects until all remaining ones are at least a minimal euclidean distance from each other.
Configuration menu - View commit details
-
Copy full SHA for e35ffa3 - Browse repository at this point
Copy the full SHA e35ffa3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 03830d9 - Browse repository at this point
Copy the full SHA 03830d9View commit details -
Configuration menu - View commit details
-
Copy full SHA for bcac7ee - Browse repository at this point
Copy the full SHA bcac7eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for f153fe9 - Browse repository at this point
Copy the full SHA f153fe9View commit details -
Configuration menu - View commit details
-
Copy full SHA for cac1a0c - Browse repository at this point
Copy the full SHA cac1a0cView commit details -
Simplify Cythonization in morphology.setup.py
_extrema_cy.pyx was cythonized twice for now reason.
Configuration menu - View commit details
-
Copy full SHA for 0814f91 - Browse repository at this point
Copy the full SHA 0814f91View commit details -
Configuration menu - View commit details
-
Copy full SHA for f3aeb68 - Browse repository at this point
Copy the full SHA f3aeb68View commit details -
Configuration menu - View commit details
-
Copy full SHA for c53a492 - Browse repository at this point
Copy the full SHA c53a492View commit details -
Configuration menu - View commit details
-
Copy full SHA for fbe45c8 - Browse repository at this point
Copy the full SHA fbe45c8View commit details -
Simplify/tweak helper functions in morphology._util
Simplify construction of indices, use consistent name for structuring element (selem), some reformatting and improve documentation.
Configuration menu - View commit details
-
Copy full SHA for 0d08d0f - Browse repository at this point
Copy the full SHA 0d08d0fView commit details -
Only evaluate object surface in remove_close_objects
This trick significantly improves the performance by reducing the number of points inside the KDTree whose neighborhood needs to be evaluated for objects that are to close. The greater the checked objects size to surface ratio, the greater the improvement.
Configuration menu - View commit details
-
Copy full SHA for ffcdb38 - Browse repository at this point
Copy the full SHA ffcdb38View commit details -
numpy.bincount seems to cast its input to dtype('intp') according to the rule safe. Therefore giving a dtype such as uint32 or int64 that can hold a larger number fails on 32-bit platforms.
Configuration menu - View commit details
-
Copy full SHA for 0b36136 - Browse repository at this point
Copy the full SHA 0b36136View commit details -
Configuration menu - View commit details
-
Copy full SHA for b44c417 - Browse repository at this point
Copy the full SHA b44c417View commit details -
Correct faulty results in docstring example
With recent changes the evalutation order of objects changed.
Configuration menu - View commit details
-
Copy full SHA for 27777e3 - Browse repository at this point
Copy the full SHA 27777e3View commit details -
Use "mergesort" instead of "stable" sort
The latter was added in NumPy 1.15 which is not yet a minimal requirement for scikit-image.
Configuration menu - View commit details
-
Copy full SHA for 2a6e09e - Browse repository at this point
Copy the full SHA 2a6e09eView commit details
Commits on Sep 30, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 695b2c7 - Browse repository at this point
Copy the full SHA 695b2c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9dfe298 - Browse repository at this point
Copy the full SHA 9dfe298View commit details
Commits on Oct 4, 2019
-
Support raveled offsets for dimensions smaller selem
The old implementation would raise a ValueError if a dimension length given in `image_shape` was smaller than in `selem`. This precluded operations on images e.g. with the shape (2, 100).
Configuration menu - View commit details
-
Copy full SHA for b4b0155 - Browse repository at this point
Copy the full SHA b4b0155View commit details -
This allows the user to control how the distance between objects/samples is calculated (e.g. Euclidean, Manhatten, Chebyshev).
Configuration menu - View commit details
-
Copy full SHA for 36cf967 - Browse repository at this point
Copy the full SHA 36cf967View commit details -
Configuration menu - View commit details
-
Copy full SHA for fb5a75e - Browse repository at this point
Copy the full SHA fb5a75eView commit details -
Remove parameter not supported by Scipy 0.19
return_sorted was added in SciPy 1.2 and is not yet supported by scikit-images minimal required version.
Configuration menu - View commit details
-
Copy full SHA for 0893179 - Browse repository at this point
Copy the full SHA 0893179View commit details
Commits on Oct 5, 2019
-
Configuration menu - View commit details
-
Copy full SHA for a9a0204 - Browse repository at this point
Copy the full SHA a9a0204View commit details
Commits on Oct 6, 2019
-
"close" can have multiple meanings especially in the context of morphological operations (closing). So the synonym "near" should have less potential for confusion.
Configuration menu - View commit details
-
Copy full SHA for 4cf5108 - Browse repository at this point
Copy the full SHA 4cf5108View commit details
Commits on Oct 19, 2019
-
Configuration menu - View commit details
-
Copy full SHA for 0aaff28 - Browse repository at this point
Copy the full SHA 0aaff28View commit details
Commits on Apr 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0439065 - Browse repository at this point
Copy the full SHA 0439065View commit details -
Merge branch 'master' into remove-close-objects
Resolve Conflicts in: doc/release/release_dev.rst skimage/morphology/_flood_fill.py skimage/morphology/_util.py skimage/morphology/extrema.py
Configuration menu - View commit details
-
Copy full SHA for 4868214 - Browse repository at this point
Copy the full SHA 4868214View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7d96b8 - Browse repository at this point
Copy the full SHA b7d96b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c79fcc - Browse repository at this point
Copy the full SHA 7c79fccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2390fcf - Browse repository at this point
Copy the full SHA 2390fcfView commit details -
Add gallery example for removing objects
This example demonstrates the usage of remove_small_objects and remove_near_objects.
Configuration menu - View commit details
-
Copy full SHA for 46c4edc - Browse repository at this point
Copy the full SHA 46c4edcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ea2b38 - Browse repository at this point
Copy the full SHA 9ea2b38View commit details
Commits on Apr 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 39fc5a6 - Browse repository at this point
Copy the full SHA 39fc5a6View commit details
Commits on Jul 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 1a3f4a2 - Browse repository at this point
Copy the full SHA 1a3f4a2View commit details
Commits on Jul 16, 2020
-
Use shared fused dtype np_real_numeric
Already declared, so no need to duplicate it here.
Configuration menu - View commit details
-
Copy full SHA for ba7aca5 - Browse repository at this point
Copy the full SHA ba7aca5View commit details
Commits on Mar 31, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8308572 - Browse repository at this point
Copy the full SHA 8308572View commit details
Commits on Apr 10, 2022
-
Use out argument instead of in_place
and rename selem to footprint for a more consistent API. ravel is replaced with reshape(-1) as recommended by NumPy's doc.
Configuration menu - View commit details
-
Copy full SHA for 373d0d3 - Browse repository at this point
Copy the full SHA 373d0d3View commit details -
Group test's for remove_near_objects in class
It's easier to seperate the tests for this functions from the other ones this way.
Configuration menu - View commit details
-
Copy full SHA for 78323dd - Browse repository at this point
Copy the full SHA 78323ddView commit details -
_offsets_to_raveled_neighbors is now a just a wrapper for _raveled_offsets_and_distances, so replace it. Special handling of an empty `image` is no longer necessary as both _raveled_offsets_and_distances and cKDTree support arrays with size 0.
Configuration menu - View commit details
-
Copy full SHA for 51f9415 - Browse repository at this point
Copy the full SHA 51f9415View commit details -
Handle memory layout more expicitely
`out` must be C-contiguous which allows for efficient indexing in the underlying Cython code. This might raise an error if out is supplied by the user so document it with a test. It seems that special logic for bool-type arrays is no longer necessary as the appropriate PR [1] was merged. [1] cython/cython#2676
Configuration menu - View commit details
-
Copy full SHA for 1f7df29 - Browse repository at this point
Copy the full SHA 1f7df29View commit details
Commits on Oct 27, 2022
-
Merge branch 'main' into remove-close-objects
# Conflicts: # benchmarks/benchmark_morphology.py # skimage/morphology/__init__.py # skimage/morphology/misc.py # skimage/morphology/setup.py
Configuration menu - View commit details
-
Copy full SHA for 9b9c50e - Browse repository at this point
Copy the full SHA 9b9c50eView commit details -
Configuration menu - View commit details
-
Copy full SHA for d4f1fe6 - Browse repository at this point
Copy the full SHA d4f1fe6View commit details
Commits on Jan 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 633658b - Browse repository at this point
Copy the full SHA 633658bView commit details
Commits on Jan 21, 2023
-
Add _near_objects_cy to new meson system
and fix import path of _shared.fused_numerics. Of course wouldn't compile otherwise.
Configuration menu - View commit details
-
Copy full SHA for 729271d - Browse repository at this point
Copy the full SHA 729271dView commit details -
Address NumPy deprecation warning
The warning was found by the CI (linux-cp3.9-pre) for NumPy v1.24.1: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays. The conversion of -1 to uint32 will fail in the future. The objects don't have to be -1, just any number != 0.
Configuration menu - View commit details
-
Copy full SHA for 668927e - Browse repository at this point
Copy the full SHA 668927eView commit details -
Add remove_near_objects to morpholoy.__all__
Maybe missed during merging?
Configuration menu - View commit details
-
Copy full SHA for 384d2c1 - Browse repository at this point
Copy the full SHA 384d2c1View commit details
Commits on Jan 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for faed84a - Browse repository at this point
Copy the full SHA faed84aView commit details
Commits on Feb 19, 2023
-
Use labels as input and map priority to index
This overhauls the API of remove_near_objects. Instead of labeling the input itself, the function already expects a labeled image. Sorting an index into this label_image by label ID first, and by priority second, makes it easy to find other indices belonging to the same object because they are contiguous in the resulting index. This makes it possible to entirely omit the parameters connectivity and footprint (for now). `priority` now is expected to assign a priority to each object and no longer gives a priority for each pixel. Test and benchmarks were updated accordingly.
Configuration menu - View commit details
-
Copy full SHA for 1196471 - Browse repository at this point
Copy the full SHA 1196471View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9ef5415 - Browse repository at this point
Copy the full SHA 9ef5415View commit details -
Add two new test cases one of which currently fails
Also sadly the optimization isn't working as expected. See test_objects_with_inside.
Configuration menu - View commit details
-
Copy full SHA for c733e61 - Browse repository at this point
Copy the full SHA c733e61View commit details
Commits on Apr 18, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 664a220 - Browse repository at this point
Copy the full SHA 664a220View commit details
Commits on Apr 19, 2024
-
requires an additional copy but still, good to support.
Configuration menu - View commit details
-
Copy full SHA for 72e58f6 - Browse repository at this point
Copy the full SHA 72e58f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for c78dc8a - Browse repository at this point
Copy the full SHA c78dc8aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 887968f - Browse repository at this point
Copy the full SHA 887968fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 571aa4a - Browse repository at this point
Copy the full SHA 571aa4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb2a9af - Browse repository at this point
Copy the full SHA bb2a9afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 11ac443 - Browse repository at this point
Copy the full SHA 11ac443View commit details -
Configuration menu - View commit details
-
Copy full SHA for d2f602e - Browse repository at this point
Copy the full SHA d2f602eView commit details
Commits on Apr 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 2573cd8 - Browse repository at this point
Copy the full SHA 2573cd8View commit details -
Exclude inner samples of objects from KDTree & critical loop
Even with the additional cost of separating bounday and inner samples of objects, this improves the performance significantly!
Configuration menu - View commit details
-
Copy full SHA for e98eb6d - Browse repository at this point
Copy the full SHA e98eb6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 20a5cee - Browse repository at this point
Copy the full SHA 20a5ceeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4399993 - Browse repository at this point
Copy the full SHA 4399993View commit details -
Configuration menu - View commit details
-
Copy full SHA for fefdb67 - Browse repository at this point
Copy the full SHA fefdb67View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6709e68 - Browse repository at this point
Copy the full SHA 6709e68View commit details -
Add support for anistropic data in remove_near_objects
and also add a random test that uses CKDTree.sparse_distance_matrix to manually check distance between remaining objects.
Configuration menu - View commit details
-
Copy full SHA for fe1a8e8 - Browse repository at this point
Copy the full SHA fe1a8e8View commit details
Commits on Apr 21, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e6c02bd - Browse repository at this point
Copy the full SHA e6c02bdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a59894 - Browse repository at this point
Copy the full SHA 7a59894View commit details -
Configuration menu - View commit details
-
Copy full SHA for 49ce7c3 - Browse repository at this point
Copy the full SHA 49ce7c3View commit details -
Use sparser borders if possible
for unity spacing and if p-norm is 1 or 2. Also refactor code structure a little bit.
Configuration menu - View commit details
-
Copy full SHA for c8756ca - Browse repository at this point
Copy the full SHA c8756caView commit details