Commit Graph

240 Commits

Author SHA1 Message Date
Stefan van der Walt 84f3835106 Fix Big Endian check 2014-09-04 22:32:02 +01:00
Stefan van der Walt 051c54c577 Fix indexing bug in freeimage plugin 2014-09-04 21:29:02 +01:00
Geoffrey French a90096555b Docstring and comment improvements and fixes in plot_windowed_histogram.
Readability improvement to skimage/io/__init__.py
2014-09-01 22:59:59 +01:00
Geoffrey French f87db0a1ec Fixes a bug in _update_doc in skimage/io/__init__.py that will attempt to compute max of empty list if no plugins are found. 2014-08-31 15:12:01 +01:00
Stefan van der Walt 2b1dde202f freeimage: Correctly handle saving uint16 images (closes gh-1101) 2014-08-15 15:22:51 +02:00
Adam Feuer 8494b8081a removed trailing blank line in comment 2014-08-09 10:37:11 -07:00
Adam Feuer ef7da3be4a explicitly checking for None as per code review feedback
- instead of implicit (non-truthy) test
2014-08-09 09:04:05 -07:00
Adam Feuer 25f08ff68e removing trailing space (PEP8 formatting) 2014-08-09 09:03:06 -07:00
Adam Feuer 05380823cc updated imread parameters comment to standard format
- with 'str' file type (instead of 'string')
2014-08-09 09:01:07 -07:00
Adam Feuer 6d9a3c3913 reformat comments to be standard format
- clarified function names
- comments in standard format
- removed extra blank line
- as per code review feedback
2014-08-06 21:14:00 -07:00
Adam Feuer 1cb73c79d6 improved name of pil import/export functions
- to make it clear what the functions actually do:
  ndarray_to_pil() and pil_to_ndarray()
- as per code review feedback
- updated tests to use the new function names

- incoming change to pil_plugin assumed PIL Image
  objects will always be from files; this is
  not always true anymore. Now pil_plugin
  checks to see if the Image came from a file
  before trying to close its associated file.
2014-08-05 08:03:40 -07:00
Adam Feuer 4a0b99ad6f fixed bad indent 2014-08-05 07:52:45 -07:00
Adam Feuer 32061fb66d added a space character to trigger travis build 2014-08-05 07:52:45 -07:00
Adam Feuer 1dcb60fd68 added tests for roundtrip export and import
- and corrected error in imexport - wasn't using imsave code
  correctly
- split imsave into imsave and imexport functions to reuse
  imsave code
2014-08-05 07:52:45 -07:00
Adam Feuer b03683d6c5 pil_plugin can import and export from memory
- added capability to import and export to PIL Image
  objects, not just files - allows for converting
  to and from PIL image objects without writing
  to disk
- no unit test yet
2014-08-05 07:50:09 -07:00
blink1073 b6dcf3c336 Update Travis build to use Anaconda.
Update Travis build to use Anaconda

Travis updates and fixes

More travis fixes

Another travis attempt

Revert changes

Use PIL and Pillow

Refactor travis into 4 different builds

Fix activation error

Remove explicit mpl in build_versions.py

Make matplotlib an explicit requirement

Rearrange travis

Make pillow a hard requirement

Try again to make Pillow optional

Fix bash syntax error

Fix bash syntax error

Bump required cython version

More rearrangments

Remove mpl from build_versions, rearrange travis

Fix version check

Make matplotlib explicit again

Conda install into test env

Check for proper install

Allow tests to skip if networkx is not available

Allow tests to skip if networkx is not available

Try swapping pillow for matplotlib

Allow tests to pass when matplotlib is not present

Remove matplotlib from build_versions

Print PIL version

Get pillow from PIP

Allow tests to skip if matplotlib is not present.

Allow tests to skip if networkx is not present.

travis fix

Remove unused mpl import that caused test error

Use nose-cov and do not run doctests without optional libs

Bump required numpy version and fix nose calls

Make overlay test repeatable

bump numpy version again

Move low-end numpy to python 2.7

Play with minimum versions

Add version requirements and use functions

Add version requirements and use functions

Allow require to skip a test

More implementation of require decorator

Update require decorator and clean up tests

