io plugin issue (8bits 16bits)

Neil Yager yager.neil at gmail.com
Tue Dec 6 01:52:45 EST 2011


Coincidentally, I also noticed the 16-bit tiff issue the other day,
and started working on a fix. I was using an approach based on this:

http://stackoverflow.com/questions/7684695/numpy-array-of-an-i16-image-file

Changing the last line of imread in pil_plugin to:

return np.array(im.getdata()).reshape(im.size[::-1])

fixes that specific problems, but causes others (e.g. can't load
colour images). At that point I got side-tracked by something else, so
I'm not sure if it's a good fix.

Neil

On Dec 6, 12:32 am, Stéfan van der Walt <ste... at sun.ac.za> wrote:
> On Mon, Dec 5, 2011 at 2:40 PM, Christoph Gohlke <cjgoh... at gmail.com> wrote:
> > skimage.io.use_plugin is somewhat broken (I think). It replaces all
> > previously defined default imread, imwrite, and imshow functions, regardless
> > whether a `kind` argument is provided. For example:
>
> Between Chris and myself, we should have this fixed tonight.  Follow along here:
>
> https://github.com/scikits-image/scikits-image/pull/88https://github.com/scikits-image/scikits-image/pull/90
>
> PR90 provides a new function called "plugin_order", which allows the
> user to see under the hood which function skimage will try to use.
>
> Cheers
> Stéfan



More information about the scikit-image mailing list