Commit Graph

401 Commits

Author SHA1 Message Date
Juan Nunez-Iglesias b5efe5ed94 Merge pull request #1956 from emmanuelle/label_zero
New handling of background pixels for measure.label
2016-02-23 10:10:56 +11:00
emmanuelle a5a771a8e4 Modified label function so that background pixels are labeled with 0, and
background=0 by default.

Modified label function so that background pixels are labeled with 0, and
background=0 by default. All tests of _ccomp.pyx pass

Modified a couple of files to be consistent with the new behavior of
measure.label

Modified doctring of label to pass doctest

Modified TODO.txt as well as release notes to mention the new behavior of
label.

Typo in docstring

Typo in docstring

Changed default value of kw argument background in measure.label

Removed unnecessary and outdated comment
2016-02-22 21:19:23 +01:00
Stefan van der Walt 44150989ee WIP 2016-02-21 16:50:21 +01:00
Evgeni Burovski fc70f73064 STY: more tweaks in response to review comments 2016-02-20 17:29:13 +00:00
Evgeni Burovski ba328e7531 MAINT: address review comments
Use recommended idioms in the .py wrapper
2016-02-20 17:29:13 +00:00
Evgeni Burovski 2bc8538f9f MAINT: address review comments
* typos in comments
* handle the corner case of width-1 2D image
* vanity
* change up leftover <= to correct ==
2016-02-20 17:29:13 +00:00
Evgeni Burovski dc702a83ee TST: skel3d: redo 3D test images
Remove ad-hoc images from morphology/tests/data folder.
Add a FIJI generated image to skimage/data.

The image was generated via
>>> img = binary_blobs(32, 0.05, n_dim=3, seed=1234)
>>> img = img.astype(np.uint8)*255
>>> img = img[:-2, ...]

then saved as a sequence of png frames, read into FIJI as an image sequence,
and skeletonized via Plugins -> Skeletonize (2D/3D).
2016-02-20 17:29:13 +00:00
Evgeni Burovski d832739300 TST: skel3d: remove 2D test images 2016-02-20 17:29:13 +00:00
Evgeni Burovski 64bb1775be TST: inline a two-hole image 2016-02-20 17:29:13 +00:00
Evgeni Burovski 9648d71360 MAINT: skel3d: do not copy more than necessary 2016-02-20 17:29:13 +00:00
Evgeni Burovski 81d47328ea DOC: spell out the names of [Lee94], add the Notes section 2016-02-20 17:29:13 +00:00
Evgeni Burovski 42d4eb6123 TST: skel3d: add more tests 2016-02-20 17:29:13 +00:00
Evgeni Burovski 87541b661d BLD: skel3d: eradicate stray unicode symbols from source files 2016-02-20 17:29:13 +00:00
Evgeni Burovski 27b5dbca48 MAINT: skel3d: address review comments
Tidy up the python wrapper a little.
2016-02-20 17:26:12 +00:00
Evgeni Burovski 212c3d15ce BLD: add the extension to bento.info, fix names 2016-02-20 17:26:12 +00:00
Evgeni Burovski 99de44744a ENH: skel3d: unroll and inline index_octants into is_euler_invariant
13.7/7.3 performance boost on the lobster dataset, huh
2016-02-20 17:26:12 +00:00
Evgeni Burovski a07dd7cb9e MAINT: skel3d: minor sty/perf fixes
* remove commented out code
* statically type tuple of ints
2016-02-20 17:26:12 +00:00
Evgeni Burovski de912c4f7b STY: generate octree_labeling routine via tempita at build time 2016-02-20 17:26:12 +00:00
Evgeni Burovski 3bbb766f4e MAINT: skel3d: rename _skel.pyx to _skel.pyx.in
(no templating yet)
2016-02-20 17:26:12 +00:00
Evgeni Burovski c4c95ae4bc STY: reformat the filling-in of the Euler LUT 2016-02-20 17:26:12 +00:00
Evgeni Burovski 85f46c6fe8 MAINT: skel3d: address review comments
* simplify filling in the neighb_idx LUT
* underscore references
* preserve the color range of the original image
2016-02-20 17:26:12 +00:00
Evgeni Burovski 456a5252c9 STY: skel3d: clarify the status of module-level LUTs.
Fill in at the module level, then rebind in compute_thin_image, and pass around
as arguments to relevant functions.
2016-02-20 17:26:12 +00:00
Evgeni Burovski 5fa50a6765 MAINT: skel3d: prune dead code (eg, is_surface_point) 2016-02-20 17:26:12 +00:00
Evgeni Burovski ecf744542e MAINT: remove decorators which have no effect anyway 2016-02-20 17:26:12 +00:00
Evgeni Burovski dc6cf19fec STY: move main functions to the top of the file 2016-02-20 17:26:12 +00:00
Evgeni Burovski f82dddd475 MAINT: stop slicing memoryviews in is_simple_point.
Use plain C arrays for neighbors[27] + memcpy when copying the `cube`
for labeling.

