Commit Graph

81 Commits

Author SHA1 Message Date
Stefan van der Walt 83d5ff9001 Consistently use relative imports 2015-07-11 15:41:37 -05:00
Johannes Schönberger 0758fc9cd6 Do not acquire GIL for felzenswalb 2015-05-19 22:52:35 -07:00
Johannes Schönberger 2d0b4dc37a Do not acquire GIL for quickshift 2015-05-19 22:43:46 -07:00
Johannes Schönberger 785176b4c2 Do not acquire GIL for slic 2015-05-19 22:40:19 -07:00
Gustav Larsson 9de5a4557c Added test for buffer overflow in slic.
As with all buffer overflows, it is hard to make a test that
consistently triggers tests the behavior. This test does not work for me
through the test_slic.py file, but it works in isolation.
2015-04-20 14:35:57 -05:00
Jonathan Helmus 78a0eb6b98 Implement appveyor builds
Implement Appveyor builds

initial test

Updated appveyor.yml

New nosetest call

With conda update conda

with pillow

without pillow

TST: Change case sensitivive JPG extension

Revert "TST: Change case sensitivive JPG extension"

This reverts commit 2deed7cc63736f7c6f0387bd37df4c6643c32847.

Trying with Python 2.7

Trying with version env

Trying again with variables

Testing on all Python versions

don't allow failures

Allow failure

Do not actually use tests

Ignore failing tests

Removed Python 2.6 test

Testing only Python 2.6

Testing out more sklearn like AppVeyor CI

Added install to pip

Add artifacts

Enabled all permutations

Disable 2.6, add PIL

Python 2.6, 2.7 only with PIL

Testing with variable dependencies

Allow failure with IF ELSE

With Python 3.4

Scikit-learn like appveyor CI

Fixing paths

Undo path fix

path fix single line

path fix single line 2

Using Miniconda

More path fixes

New wheelhouse link

Added pillow to requirements.txt

Added networkx to requirements.txt

Add testing of 32/64-bit Python 2.7 and 3.4 to matrix

Debugging Cython compile

Retry with all 4 builds

Updated install.ps1 file

Updated based on latest python-appveyor-demo

Debugging pip install

Specify numpy 1.8.1 until whl is uploaded to rackspace

Use skimage-wide requirements.txt file

Minor comment change to trigger build

Install wheel and then install from WHEELHOUSE

Install six from pip

Install networkx from pip

Install pyparsing from pip

Install pytz from pip

Try using just find-links

Install the binary dependencies first, then the rest

Add pillow to the install list

Fix appveyor.yml syntax

Fix requirements.txt syntax

Fix requirements.txt syntax again

Fix appveyor call to initial install

Fix appveyor call to initial install again

Fix appveyor call to initial install yet again

Install wheel

Install wheel first

Install wheel and nose in the appveyor requirements.txt

Fix Python3 version to match python ftp site

Only use cleanup decorator if available

Add debug info to multiimage test

More debugging information

Fix handling of path separators on Windows

Add another warning guard

Fix warning handling for non-windows

Do not use TkAgg as it may be causing alloc error

Clean up echo command

Allow for unclosed file warning

Fix spacing in echo command
2015-02-28 19:57:45 -06:00
Juan Nunez-Iglesias ac5c0c30a9 Fix incorrect call to mark_boundaries in test 2015-01-22 11:38:37 +11:00
Juan Nunez-Iglesias 9b9730b058 Specify mode for mark_boundary tests 2015-01-22 11:38:37 +11:00
Juan Nunez-Iglesias 6586d1eb3f Test subpixel mark_boundaries 2015-01-22 11:38:37 +11:00
Juan Nunez-Iglesias a55e3346f7 Set up correct type for find_boundaries test 2015-01-22 11:38:36 +11:00
Juan Nunez-Iglesias b1891dc24e Make find_boundaries symmetric
Fixes #738
2015-01-22 11:38:35 +11:00
Juan Nunez-Iglesias 879a7b0bb5 Update treatment of convert2lab in slic
It still defaults to `True` but only when the last dimension of the
input array could be construed as RGB.