Only use requires decorator when needed

Fix python3 error in version_requirements

Fix build errors

Fix handling of require with tests

More fixes for require handler

Use latest miniconda

Fix more build errors

Fix another dict comprehension and travis file.

Fix missing imports

Fix dictionary again

Fix import warning

Fix last failing test on 2.6

Skip doc examples on python2.6

Do not run doctests on python2.6

Fix typo in travis.yml

Make numpy-1.6 compatibility changes

Use numpy-1.6 in travis python2.6

Add tests for version requirements

Fix line noise in PR

Add additional io plugins

Fix simpleitk test.

Fix python 3 error in freeimage_plugin.

Install imread in Travis.

Put matplotlib settings in XDG recommended directory

Fix formatting in travis yml

Fix formatting in travis yml

Make sure to close PIL file atexit

Fix name of apt package xcftools

Fix pil fp closing

Fix matplotlibrc creation

Only download SimpleITK on py2x, run coverage on py27

Fix travis yml syntax error

Run coveralls on py2.7

Install SimpleITK on py3.3 and run coverage on py3.3

Make simpleitk install quiet

Use standard nose and clean up incantation

Fix travis yml syntax error

Put in miniconda workout for libc error.

Fix imread plugin.

Fix travis syntax

Remove unused import

Remove miniconda libpng in favor of system png

Fix imread install and move libm removal to after optional pkg install.

Fix png header copy in travis yml

Another attempt to use png headers

Debug freeimage

Add jpeg library for freeimage and debug imread.

More debug for imread and freeimage

More freeimage and imread debugging

More debugging

Use correct paths for test env

Make sure imread is tied to libpng15

Add a TODO note for simpleitk test causing error.

Fix typo in yml

Cleanup and add more comments to travis yml

Update comment

Try and add 3.2 support.

Docstring formatting

Add more travis comments.

Try numpy 1.6 on python 2.7

Fix travis syntax error

Rename CONDA to ENV for clarity

Alias python on python 3.2

Use python 3.2 as the system python

Clean up libfreeimage install

Fix order on py3.2 pre_install

Move old numpy back to py26

Use the appropriate python calls.

Debug 3.2 build.

Update comment

Fix syntax error

Another fix for syntax error.

Install scipy after downloading import tools

More debugging for py32

Do not install conda on py3.2 (duh)

Fix typo in travis yml

Fix py32 qt install, separate pyfits and imread to find error

Fix syntax error and front-load option lib check for debug

pyfits is not supported in py3.2, try imread now

imread is also not supported on py3.2

install imread before pyfits to show relationship with libs

Make pip builds quiet

Minor formatting to retrigger build

Allow simpleitk to fail to download without breaking the build

Use travis_retry for SimpleITK

See what breaks when we keep libm in

Now remove libm again
2014-08-02 06:47:09 -05:00
blink1073 5677dafe41 Move away from random.random in favor of random.rand 2014-07-19 18:18:23 -05:00
blink1073 5ef3f95d71 Add random seeds to tests per #1044 2014-07-05 12:49:42 -05:00
Kevin Murray 4160a67a42 [skimage.io.tests] add truncated jpg imread tests 2014-06-30 19:35:35 +10:00
Kevin Murray 83d0717986 [test_freeimage] Allow ValueError to be raised
With the truncated image, sometimes ValueError is raised. This allows
either RuntimeError (i.e. libfreeimage error) or ValueError to be
raised.
2014-06-30 18:47:31 +10:00
Kevin Murray 7d9f9c46d9 [test_freeimage.py] remove extraneous statements 2014-06-30 14:45:51 +10:00
Kevin Murray d69cdb951b [freeimage tests] Add a test w/ truncated image
This tests tests the fix in the previous commit b9a7445, covering the
issue noted in issue #1037.
2014-06-30 14:45:51 +10:00
Kevin Murray b9a7445296 [skimg.io._plugins.freeimage_plugin] fix segfault
I have moved the freeimage error handler callback function to the module
namespace to prevent it being garbage collected. See the following for
more info on this quirk of ctypes:
http://stackoverflow.com/questions/12995925/how-to-prevent-functype-from-being-collected
https://github.com/JohannesBuchner/PyMultiNest/issues/5

