On 12/5/2011 1:52 PM, St�fan van der Walt wrote:
On Mon, Dec 5, 2011 at 1:20 PM, jip
wrote: I joined an image with that message. Thanks, JP. This allowed me to narrow down the problem. We currently do not have logic to support PIL Tiff objects, so they end up embedded in an object array.
In the meantime, the matplotlib plugin does work for me:
import skimage.io as sio sio.use_plugin('matplotlib') img = sio.imread('1.tiff')
Cheers St�fan
Hello, Matplotlib's imread uses PIL and also does not read 16 bit TIFFs correctly. The FreeImage, Qt, and GDAL plugins do. With scikits-image 0.4.2, the following works correctly for me on Windows: import skimage.io skimage.io.use_plugin('freeimage') skimage.io.use_plugin('matplotlib') image = skimage.io.imread('1.tif', plugin='freeimage') skimage.io.imshow(image, cmap='gray') skimage.io.show() 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: skimage.io.use_plugin('freeimage', 'imread') skimage.io.use_plugin('matplotlib', 'imshow') the second call replaces freeimage.imread as the default imread function with matplotlib.imread. Christoph