forked from scikit-image/scikit-image
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* made core_3d * fixed reshaping error * Removed extraneous functions * PEP8 compliance * added tests * documentation, benchmarks * Added to release_dev.rst * added otsu * add otsu * added test for otsu * example * changes to documentation * changed contrast in brain image, html updates * added html demo for otsu 3D * autolevel implementation, same as new_rank_dev * fix bug and start adding test * modify loading 3d rank test and added file_hash * revert previous file_hash change and import through os instead of fetch * added data to registry and deleted * implemented and created basic tests for all generic rank filters except windowed_histogram since it is the only filter that applies vector per pixel; will work on percentiles and bilaterals after fixing the reviewed code * Apply suggestions from code review suggestions up to __init__.py Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu> * Simple code review fixes up to __init__.py * Apply suggestions from code review The ones after __init__.py Co-authored-by: Riadh Fezzani <rfezzani@gmail.com> Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu> * fixed bug and code reviews other than core_cy.pyx * modifying core_cy.pyx with error * Apply suggestions from code review Co-authored-by: Riadh Fezzani <rfezzani@gmail.com> * one line change to core_cy.pyx * change histo type from pointer to memoryview for all 2D and 3D in core, generic, bilateral, percentile * add check for selem/image size and fix bug * test selem of size 1 * test: removing 3D plot_local_equalize * style change and separate core_cy_3d.pyx * BUG: fix indexing order in is_in_mask_3D rank filter function * add plt.show() to equalization example * Update benchmarks/benchmark_rank.py Co-authored-by: Gregory R. Lee <grlee77@gmail.com> * updated benchmark * non-isotropic 3D tests Co-authored-by: Stanley_Wang <wangxi4062@gmail.com> Co-authored-by: Jaewon Chung <jaewonc78@gmail.com> Co-authored-by: Juan Nunez-Iglesias <juan.nunez-iglesias@monash.edu> Co-authored-by: Riadh Fezzani <rfezzani@gmail.com> Co-authored-by: Gregory Lee <grlee77@gmail.com> Co-authored-by: Emmanuelle Gouillart <emma@plot.ly>
- Loading branch information
1 parent
853c3f8
commit cd5c1a7
Showing
21 changed files
with
1,426 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ __pycache__ | |
*.new | ||
*.md5 | ||
*.old | ||
.DS_Store | ||
.pytest_cache | ||
.mypy_cache/ | ||
temp.tif | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,31 @@ | ||
import numpy as np | ||
from skimage import img_as_ubyte | ||
from skimage.filters import rank | ||
from skimage.filters.rank import __all__ as all_rank_filters | ||
from skimage.morphology import grey, disk | ||
from skimage.filters.rank import __3Dfilters as all_3d_rank_filters | ||
from skimage.morphology import disk, ball | ||
|
||
|
||
class RankSuite(object): | ||
|
||
param_names = ["filter", "shape"] | ||
param_names = ["filter_func", "shape"] | ||
params = [sorted(all_rank_filters), [(32, 32), (256, 256)]] | ||
|
||
def setup(self, filter, shape): | ||
def setup(self, filter_func, shape): | ||
self.image = np.random.randint(0, 255, size=shape, dtype=np.uint8) | ||
self.selem = disk(1) | ||
|
||
def time_filter(self, filter, shape): | ||
getattr(rank, filter)(self.image, self.selem) | ||
def time_filter(self, filter_func, shape): | ||
getattr(rank, filter_func)(self.image, self.selem) | ||
|
||
|
||
class Rank3DSuite(object): | ||
|
||
param_names = ["filter3d", "shape3d"] | ||
params = [sorted(all_3d_rank_filters), [(32, 32, 32), (128, 128, 128)]] | ||
|
||
def setup(self, filter3d, shape3d): | ||
self.volume = np.random.randint(0, 255, size=shape3d, dtype=np.uint8) | ||
self.selem_3d = ball(1) | ||
|
||
def time_3d_filters(self, filter3d, shape3d): | ||
getattr(rank, filter3d)(self.volume, self.selem_3d) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.