You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Import all of imageio API into skimage.io namespace.
Move ImageCollection to imageio
Keep image stack
Remove external.tifffile
Use matplotlib only for show.
I have added plugins to imageio for tifffile, gdal, fits, and itk.
imageio only depends on libfreeimage, which is included in Debian repos, and will be included within the wheel installs for OSX and Windows. There is a cross-platform conda recipe for libfreeimage.
Benefits:
No PIL!
Plugins are selected based on file extension, but can be overridden.
A sane API for multi-image read/write.
We benefit from any additional plugins that are added.
I notice that imageio does not currently have an OSX wheel on pypi - @almarklein - would you like me to set up a repo to build this, on the same lines as:
Ah - OK - I will create a MacPython repo for this.
The tricks are:
to make the wheels compatible with Python.org and System Pythons, which requires a dual-arch build of the libraries and the Python extensions, and:
embedding the dynamic library in the wheel, maybe with delocate or doing static linking, so the person installing the wheel does not need to also copy the library.
Sorry, I was using a colloquialism. I meant that we would present the imageio API as part of the skimage.io API. So, you would use skimage.io.imread, etc.
How active is the Freeimage project? I see that the Makefile for OSX is still building PPC and requiring gcc-4.0, and the project is using CVS for version control.
Yes, as you know, the usual situation for wheels is that you build (and test) windows and OSX binary wheels, that are platform-specific, shipping the dynamic libraries in the wheel, and assume that Linux users a) have a compiler that works and / or b) will not be much flustered about being asked to do apt-get if necessary and / or c) won't mind being pointed to a wheel repository specific for their distribution.
I think (but am not sure) that it would be better to label these as platform-specific, and ship the wheels with hard-coded relative paths to the platform-specific dynamic lib, rather than searching across the file-system.
The question to scikit-image is - is this a sustainable way to go? I'm not sure myself. I still think it would be safer to wait say 3-6 months after imageio wheels have shipped and are working well before going this direction.
Sure, but in the same sense that numpy or scipy or matplotlib ship with various dynamic libraries - these all have standard C extensions linking to the libraries, when are then shipped in the platform-specific wheel. The new variant is the pure Python wheel shipping with dynamic libraries for multiple platforms (or downloading the library on import).
Activity
blink1073 commentedon Jul 13, 2015
cc @almarklein
matthew-brett commentedon Jul 13, 2015
I notice that imageio does not currently have an OSX wheel on pypi - @almarklein - would you like me to set up a repo to build this, on the same lines as:
etc?
almarklein commentedon Jul 13, 2015
Support for wheels is in progress. I think we've got the OSX wheels covered, right @blink1073 ?
blink1073 commentedon Jul 13, 2015
@matthew-brett, I am new to OSX wheels, your expertise would be greatly appreciated. I just naively created
imageio-1.3-cp27-none-macosx_10_5_x86_64.whlbased on the library that @almarklein had pre-compiled: https://github.com/imageio/imageio-binaries.imageio/imageio#108
vighneshbirodkar commentedon Jul 13, 2015
If I understand correctly, we plan to remove the io module completely?
blink1073 commentedon Jul 13, 2015
It would contain
stack,imshowandshow, and thenimreadand friends fromimageio's API: https://imageio.readthedocs.org/en/latest/userapi.htmlmatthew-brett commentedon Jul 13, 2015
Ah - OK - I will create a MacPython repo for this.
The tricks are:
delocateor doing static linking, so the person installing the wheel does not need to also copy the library.vighneshbirodkar commentedon Jul 13, 2015
@blink1073 What do you mean by friends ?
I am not clear, how would you read and write images ?
skimage.io.imreadorskimage.imageio.imread?blink1073 commentedon Jul 13, 2015
Sorry, I was using a colloquialism. I meant that we would present the
imageioAPI as part of theskimage.ioAPI. So, you would useskimage.io.imread, etc.vighneshbirodkar commentedon Jul 13, 2015
@blink1073, so we'll make
imageioa necessary requirement and drop other plugins ?matthew-brett commentedon Jul 13, 2015
How active is the Freeimage project? I see that the Makefile for OSX is still building PPC and requiring gcc-4.0, and the project is using CVS for version control.
blink1073 commentedon Jul 13, 2015
@vighneshbirodkar, yes, we would defer handling of plugins to
imageio.blink1073 commentedon Jul 13, 2015
@matthew-brett, from their website: "March 15th, 2015 FreeImage 3.17.0 released"
vighneshbirodkar commentedon Jul 13, 2015
Nice. What about
imshow? Is it a good idea to have a light weight viewer ? A bare-minimum window with a close button.blink1073 commentedon Jul 13, 2015
We still depend on
matplotlib, and we provide some nice defaults forplt.imshowhere.37 remaining items
matthew-brett commentedon Jul 14, 2015
Yes, as you know, the usual situation for wheels is that you build (and test) windows and OSX binary wheels, that are platform-specific, shipping the dynamic libraries in the wheel, and assume that Linux users a) have a compiler that works and / or b) will not be much flustered about being asked to do
apt-getif necessary and / or c) won't mind being pointed to a wheel repository specific for their distribution.blink1073 commentedon Jul 14, 2015
I couldn't quite figure out how to make the wheel assert itself as platform specific, without adding an
Extensiontosetup.py.matthew-brett commentedon Jul 14, 2015
I think (but am not sure) that it would be better to label these as platform-specific, and ship the wheels with hard-coded relative paths to the platform-specific dynamic lib, rather than searching across the file-system.
I just succeeded in building a OSX 10.6-compatible dual arch Freeimage library FWIW : https://travis-ci.org/MacPython/imageio-wheels/jobs/70881688
I don't know how to label wheels as platform-specific more nicely than adding a spurious
Extension, but I could have a go at working that out.blink1073 commentedon Jul 14, 2015
@matthew-brett, can we take this conversation to imageio/imageio#108?
matthew-brett commentedon Jul 14, 2015
We can, I will.
The question to scikit-image is - is this a sustainable way to go? I'm not sure myself. I still think it would be safer to wait say 3-6 months after imageio wheels have shipped and are working well before going this direction.
stefanv commentedon Jul 15, 2015
I would err on the side of Matthew's caution.
almarklein commentedon Jul 16, 2015
That's fair enough; we'll get wheels and conda packages up and then we revive this issue a few months down the line.
blink1073 commentedon Jul 19, 2015
Another data point: pyzmq ships with a copy of libzmq, and IPython has been relying on it for some time now.
https://pypi.python.org/pypi/pyzmq
matthew-brett commentedon Jul 19, 2015
Sure, but in the same sense that numpy or scipy or matplotlib ship with various dynamic libraries - these all have standard C extensions linking to the libraries, when are then shipped in the platform-specific wheel. The new variant is the pure Python wheel shipping with dynamic libraries for multiple platforms (or downloading the library on import).
tacaswell commentedon Jul 31, 2015
attn @danielballan
jni commentedon Oct 27, 2020
Closing in favour of #5306