[Image-SIG] Can not read a special type of tif images
Nadav Horesh
nadavh at visionsense.com
Wed Feb 13 14:05:03 CET 2008
I have a set of tif images that generated for a dicom images using ImageMagic convert utility. The Image module does not identify them (even identify utility seems to be inconsistent about them, as shown below):
Try to read image via Image module
===================================
In [2]: import Image
In [3]: Image.VERSION
Out[3]: '1.1.6'
In [6]: im = Image.open('disk1_00_00_00_ct000104.tif')
---------------------------------------------------------------------------
IOError Traceback (most recent call last)
/home/nadav/Dubi_feb_2008/<ipython console> in <module>()
/usr/lib64/python2.5/site-packages/PIL/Image.py in open(fp, mode)
1914 pass
1915
-> 1916 raise IOError("cannot identify image file")
1917
1918 #
Ioerror: cannot identify image file
Use identify to tell the imsge type (claims 16 bits image)
===========================================================
nadav at nadav_home ~/Dubi_feb_2008 $ identify disk1_00_00_00_ct000104.tif
disk1_00_00_00_ct000104.tif TIFF 512x666 512x666+0+0 DirectClass 16-bit 1.95405mb
Use VERBOSE identify to tell the imsge type (claims 3 channels of 8 bits image)
=================================================================================
nadav at nadav_home ~/Dubi_feb_2008 $ identify -verbose disk1_00_00_00_ct000104.tifImage: disk1_00_00_00_ct000104.tif
Format: TIFF (Tagged Image File Format)
Class: DirectClass
Geometry: 512x666+0+0
Type: TrueColor
Endianess: MSB
Colorspace: RGB
Depth: 8-bit
Channel depth:
Red: 8-bit
Green: 8-bit
Blue: 8-bit
Channel statistics:
Red:
Min: 0 (0)
Max: 255 (1)
Mean: 23.9858 (0.094062)
Standard deviation: 54.0234 (0.211857)
Green:
Min: 0 (0)
Max: 255 (1)
Mean: 23.9649 (0.0939799)
Standard deviation: 53.9348 (0.211509)
Blue:
Min: 0 (0)
Max: 255 (1)
Mean: 23.9279 (0.0938347)
Standard deviation: 53.9765 (0.211673)
Rendering intent: Undefined
Resolution: 72x72
Units: Undefined
Filesize: 1.95405mb
Interlace: None
Background color: white
Border color: rgb(223,223,223)
Matte color: grey74
Transparent color: black
Page geometry: 512x666+0+0
Dispose: Undefined
Iterations: 0
Compression: None
Orientation: TopLeft
Signature: 0b119af1944ffba9285d903f89bc4021e52686570b8bc519f3e653a0dfd05445
Tiff:document: /home/nadav/Dubi_feb_2008/disk1_00_00_00_ct000104.tif
Tiff:rows-per-strip: 2
Tiff:software: ImageMagick 6.3.5 11/04/07 Q16 http://www.imagemagick.org
Tainted: False
Version: ImageMagick 6.3.5 11/04/07 Q16 http://www.imagemagick.org
Nadav.
More information about the Image-SIG
mailing list