Apparently, slicing memoryviews *is* expensive (cf Jake vdP'2012).
2016-02-20 17:26:12 +00:00
Evgeni Burovski 42ba24deb3 MAINT: skel3d: don't print stuff 2016-02-20 17:26:12 +00:00
Evgeni Burovski 88a9bcc874 DOC: skel3d: add basic docstrings 2016-02-20 17:26:12 +00:00
Evgeni Burovski 689980124d MAINT: skel3d: simplify dealing with 2D images 2016-02-20 17:26:12 +00:00
Evgeni Burovski c60b6b05cf MAINT: statically type img in toplevel _compute_thin_image 2016-02-20 17:26:12 +00:00
Evgeni Burovski 2f0d0cc18c MAINT: avoid incrurring np.r_ overhead in is_simple_point
(yet another x1.6)
2016-02-20 17:26:12 +00:00
Evgeni Burovski b7889b2c4f MAINT: avoid doing np.sum in the hot loop
(you gotta be kidding me, x2 speed-up)
2016-02-20 17:26:11 +00:00
Evgeni Burovski 01e1f04b28 TST: skel3d: add a Bat Cochlea sample from FIJI collections 2016-02-20 17:26:11 +00:00
Evgeni Burovski c9ed06ad92 MAINT: skel3d: statically type Euler LUT 2016-02-20 17:26:11 +00:00
Evgeni Burovski 32865d2bd9 MAINT: skel3d: statically type index_octants 2016-02-20 17:26:11 +00:00
Evgeni Burovski 53f48cb6c0 MAINT: skel3d: only allocate and type neighborhood once; switch off
bounds checking
2016-02-20 17:26:11 +00:00
Evgeni Burovski f1176a5319 MAINT: skel3d: add static typing to obvious places 2016-02-20 17:26:11 +00:00
Evgeni Burovski 06d5a91f57 MAINT: skel3d: move computations to cython 2016-02-20 17:26:11 +00:00
Evgeni Burovski a85c9ddd3c MAINT: move new skeletonize3d files to more appropriate places 2016-02-20 17:26:11 +00:00
Evgeni Burovski e421cea331 ENH: start adding a python version of Skeletonize3D code 2016-02-20 17:26:11 +00:00
Steven Silvester b710bd21d2 Use a stacklevel of 2 by default for all warnings 2016-01-30 08:57:46 -06:00
Emmanuelle Gouillart d4b3aeeed3 Merge pull request #1846 from arokem/hull-docs
DOC: Small one. The input to this one needs to be 2D.
2015-12-24 10:34:00 +01:00
arokem 9fb5f1333d TST: Test both functions(!). 2015-12-23 15:36:35 -08:00
arokem 436d0e8ca3 TST: Test error handling in convex_hull, convex_hull_object.
Also, a few PEP8 fixes in both module and tests.
2015-12-23 14:57:44 -08:00
arokem 227211fec7 DOC: Small one. The input to this one needs to be 2D. 2015-12-23 14:24:52 -08:00
emmanuelle 0b61b8f46f Removed deprecated label function from morphology module in preparation
for 0.12 release.
2015-12-23 23:24:22 +01:00
Juan Nunez-Iglesias 3b525987f5 Merge pull request #1787 from ahojnnes/rpropsfix
Various fixes and improvements
2015-11-19 15:16:16 +11:00
Johannes Schönberger 9d3a7b4ecd Remove redundant type conversion 2015-11-18 08:58:01 -05:00
Johannes Schönberger a63b746e6c Move import test to top of function and import outside of function 2015-11-17 10:25:05 -05:00
Johannes Schönberger 6e644c4aa6 Remove single author from header, fix typo
Functions in this file are from multiple authors, the original
author is attributed in the contributors section and the Git history.
2015-11-17 10:22:44 -05:00