[vtkusers] vtkTIFFReader with 16bit images???
anast.jm at pg.com
anast.jm at pg.com
Wed Jul 24 10:23:24 EDT 2002
I'm pretty convinced the tiff reader is having problems with 16 bit grayscale
images. Could someone confirm this with known good 16 bit tiff images?? I have
generated some small 16 bit images that read okay in other packages so I think
they are good test images but you never know since I'm counting on the generator
software (MatLab) to make "correct" tiff images. The test images (64x64 pixels)
are available for anyone who is interested in fixing the problem. I use the
simple tcl code below to probe the scalar range. The PNG file works and the Tiff
does not. maintain the 16bit range. Any help appreciated with this one....john
# Test high bit image reader
# Tiff has problems with 16 bit image
# PNG is okay
package require vtk
package require vtkinteraction
# read in image
vtkPNGReader reader
reader SetFileName smalltest16.png
reader Update
set inputRange [[[[reader GetOutput] GetPointData] GetScalars] GetRange]
vtkTIFFReader reader2
reader2 SetFileName smalltest16.tif
reader2 Update
set inputRange2 [[[[reader2 GetOutput] GetPointData] GetScalars] GetRange]
vtkOutputWindow vow
vow DisplayText $inputRange,PNG.....
vow DisplayText $inputRange2,TIFF
# prevent the tk window from showing up then start the event loop
wm withdraw .
More information about the vtkusers
mailing list