Commit Graph

144 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 ba328e7531 MAINT: address review comments
Use recommended idioms in the .py wrapper
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 42d4eb6123 TST: skel3d: add more tests 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 01e1f04b28 TST: skel3d: add a Bat Cochlea sample from FIJI collections 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
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
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
Olivia 3f735b6482 Changed the test file to use expected warnings.
This is with help from @blink1073
2015-09-22 17:35:32 +01:00
Olivia c7597d6942 Changed function name to _check_dtype_supported 2015-09-17 13:45:01 +01:00
Olivia 9ea085fd6f Added new functionality to remove small holes from images.
This is currently working with **kwargs except for inplace
which I cannot get working. It works with arrays of type int
but returns an array of type bool. Possibly in future add
labelling for arrays of type int. A UserWarning is produced
when using arrays of type int which seems to work normally
but the test created for this does not pick up the warning.

Any assistance on these issues would be helpful. I started
this at EuroScipy 2015 and this fixes issue #1642
2015-08-30 23:05:15 +01:00
Stefan van der Walt 83d5ff9001 Consistently use relative imports 2015-07-11 15:41:37 -05:00
Juan Nunez-Iglesias 0d134987f9 Harmonize all ndimage usage across the library
Only two forms remain in use:

- `from scipy import ndimage as ndi`
- `from scipy.ndimage import function`
2015-06-09 15:18:37 +10:00
Lee Kamentsky 54f8265603 Issue #803 order the structuring element by distance to get diagonals processed last 2015-05-28 13:28:21 -04:00
kpk09 a9bdaaf274 proposed fix and test for broken watershed on flat areas (https://github.com/scikit-image/scikit-image/issues/803) 2015-05-28 13:28:16 -04:00
Juan Nunez-Iglesias d8555142da Update binary morphology tests, which no longer warn 2015-01-22 11:38:36 +11:00
Juan Nunez-Iglesias 04536cc7df Update morphology dtypes tests
Previously, we were testing that any dtype would get converted to uint8
and then correctly processed. Now, since we are using ndimage, we are
directly processing all dtypes. I've updated the tests accordingly.
2015-01-22 11:29:08 +11:00
Steven Silvester f898bd0209 Style fixes 2014-12-26 11:26:30 -06:00
Steven Silvester 2e0deb9595 Fix syntax error and missing | operator 2014-12-24 07:47:05 -06:00
Steven Silvester d37ccca598 Fix Py2.7 build errors 2014-12-24 06:54:56 -06:00
Steven Silvester c0a0490eed Fix handling of multiple warnings and update tests
Fix handling of multiple warnings

Update all test __init__ files

Update segmentation pkg

Update the color pkg

Update the exposure pkg

Update the filters pkg

Update the io pkg

Update the measure pkg

Update morphology package

Restructure test setup function

Add expected_warnings to __all__

Update restoration pkg.

Remove explicit filter check since it is done elsewhere

Fix the image test helpers

Update the transform pkg

Fix util pkg

Update viewer pkg
2014-12-23 16:51:06 -06:00
Steven Silvester a4e4e57ba5 Create new expected_warnings helper and some cleanup
Add new helper function for expected warnings during test

Indentation cleanups and avoid skipping doctests if possible.
2014-12-23 16:50:18 -06:00
Steven Silvester 4680f30466 Add a test setup helper function
Add a function to set up a skimage test

Switch to new test helper function

Import local packages that raise warnings in test setup function

More fixes to doctests

Fix regionprops doc test

Try and fix the test_rank failure.

Remove no longer needed RectangleSelector shim

Skip more doctests in _regionprops

Try importing another scipy subpackage
2014-12-23 16:49:20 -06:00
Steven Silvester f72882fbd2 Import scipy before turning on warnings 2014-12-23 16:49:19 -06:00
Steven Silvester 0debedd82c Handle more warnings and reset io plugins as needed
Reset plugins prior to running collections test

Handle warnings in morphology pkg

Add __init__ for morpohology tests

Handle warnings for novice pkg

Handle warnings for restoration pkg

Handle warnings for segmentation pkg

Handle warnings for _shared pkg

Handle warnings for transform pkg

Handle warnings for util pkg

Handle warnings in viewer module
2014-12-23 16:48:16 -06:00
Pratap Vardhan db7b43199d BUG: Change dtype 2014-12-15 18:13:39 +05:30
Pratap Vardhan 8d50561d18 TST: Test for ellipse structuring element 2014-12-15 13:21:15 +05:30
Pratap Vardhan 073f28e90e TST: Test for selem.cube 2014-12-14 10:52:53 +05:30
Pratap Vardhan 9d6516903d DOC: Add test functions docstrings 2014-12-14 01:28:09 +05:30
Pratap Vardhan 2058fe23cb CLN: Minor cleanup - unused imports, pep8 2014-12-14 01:17:27 +05:30
Stefan van der Walt 36aa4cdb6f Merge pull request #1254 from matejak/label3d
Refactor labeling and extend to 3D
2014-12-04 12:31:29 +02:00
Matěj Týč e41bff898a Added fix for the strange input array shapes + tests 2014-11-28 16:45:52 +01:00
Matěj Týč abf3dbc593 Added and tested proper exception handling concerning array shape 2014-11-16 15:33:13 +01:00
Matěj Týč 7c7ecc4bdc Mainly typo fixes 2014-11-11 21:49:57 +01:00
Matěj Týč 438a9355d6 Fixed bugs so test pass now 2014-11-11 00:39:49 +01:00
Matěj Týč 53f93a7f8e Added tests for 3D labelling (that fail) 2014-11-08 12:09:19 +01:00
Rebecca 1b217f971e replacing lena in examples and most tests 2014-11-07 16:01:23 +02:00
Steven Silvester 2374b6a1ff Merge pull request #1219 from jni/reconstruct-error
Raise meaningful error when wrong "method" passed to `reconstruct`
2014-11-05 20:42:35 -06:00
Steven Silvester 66aaf71943 Merge pull request #1217 from jni/morpho-out
Allow discontiguous out arrays in `skimage.morphology.grey`
2014-11-05 20:35:56 -06:00
Juan Nunez-Iglesias 39d042e4ba Test correct error for wrong method in reconstruct 2014-11-06 10:29:43 +11:00
Juan Nunez-Iglesias 1a3ec0299c Add tests for discontiguous out arrays in grey morpho 2014-11-04 15:20:21 +11:00
Juan Nunez-Iglesias 8711c74533 Test type warning from remove_small_objects 2014-09-30 15:04:28 +10:00