This also changes the way FreeImage errors are handled. If an exception
is raised in a callback, it will not propagate beyond ctypes internals.
Now, we use a callback that sets a global variable to indicate error. We
then check for error and reset the error string to NULL every time the
C api is called. This is the only way we can both:
 a) Not segfault on freeimage error
 b) Pass the freeimage error to the user
 c) raise RuntimeError()
2014-06-27 21:26:58 +10:00
Thomas Robitaille 9ecbc6ef58 Use Astropy by default if possible 2014-04-22 16:39:07 +02:00
François Boulogne ba11683d45 update info about PIL 2014-04-03 19:56:02 -04:00
Johannes Schönberger 726ba6d101 Temporarily remove video plugin
The video plugin is broken in its current state. It might come back at a later
time, when the Python bindings to gstreamer are up-to-date again.
2014-03-27 09:06:58 -04:00
cgohlke 5403e7a61e Use os.pathsep to sepatate multiple ImageCollection load_pattern
The colon `:` does not work on Windows as it can be part of a path
2014-03-10 22:50:00 -07:00
Johannes Schönberger 181d030952 Remove six copy in _shared as it is a required dependency 2014-02-23 20:42:40 -05:00
Stefan van der Walt b71008a135 Fix Image.frombytes for older version of Python/PIL 2014-02-12 12:59:51 +02:00
Stefan van der Walt c930133982 Use frombytes instead of fromstring on PIL images, since the latter is now deprecated 2014-02-12 12:17:26 +02:00
Tony S Yu e0dafcf004 Clean up test 2014-01-14 23:27:23 -06:00
Tony S Yu 25e349d416 Remove outdated function 2014-01-14 23:15:45 -06:00
Tony S Yu 07f2656975 Factor out function injection 2014-01-14 23:09:27 -06:00
Tony S Yu 19102510ce Move wrapper function 2014-01-14 23:09:27 -06:00
Tony S Yu 8a4c5ce354 Add comments about how plugins are managed. 2014-01-14 23:09:27 -06:00
Tony S Yu 0f78de46e5 Add dynamic creation of imread_collection function 2014-01-14 23:09:26 -06:00
Tony S Yu d7cf60ef0b Attempt to fix failing test on Python 3 buildbot 2013-12-07 11:45:37 -06:00
Tony S Yu f7fa4049f5 Test null plugin 2013-12-07 10:41:03 -06:00
Tony S Yu b715b79c31 Test Image._repr_png_ 2013-12-07 10:26:56 -06:00
Tony S Yu f04e14272f Fix doctest which causes side-effects.
I'm not sure that there's a safe way to write this example as a doctest,
but I think this will pass on Travis (although it still has side-effects.
2013-12-07 01:07:17 -06:00
Tony S Yu 6a751045f1 Un-revert commits added to test Travis CI failures 2013-12-07 01:04:40 -06:00
Tony S Yu 27bab63900 Un-revert "Fix failing doctest on systems w/o PIL" commit 2013-12-07 00:22:34 -06:00
Tony S Yu c09f1bfd32 Revert previous 3 commits to test Travis CI failures. 2013-12-07 00:01:32 -06:00
Tony S Yu 99c5ba409a Slight clean up of tests 2013-12-06 23:43:56 -06:00
Tony S Yu c329ff14bc Fix failing doctest on systems w/o PIL 2013-12-06 22:40:37 -06:00
Tony S Yu 0f88bed41d Remove inherited config and file-type-specific code.
This functionality needs to fleshed out a bit more. This commit can be
reverted after the initial refactor PR.
2013-12-06 22:40:25 -06:00
Tony S Yu e59daf474c Modest attempt at normalizing file extensions 2013-12-05 23:38:13 -06:00
Tony S Yu 99aa5a8238 Move io._plugins.plugin to io.manage_plugins 2013-12-05 23:19:47 -06:00
Tony S Yu 0922ccf923 Refactor load_preferred_plugins 2013-12-05 23:19:47 -06:00
Tony S Yu ac4eb5ae7b Make preferred_plugins a dict 2013-12-05 23:19:47 -06:00