Commit Graph

45 Commits

Author SHA1 Message Date
Steven Silvester 0e61374a89 Add a helper function to check for low contrast
Add a helper function to check for low contrast

Add a check for low contrast when using imsave

Use the low contrast helper in imshow and make sure warnings are always shown

Clean up parameter names and add doctests

Remove unnecessary warning context

Remove unnecessary warning context

Add dtype ranges for 64bit types

Update tests with new warnings

Fix doctest logic

Fix doctest logic

Add a low contrast test with multiple dtypes

Fix check for color images

Fix color check again

Add support for int32 types

Relax assertion for 32bit builds

Add a low contrast test with multiple dtypes

Add a low contrast test with multiple dtypes

Fix check for color images

Fix color check again

Add support for int32 types
2015-03-09 21:34:58 -05:00
Johannes Schönberger 3a1079a180 Misc PEP8 fixes 2014-12-14 02:56:14 +01:00
Almar Klein 0e7daf41dc Update docs in dtype.py: mention scaling of values 2014-11-25 08:43:58 +01:00
Almar Klein 9bccefbc5e Update docs for img_as_ubyte
The line in `img_as_ubyte` needs correction; ubyte cannot hold negative data. From a quick experiment it seems like both `img_as_uint` and `img_as_ubyte` clip negative values (and not shift them to the positive domain).
2014-11-21 22:36:04 +01:00
Stefan van der Walt d9836a6add Remove logger in favor of warnings. 2013-08-21 00:10:33 +02:00
Josh Warner (Mac) 4b43e9f33e workaround: convert dtype(image) to image.astype(dtype) 2013-03-21 00:17:56 -05:00
Tony S Yu 1724fb2351 Change dtype_limits clipping behavior. 2013-03-02 17:40:17 -06:00
Tony S Yu 9c88dd8644 ENH: Let CannyPlugin adapt to input image
Add `dtype_limits` helper function.
2012-12-16 22:15:11 -05:00
JDWarner c54d8d31f3 Docfix for img_as_float; appended myself to CONTRIBUTORS
img_as_float() had a legacy note stating conversion would force
negative values to the positive domain; this no longer described
its functionality. Note changed to reflect the retention of negative
values when converting from signed datatypes.

When submitting my multichannel improvement to the random walker
segmentation algorithm, I neglected to append my name to the
CONTRIBUTORS file. Now fixed.
2012-09-24 11:30:45 -05:00
Tony S Yu 81e49b6686 DOC: Fix docstring note about conversion range 2012-09-13 21:37:52 -04:00
Stefan van der Walt 8494a18882 Conversion to bool: threshold on half dtype max. 2012-09-13 18:07:52 -07:00
Stefan van der Walt 56b4ba67e6 ENH: Bool dtype conversion speed improvements. 2012-09-13 18:07:52 -07:00
kuantkid 554487f9de FIX: issue sign loss warning only for signed type 2012-09-10 13:22:38 +08:00
kuantkid 07b258e208 FIX: multiply by the maximum value may change dtype 2012-09-10 13:11:27 +08:00
kuantkid 61be60cace FIX: early fix for dtype conversion from bool to other type PR #306, Issue #263 2012-09-10 13:00:32 +08:00
kuantkid 38f0ca3dbc FIX convert to (unsigned) integer from bool type 2012-09-09 23:20:21 +08:00
Tony S Yu 1d91ed98ff DOC: Fix Sphinx warning.
Trailing underscores are used to mark links. Wrap in name in backticks to prevent Sphinx for confusing this as a link.
2012-09-02 17:53:22 -04:00
Johannes Schönberger 3e6a51cc2a Add bool dtype range 2012-08-24 23:17:32 +02:00
Johannes Schönberger 7ad4b91d65 Add support for boolean dtype conversion 2012-08-24 12:42:35 +02:00
Andreas Mueller f7c56202d0 COSMIT no spaces around power `**`. Fun: https://gist.github.com/1671995 2012-06-29 11:27:23 +02:00
Andreas Mueller f7b3d8062c COSMIT pep8 2012-06-29 11:27:23 +02:00
cgohlke 98245449cb Fix test failures on Python 3 2012-06-11 09:36:29 -07:00
cgohlke 96bad2e4cf Add range check against better judgment 2012-06-06 18:51:47 -07:00
cgohlke 6d997b9af7 Remove controversial range check 2012-05-24 01:18:49 -07:00
cgohlke 225cfca4e2 Use general format 2012-05-23 12:09:41 -07:00
cgohlke 15c0df33c9 Fix TypeError 2012-05-23 12:03:23 -07:00
cgohlke 11c4ca7f53 Add floating point range check 2012-05-23 11:37:07 -07:00
cgohlke 4377c647f4 Code cleanup 2012-05-23 01:35:36 -07:00
cgohlke c4552d294a Return correct dtype 2012-05-23 00:57:26 -07:00
cgohlke 5153c97b21 Fix numpy 1.7dev casting 2012-05-23 00:16:00 -07:00
cgohlke 31d341c0cb Fix uniform conversion to signed int 2012-05-22 18:23:35 -07:00
cgohlke 7e51e519b1 Fix whitespace 2012-05-22 12:21:58 -07:00
cgohlke 85670d60b6 Update docstring 2012-05-22 12:13:51 -07:00
cgohlke 8e67dd901f Fix spelling 2012-05-22 11:49:17 -07:00
cgohlke 754f0e5d39 Docstring additions 2012-05-22 11:39:38 -07:00
cgohlke 64da74c91a Fix grammar 2012-05-22 11:12:47 -07:00
cgohlke 3ff1ebf526 Rewrite convert function 2012-05-22 00:21:32 -07:00
Stefan van der Walt ea15eb7647 ENH: Allow forced copy of data upon type conversion. 2012-03-10 17:27:54 -08:00
cgohlke 8045e1f623 Restore numpy 1.5 compatibility 2012-02-12 19:57:41 -08:00
Tony S Yu 5ed5c070c7 Fix test: clip image that exceeded float range. 2012-02-05 09:39:40 -08:00
Tony S Yu 0dcd5dc38e ENH: Check that float images are between 0 and 1. 2012-02-03 17:36:06 -05:00
Tony S Yu 078ed488c8 Fix casting error when converting from int8 to uint16.
This error only comes up in development versions of numpy, which refuses to cast the input to the correct type for inplace operations.
2012-02-03 15:46:43 -05:00
cgohlke af01a41279 Merged some code paths 2011-12-12 22:04:16 -08:00
cgohlke 038db9d1ab Rewrite dtype._convert function 2011-12-11 12:01:33 -08:00
Nelle Varoquaux 114cf44c77 Renamed scikits.image to skimage 2011-10-18 21:12:27 +02:00