Also, update ValueError description in docstring.
2015-01-16 13:11:25 +11:00
Steven Silvester f898bd0209 Style fixes 2014-12-26 11:26:30 -06:00
Steven Silvester d760c0adda Fix scipy.sparse.sparsetools warning 2014-12-24 11:20:52 -06:00
Steven Silvester bea57315fb Update docstring and fix pyamg warning check 2014-12-24 09:10:11 -06:00
Steven Silvester 23ae571689 Fix final failing test on Py2.6 build 2014-12-24 08:49:51 -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
Josh Warner (Mac) 0d775c3aab Remove check for non-numeric values in spacing. 2014-05-07 02:42:38 -05:00
Josh Warner (Mac) 88f08ebea2 TST: Add unit test for length-2 spacing with rank-2 input 2014-04-19 11:40:16 -05:00
Josh Warner (Mac) 7847287f46 FIX: Shortcut output or catch trivial cases in random_walker
Also:
* New tests to cover these new checks
* Improvements to docstrings and user warnings
* Generalize handling of `sampling` in accordance with docstring
* Some extra whitespace to improve readability
2014-04-18 18:47:20 -05:00
Juan Nunez-Iglesias 18ce9d2b95 Remove depth from random_walker tests 2014-04-09 23:44:34 +10:00
Michal Romaniuk ee3ca829c6 Added a test for slic_zero and some other changes based on feedback from Github. 2014-01-26 18:01:59 +00:00
Michal Romaniuk 131dea07a0 Merged the separate loops for SLIC-zero and SLIC into one, and some minor improvements based on feedback on Github. 2014-01-21 20:08:07 +00:00
Guillem Palou Visa 4982b00f0c Labels start at 0, for backward compatibility
Code is PEP8 compliant
2013-12-24 18:45:55 +01:00
Guillem Palou Visa 64d945da71 fixing tests 2013-12-24 16:18:57 +01:00
Johannes Schönberger 4033566ae6 Add test for invalid parameter combination 2013-11-22 12:22:10 +01:00
Johannes Schönberger e74db662cb Add test case for *_boundaries functions 2013-11-21 23:58:39 +01:00
Johannes Schönberger 615866ae16 Cast label_field to integer dtype for float intput 2013-11-09 21:56:18 +01:00
Andreas Mueller 57e37352cb FIX add missing min_size parameter, add regression test. 2013-10-20 15:15:36 -07:00
Josh Warner (Mac) f25ca3a835 ENH: spacing kwarg for random_walker and improved tests 2013-10-13 12:39:13 -05:00
Josh Warner (Mac) e5e1918a2b REBASE: Resolve first conflict 2013-10-13 12:38:35 -05:00
Juan Nunez-Iglesias bfab493133 Add new tests for relabel_sequential 2013-10-03 16:11:52 +10:00
Juan Nunez-Iglesias 846765e5f9 Add spacing support for new, speeded-up SLIC 2013-09-16 17:52:25 +10:00
Juan Nunez-Iglesias 610a0d1793 Add support for list sigma input in SLIC
Previously, having a different `sigma` for different dimensions
required an array input. This allows the user to use a simple list,
which gets converted to an array internally.

Importantly, it removes a very unhelpful error:

```python
>>> im = np.random.rand(10, 20)
>>> from skimage import segmentation as seg
Exception AttributeError: "'UmfpackContext' object has no attribute '_symbolic'" in <bound method UmfpackContext.__del__ of <scipy.sparse.linalg.dsolve.umfpack.umfpack.UmfpackContext object at 0x1045ff5d0>> ignored

>>> s = seg.slic(im, 2, sigma=[2, 1])
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-689b36a2f0ef> in <module>()
----> 1 s = seg.slic(im, 2, sigma=[2, 1])

/Users/nuneziglesiasj/venv/skimdev2/lib/python2.7/site-packages/scikit_image-0.9dev-py2.7-macosx-10.5-x86_64.egg/skimage/segmentation/slic_superpixels.pyc in slic(image, n_segments, compactness, max_iter, sigma, multichannel, convert2lab, ratio)
    106     if not isinstance(sigma, coll.Iterable):
    107         sigma = np.array([sigma, sigma, sigma])
--> 108     if (sigma > 0).any():
    109         sigma = list(sigma) + [0]
    110         image = ndimage.gaussian_filter(image, sigma)

AttributeError: 'bool' object has no attribute 'any'
```
2013-09-16 17:49:07 +10:00
Juan Nunez-Iglesias ea1566fffb Fix image dimension sanitizing at function start
`np.atleast_3d` will add a singleton dimension at the end of an array
if needed. This is not the correct thing to do if `multichannel=False`
based on the subsequent lines. If the input image was 2D with shape
`(40, 50)` and `multichannel=False`, then `np.atleast_3d` gives it
shape `(40, 50, 1)`, and then, because `multichannel=False`, the rest
of the code gives it shape `(40, 50, 1, 1)`. This results in the final
returned array having shape `(40, 50, 1)` instead of the desired
`(40, 50)`.

This commit fixes that and updates the test to detect this failure.
2013-09-16 16:02:24 +10:00
Johannes Schönberger eeddd9e35f Revert multichannel magic and improve parameter docs 2013-09-01 16:46:01 +02:00
Johannes Schönberger fd729a4e30 Improve SLIC 2013-09-01 16:46:00 +02:00
Juan Nunez-Iglesias 72833f1729 Do not use 'ratio' in test_slic.py either 2013-07-29 00:30:51 +10:00
Juan Nunez-Iglesias 878c562a45 Replace 'ratio' kwarg with 'compactness' in SLIC 2013-07-29 00:28:38 +10:00
Juan Nunez-Iglesias cba821d5e3 Suppress warning of ambiguous array dim in test 2013-07-02 13:22:14 +02:00
Juan Nunez-Iglesias 5c4d0218ce bug fix: 3d test working 2013-07-02 13:22:13 +02:00
Juan Nunez-Iglesias 215439b43c Add 3D slic tests (gray not working yet) 2013-07-02 13:22:13 +02:00
Juan Nunez-Iglesias 57cc86d7c8 Bug fix: remove unnecessary __get__ in test_slic 2013-07-02 13:22:13 +02:00
Juan Nunez-Iglesias 6dc8e6300b Separate inner loop of SLIC computation 2013-07-02 13:22:12 +02:00
Juan Nunez-Iglesias a2e32cc90c Add initial 3D modifications (not working) 2013-07-02 13:21:17 +02:00
Josh Warner (Mac) e3c3a69560 add assertion checks to ensure data shape is unchanged 2013-04-14 20:16:18 -05:00